Bug 1426642 - Fix test that didn't take account of module scripts' defer scheduling r=jgraham
authorJon Coppeard <jcoppeard@mozilla.com>
Thu, 04 Jan 2018 10:37:02 +0000
changeset 449531 f6b74e7c3c0943a212e0d2efd73340b8d2157dbb
parent 449530 d6ad893078b23c1a2c546ca7b1509013fa10e89e
child 449532 afef4f6c98755643a56ad15e39b3ac885877eb7d
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1426642
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1426642 - Fix test that didn't take account of module scripts' defer scheduling r=jgraham
testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/module-in-xhtml.xhtml.ini
testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/module-in-xhtml.xhtml
deleted file mode 100644
--- a/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/module-in-xhtml.xhtml.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[module-in-xhtml.xhtml]
-  type: testharness
-  [module script in XHTML documents should be evaluated.]
-    expected: FAIL
-
--- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/module-in-xhtml.xhtml
+++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/module-in-xhtml.xhtml
@@ -5,12 +5,16 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 </head>
 <body>
 <script type="module">
 window.evaluated_module_script = true;
 </script>
 <script>
-test(() => assert_true(window.evaluated_module_script), "module script in XHTML documents should be evaluated.");
+  var test = async_test("module script in XHTML documents should be evaluated.");
+  window.addEventListener("load", () => {
+    test.step(() => { assert_true(window.evaluated_module_script); });
+    test.done();
+  });
 </script>
 </body>
 </html>