Title: [218639] trunk/LayoutTests/imported/w3c
Revision
218639
Author
[email protected]
Date
2017-06-21 10:08:02 -0700 (Wed, 21 Jun 2017)

Log Message

Import W3C tests regarding navigation inside sandboxed iframes
https://bugs.webkit.org/show_bug.cgi?id=173649

Patch by Frederic Wang <[email protected]> on 2017-06-21
Reviewed by Youenn Fablet.

This import new tests added in https://github.com/w3c/web-platform-tests/pull/6221 to verify
sandboxing of iframes and will help to test the changes in bug 173162.

* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-tries-to-navigate-parent-and-sends-result-to-grandparent.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-its-child.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-its-child.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-itself.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (218638 => 218639)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2017-06-21 17:05:28 UTC (rev 218638)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2017-06-21 17:08:02 UTC (rev 218639)
@@ -1,3 +1,37 @@
+2017-06-21  Frederic Wang  <[email protected]>
+
+        Import W3C tests regarding navigation inside sandboxed iframes
+        https://bugs.webkit.org/show_bug.cgi?id=173649
+
+        Reviewed by Youenn Fablet.
+
+        This import new tests added in https://github.com/w3c/web-platform-tests/pull/6221 to verify
+        sandboxing of iframes and will help to test the changes in bug 173162.
+
+        * resources/import-expectations.json:
+        * resources/resource-files.json:
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures-expected.txt: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1-expected.txt: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2-expected.txt: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1-expected.txt: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2-expected.txt: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2.html: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants-expected.txt: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants.html: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself-expected.txt: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself.html: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-tries-to-navigate-parent-and-sends-result-to-grandparent.html: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-its-child.html: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-its-child.html: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-itself.html: Added.
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log:
+        * web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log:
+
 2017-06-21  Youenn Fablet  <[email protected]>
 
         LayoutTests/imported/w3c/resources/import-expectations.json is broken after http://trac.webkit.org/changeset/218181

Modified: trunk/LayoutTests/imported/w3c/resources/import-expectations.json (218638 => 218639)


--- trunk/LayoutTests/imported/w3c/resources/import-expectations.json	2017-06-21 17:05:28 UTC (rev 218638)
+++ trunk/LayoutTests/imported/w3c/resources/import-expectations.json	2017-06-21 17:08:02 UTC (rev 218639)
@@ -191,6 +191,7 @@
     "web-platform-tests/html/semantics/embedded-content/the-area-element/test-area.xhtml": "skip", 
     "web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html": "skip", 
     "web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04.html": "skip", 
+    "web-platform-tests/html/semantics/embedded-content/the-iframe-element": "import", 
     "web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html": "skip", 
     "web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data": "skip", 
     "web-platform-tests/html/semantics/embedded-content/the-object-element/object-events.html": "skip", 
@@ -220,8 +221,8 @@
     "web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections": "skip", 
     "web-platform-tests/html/webappapis/the-windoworworkerglobalscope-mixin": "import", 
     "web-platform-tests/http": "skip", 
+    "web-platform-tests/image-decodes": "skip", 
     "web-platform-tests/imagebitmap-renderingcontext": "skip", 
-    "web-platform-tests/image-decodes": "skip", 
     "web-platform-tests/infrastructure": "skip", 
     "web-platform-tests/innerText": "import", 
     "web-platform-tests/input-events": "skip", 
@@ -259,9 +260,9 @@
     "web-platform-tests/remote-playback": "skip", 
     "web-platform-tests/resource-timing": "import", 
     "web-platform-tests/screen-orientation": "skip", 
-    "web-platform-tests/secure-contexts": "import", 
     "web-platform-tests/scroll-anchoring": "skip", 
     "web-platform-tests/scroll-into-view": "skip", 
+    "web-platform-tests/secure-contexts": "import", 
     "web-platform-tests/selection": "skip", 
     "web-platform-tests/selectors": "skip", 
     "web-platform-tests/selectors-api": "skip", 
@@ -301,4 +302,4 @@
     "web-platform-tests/webvtt": "skip", 
     "web-platform-tests/workers": "skip", 
     "web-platform-tests/x-frame-options": "skip"
-}
+}
\ No newline at end of file

Modified: trunk/LayoutTests/imported/w3c/resources/resource-files.json (218638 => 218639)


--- trunk/LayoutTests/imported/w3c/resources/resource-files.json	2017-06-21 17:05:28 UTC (rev 218638)
+++ trunk/LayoutTests/imported/w3c/resources/resource-files.json	2017-06-21 17:08:02 UTC (rev 218639)
@@ -239,8 +239,13 @@
         "web-platform-tests/html/semantics/embedded-content/the-iframe-element/same_origin_child.html",
         "web-platform-tests/html/semantics/embedded-content/the-iframe-element/same_origin_grandchild.html",
         "web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/blank.htm",
