Bug 1419297 - Call document.close, triggering onload and making the test not time out. r=smaug draft
authorBlake Kaplan <mrbkap@gmail.com>
Thu, 07 Jun 2018 16:48:51 -0700
changeset 805852 e4d0d1ec8446d114bbe79399e64636f25771c9ac
parent 805551 ea21bf3e665d10066b6dce39873de9b353a12e57
child 805853 0907f240d4c8a7896161755bc5bf68b2b322d5ec
push id112778
push userbmo:mrbkap@mozilla.com
push dateFri, 08 Jun 2018 16:04:17 +0000
reviewerssmaug
bugs1419297
milestone62.0a1
Bug 1419297 - Call document.close, triggering onload and making the test not time out. r=smaug This fixes both uses of object-association.js. MozReview-Commit-ID: 8Fj7dC1c3U2
testing/web-platform/meta/MANIFEST.json
testing/web-platform/meta/custom-elements/custom-element-registry/per-global.html.ini
testing/web-platform/meta/html/browsers/history/the-location-interface/per-global.window.js.ini
testing/web-platform/tests/common/object-association.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -412954,17 +412954,17 @@
    "e3593850f8098d3f3ff82c042deab15f51c66a52",
    "support"
   ],
   "common/namespaces.js": [
    "a8018fb9fb6f1f2212f5433581fc12e7795a638e",
    "support"
   ],
   "common/object-association.js": [
-   "c6955b7bbf00d73ec5959678391aa59d36da8321",
+   "759706842deec7ed3b59c66fab89209bd93cc561",
    "support"
   ],
   "common/object-association.js.headers": [
    "e3593850f8098d3f3ff82c042deab15f51c66a52",
    "support"
   ],
   "common/performance-timeline-utils.js": [
    "8a914a75398a2865da676183a62b00753607fbca",
--- a/testing/web-platform/meta/custom-elements/custom-element-registry/per-global.html.ini
+++ b/testing/web-platform/meta/custom-elements/custom-element-registry/per-global.html.ini
@@ -1,5 +1,4 @@
 [per-global.html]
-  expected: TIMEOUT
   [Discarding the browsing context must not change window.customElements]
     expected: FAIL
 
deleted file mode 100644
--- a/testing/web-platform/meta/html/browsers/history/the-location-interface/per-global.window.js.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[per-global.window.html]
-  expected: TIMEOUT
--- a/testing/web-platform/tests/common/object-association.js
+++ b/testing/web-platform/tests/common/object-association.js
@@ -9,17 +9,17 @@ window.testIsPerWindow = propertyName =>
     const frame = iframe.contentWindow;
 
     const before = frame[propertyName];
     assert_true(before !== undefined && before !== null, `window.${propertyName} must be implemented`);
 
     iframe.remove();
 
     const after = frame[propertyName];
-    assert_equals(after, before);
+    assert_equals(after, before, `window.${propertyName} should not change after iframe.remove()`);
   }, `Discarding the browsing context must not change window.${propertyName}`);
 
   async_test(t => {
     const iframe = document.createElement("iframe");
     document.body.appendChild(iframe);
     const frame = iframe.contentWindow;
 
     const before = frame[propertyName];
@@ -51,14 +51,16 @@ window.testIsPerWindow = propertyName =>
       const frame = iframe.contentWindow;
       const before = frame[propertyName];
       assert_true(before !== undefined && before !== null, `window.${propertyName} must be implemented`);
 
       frame.document.open();
 
       const after = frame[propertyName];
       assert_not_equals(after, before);
+
+      frame.document.close();
     });
 
     iframe.src = "/common/blank.html";
     document.body.appendChild(iframe);
   }, `document.open() must replace window.${propertyName}`);
 };