From b7404015aac366e009969f0e3b1a78387e96eb1a Mon Sep 17 00:00:00 2001 From: Luke Wilde Date: Wed, 13 Oct 2021 18:32:15 +0100 Subject: [PATCH] Base: Add a test for the early return steps of "prepare a script" This tests the early return steps of "prepare a script" that come _before_ step 10 "Set the element's "already started" flag". The relevant steps are steps 6, 7 and 8. If this algorithm returns on any of these steps, the script can be reinserted matching the requirements and will run. https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script I wrote this test page up while testing something else, but found a bug in Firefox where it doesn't allow re-preparing the script if step 8 fails: https://bugzilla.mozilla.org/show_bug.cgi?id=1735590 --- .../html/misc/script-preparation-test.html | 120 ++++++++++++++++++ Base/res/html/misc/welcome.html | 1 + 2 files changed, 121 insertions(+) create mode 100644 Base/res/html/misc/script-preparation-test.html diff --git a/Base/res/html/misc/script-preparation-test.html b/Base/res/html/misc/script-preparation-test.html new file mode 100644 index 0000000000..2582209b1a --- /dev/null +++ b/Base/res/html/misc/script-preparation-test.html @@ -0,0 +1,120 @@ + + + + + + + +

+ This tests the early return steps of "prepare a script" + that come before step 10 "Set the element's "already started" flag". The relevant steps are steps 6, 7 and 8. + If this algorithm returns on any of these steps, the script can be reinserted matching the requirements and will run. +

+ +

Expected result:

+ + +
+ +

Actual result:

+ + + + + + + + + + + + + + + + + diff --git a/Base/res/html/misc/welcome.html b/Base/res/html/misc/welcome.html index e5e57ba8c8..d6cc7fc4c2 100644 --- a/Base/res/html/misc/welcome.html +++ b/Base/res/html/misc/welcome.html @@ -143,6 +143,7 @@
  • fun demo
  • setInterval()
  • window.location property
  • +
  • Test for the early return steps 6-8 of the "prepare a script" algorithm
  • Canvas

  • canvas 2D test
  • canvas rotate()