+        "web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html",
         "web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-without-user-gesture-failed.html",
         "web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation.html",
+        "web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-tries-to-navigate-parent-and-sends-result-to-grandparent.html",
+        "web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-its-child.html",
+        "web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-its-child.html",
+        "web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-itself.html",
         "web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/navigation-changed-iframe.html",
         "web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/sandbox_allow_script.html",
         "web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/iframed.sub.html",

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures-expected.txt (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures-expected.txt	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,4 @@
+
+
+PASS contentDocument should only change after a load matures. 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,21 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Iframe's contentDocument should only change after its pending load has matured.</title>
+<script src=""
+<script src=""
+<body></body>
+<script>
+async_test(function(t) {
+    var iframe = document.createElement("iframe");
+    document.body.appendChild(iframe);
+    iframe._onload_ = t.step_func(function() {
+        assert_true(iframe.contentDocument.location.toString().includes("support/blank.htm"));
+        t.done();
+    });
+
+    assert_equals(iframe.contentDocument.location.toString(), "about:blank");
+    iframe.src = ""
+    // The location of the contentDocument should not change until the new document has matured.
+    assert_equals(iframe.contentDocument.location.toString(), "about:blank");
+}, "contentDocument should only change after a load matures.");
+</script>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1-expected.txt (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1-expected.txt	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,4 @@
+
+
+PASS Frames with `allow-top-navigation` should be able to navigate the top frame. 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>Check that sandboxed iframe can perform navigation on the top frame
+           when allow-top-navigation is set</title>
+    <script src=""
+    <script src=""
+  </head>
+  <body>
+    <iframe sandbox="allow-top-navigation allow-scripts"></iframe>
+    <script>
+      if (opener) {
+        // We're the popup (i.e. a top frame).  Load into the iframe the page
+        // trying to modifying the top frame and transmit the result to our
+        // opener.
+        _onmessage_ = function(e) {
+          opener.postMessage(e.data, "*")
+        }
+        document.querySelector("iframe").src = ""
+      } else {
+        // We are the main test page.  Open ourselves as a popup, so that we can
+        // can experiment navigation of the top frame.
+        async_test(t => {
+          window.addEventListener("message", t.step_func_done(e => {
+            assert_equals(e.data, "can navigate");
+            e.source.close();
+          }));
+          window.open(location.href);
+        }, "Frames with `allow-top-navigation` should be able to navigate the top frame.");
+      }
+    </script>
+  </body>
+</html>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2-expected.txt (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2-expected.txt	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,8 @@
+CONSOLE MESSAGE: line 7: Unsafe _javascript_ attempt to initiate navigation for frame with URL 'http://localhost:8800/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html' from frame with URL 'http://localhost:8800/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html'. The frame attempting navigation of the top-level window is sandboxed, but the 'allow-top-navigation' flag is not set.
+
+
+
+Harness Error (TIMEOUT), message = null
+
+TIMEOUT Frames without `allow-top-navigation` should not be able to navigate the top frame. Test timed out
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>Check that sandboxed iframe cannot perform navigation on the top
+           frame when allow-top-navigation is not set</title>
+    <script src=""
+    <script src=""
+  </head>
+  <body>
+    <iframe sandbox="allow-scripts"></iframe>
+    <script>
+      if (opener) {
+        // We're the popup (i.e. a top frame).  Load into the iframe the page
+        // trying to modifying the top frame and transmit the result to our
+        // opener.
+        _onmessage_ = function(e) {
+          opener.postMessage(e.data, "*")
+        }
+        document.querySelector("iframe").src = ""
+      } else {
+        // We are the main test page.  Open ourselves as a popup, so that we can
+        // can experiment navigation of the top frame.
+        async_test(t => {
+          window.addEventListener("message", t.step_func_done(e => {
+            assert_equals(e.data, "cannot navigate");
+            e.source.close();
+          }));
+          window.open(location.href);
+        }, "Frames without `allow-top-navigation` should not be able to navigate the top frame.");
+      }
+    </script>
+  </body>
+</html>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1-expected.txt (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1-expected.txt	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,8 @@
+CONSOLE MESSAGE: line 6: Unsafe _javascript_ attempt to initiate navigation for frame with URL 'http://localhost:8800/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-its-child.html' from frame with URL 'http://localhost:8800/html/semantics/embedded-content/the-iframe-element/support/iframe-that-tries-to-navigate-parent-and-sends-result-to-grandparent.html'. The frame attempting navigation is sandboxed, and is therefore disallowed from navigating its ancestors.
+
+
+
+Harness Error (TIMEOUT), message = null
+
+NOTRUN Check that sandboxed iframe can not navigate their ancestors 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,12 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Check that sandboxed iframe can not navigate their ancestors</title>
+<script src=""
+<script src=""
+<script>
+  var t = async_test();
+  _onmessage_ = t.step_func_done(function(e) {
+    assert_equals(e.data, "can not navigate", "Should have the right message");
+  });
+</script>
+<iframe sandbox="allow-scripts" src=""

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2-expected.txt (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2-expected.txt	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,4 @@
+
+
+PASS Check that unsandboxed iframe can navigate their ancestors 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2.html (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2.html	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,12 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Check that unsandboxed iframe can navigate their ancestors</title>
+<script src=""
+<script src=""
+<script>
+  var t = async_test();
+  _onmessage_ = t.step_func_done(function(e) {
+    assert_equals(e.data, "can navigate", "Should have the right message");
+  });
+</script>
+<iframe src=""

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants-expected.txt (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants-expected.txt	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,4 @@
+
+
+PASS Check that sandboxed iframe can navigate their descendants 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants.html (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants.html	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,12 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Check that sandboxed iframe can navigate their descendants</title>
+<script src=""
+<script src=""
+<script>
+  var t = async_test();
+  _onmessage_ = t.step_func_done(function(e) {
+    assert_equals(e.data, "can navigate", "Should have the right message");
+  });
+</script>
+<iframe sandbox="allow-scripts" src=""

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself-expected.txt (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself-expected.txt	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,4 @@
+
+
+PASS Check that sandboxed iframe can navigate itself 
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself.html (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself.html	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,12 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Check that sandboxed iframe can navigate itself</title>
+<script src=""
+<script src=""
+<script>
+  var t = async_test();
+  _onmessage_ = t.step_func_done(function(e) {
+    assert_equals(e.data, "can navigate", "Should have the right message");
+  });
+</script>
+<iframe sandbox="allow-scripts" src=""

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script>
+window._onload_ = function() {
+  try {
+    top.location = "data:text/html,\u003c!DOCTYPE html\u003e\u003cscript\u003eopener.postMessage('can navigate', '*');\u003c/script\u003e";
+  } catch(e) {
+    top.postMessage("cannot navigate", "*");
+  }
+}
+</script>
+</body>
+</html>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-tries-to-navigate-parent-and-sends-result-to-grandparent.html (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-tries-to-navigate-parent-and-sends-result-to-grandparent.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-tries-to-navigate-parent-and-sends-result-to-grandparent.html	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<p>This is a frame that tries to navigate its parent.</p>
+<script>
+window._onload_ = function() {
+  try {
+    parent.location.href = "" html\u003e\u003cp\u003eIf this message appears, then this frame has been navigated by its child.\u003c/p\u003e\u003cscript\u003eparent.postMessage('can navigate', '*');\u003c/script\u003e";
+  } catch(e) {
+    parent.parent.postMessage("can not navigate", "*");
+  }
+}
+</script>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-its-child.html (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-its-child.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-its-child.html	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<p>If this message appears, then this frame has not been navigated by its child.</p>
+<iframe src=""
+</iframe>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-its-child.html (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-its-child.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-its-child.html	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<iframe src="" this message appears, then this frame has not been navigated by its parent."></iframe>
+<script>
+window._onload_ = function() {
+  try {
+    document.querySelector("iframe").contentWindow.location.href = "" html\u003e\u003cp\u003eIf this message appears, then this frame has been navigated by its parent.\u003c/p\u003e\u003cscript\u003eparent.parent.postMessage('can navigate', '*');\u003c/script\u003e";
+  } catch(e) {
+    parent.postMessage("can not navigate", "*");
+  }
+}
+</script>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-itself.html (0 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-itself.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-itself.html	2017-06-21 17:08:02 UTC (rev 218639)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<p>If this message appears, then this frame has not been navigated.</p>
+<script>
+window._onload_ = function() {
+  try {
+    location.href = "" html\u003e\u003cp\u003eIf this message appears, then this frame has been navigated.\u003c/p\u003e\u003cscript\u003eparent.postMessage('can navigate', '*');\u003c/script\u003e";
+  } catch(e) {
+    parent.postMessage("can not navigate", "*");
+  }
+}
+</script>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log (218638 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log	2017-06-21 17:05:28 UTC (rev 218638)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log	2017-06-21 17:08:02 UTC (rev 218639)
@@ -15,7 +15,12 @@
 ------------------------------------------------------------------------
 List of files:
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/blank.htm
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-without-user-gesture-failed.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-tries-to-navigate-parent-and-sends-result-to-grandparent.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-its-child.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-its-child.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-itself.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/navigation-changed-iframe.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/sandbox_allow_script.html

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log (218638 => 218639)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log	2017-06-21 17:05:28 UTC (rev 218638)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log	2017-06-21 17:08:02 UTC (rev 218639)
@@ -17,6 +17,7 @@
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/change_child.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/change_grandchild.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/change_parentage.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_child.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_grandchild.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/cross_origin_parentage.html
@@ -30,7 +31,13 @@
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_harness.js
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_javascript_url_01.htm
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation_without_user_gesture.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to