Bug 1485856 [wpt PR 12662] - HTML: review followup, a=testonly
authorTimothy Gu <timothygu99@gmail.com>
Wed, 29 Aug 2018 22:38:29 +0000
changeset 482550 a496daf666ea48b0fa47d87702e6d3c021d95925
parent 482549 a21736ae8e95cb98a1a8a158123696731aca8e00
child 482551 863343b56811a1ef5188bf48ddb7aa3aadb3f966
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
reviewerstestonly
bugs1485856, 12662, 12636
milestone63.0a1
Bug 1485856 [wpt PR 12662] - HTML: review followup, a=testonly Automatic update from web-platform-testsHTML: review followup (#12662) Follow up to review comments in https://github.com/web-platform-tests/wpt/pull/12636. -- wpt-commits: a63935ce4574b32d850cf0063f6ea508ad517986 wpt-pr: 12662
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url.window.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -607225,17 +607225,17 @@
    "9174008da33b7faeba91169efe3ace6e1dc87704",
    "testharness"
   ],
   "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/unload.window.js": [
    "e275a4987a0859b160a0f91de6c8896b90bdab31",
    "testharness"
   ],
   "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url.window.js": [
-   "282e58e9c380fc214365522163c8bc09a67afc3b",
+   "4e7c649f4533958112e6bd1dd59537619d7cc62d",
    "testharness"
   ],
   "html/webappapis/microtask-queuing/queue-microtask-exceptions.any.js": [
    "01f32ac9ba14962fa99d4b263a8ca0f5a0daa161",
    "testharness"
   ],
   "html/webappapis/microtask-queuing/queue-microtask.any.js": [
    "b39931719a88ad525511d8f8745a9b752a6a6465",
--- a/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url.window.js
+++ b/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url.window.js
@@ -1,14 +1,14 @@
 test(t => {
   const frame = document.body.appendChild(document.createElement("iframe"));
   t.add_cleanup(() => frame.remove());
   assert_equals(frame.contentDocument.URL, "about:blank");
   assert_equals(frame.contentWindow.location.href, "about:blank");
-  frame.contentDocument.open();
+  assert_equals(frame.contentDocument.open(), frame.contentDocument);
   assert_equals(frame.contentDocument.URL, document.URL);
   assert_equals(frame.contentWindow.location.href, document.URL);
 }, "document.open() changes document's URL (fully active document)");
 
 async_test(t => {
   const blankURL = new URL("/common/blank.html", document.URL).href;
   const frameURL = new URL("resources/page-with-frame.html", document.URL).href;
   const frame = document.body.appendChild(document.createElement("iframe"));
@@ -21,45 +21,51 @@ async_test(t => {
     const childWin = childFrame.contentWindow;
     assert_equals(childDoc.URL, blankURL);
     assert_equals(childWin.location.href, blankURL);
 
     // Right now childDoc is still fully active.
 
     frame.onload = t.step_func_done(() => {
       // Now childDoc is still active but no longer fully active.
-      childDoc.open();
+      assert_equals(childDoc.open(), childDoc);
       assert_equals(childDoc.URL, blankURL);
       assert_equals(childWin.location.href, blankURL);
     });
     frame.src = "/common/blank.html";
   });
   frame.src = frameURL;
 }, "document.open() does not change document's URL (active but not fully active document)");
 
 test(t => {
   const frame = document.body.appendChild(document.createElement("iframe"));
   t.add_cleanup(() => frame.remove());
   const doc = frame.contentDocument;
 
+  // We do not test for win.location.href in this test due to
+  // https://github.com/whatwg/html/issues/3959.
+
   // Right now the frame is connected and it has an active document.
   assert_equals(doc.URL, "about:blank");
 
   frame.remove();
 
   // Now the frame is no longer connected. Its document is no longer active.
   assert_equals(doc.URL, "about:blank");
   assert_equals(doc.open(), doc);
   assert_equals(doc.URL, "about:blank");
 }, "document.open() does not change document's URL (non-active document with an associated Window object; frame is removed)");
 
 async_test(t => {
   const frame = document.createElement("iframe");
   t.add_cleanup(() => frame.remove());
 
+  // We do not test for win.location.href in this test due to
+  // https://github.com/whatwg/html/issues/3959.
+
   frame.onload = t.step_func(() => {
     const doc = frame.contentDocument;
     // Right now the frame is connected and it has an active document.
     assert_equals(doc.URL, "about:blank");
 
     frame.onload = t.step_func_done(() => {
       // Now even though the frame is still connected, its document is no
       // longer active.