Title: [219395] trunk/LayoutTests/imported/w3c
- Revision
- 219395
- Author
- [email protected]
- Date
- 2017-07-12 08:47:33 -0700 (Wed, 12 Jul 2017)
Log Message
Import test verifying combination of allow-top-navigation and allow-top-navigation-by-user-activation
https://bugs.webkit.org/show_bug.cgi?id=174351
Patch by Frederic Wang <[email protected]> on 2017-07-12
Reviewed by Youenn Fablet.
This imports a test to verify that the combination of the allow-top-navigation and
allow-top-navigation-by-user-activation flags is just treated as allow-top-navigation.
For now the expectation contains a parsing error message which will be removed when bug
171327 is fixed.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log:
Add the new test.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html: Added.
This is imported from the W3C repository.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3-expected.txt: Added.
The test passes, even if for now the 'allow-top-navigation-by-user-activation' triggers a
parsing error message in the console.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (219394 => 219395)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2017-07-12 15:37:52 UTC (rev 219394)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2017-07-12 15:47:33 UTC (rev 219395)
@@ -1,3 +1,23 @@
+2017-07-12 Frederic Wang <[email protected]>
+
+ Import test verifying combination of allow-top-navigation and allow-top-navigation-by-user-activation
+ https://bugs.webkit.org/show_bug.cgi?id=174351
+
+ Reviewed by Youenn Fablet.
+
+ This imports a test to verify that the combination of the allow-top-navigation and
+ allow-top-navigation-by-user-activation flags is just treated as allow-top-navigation.
+ For now the expectation contains a parsing error message which will be removed when bug
+ 171327 is fixed.
+
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log:
+ Add the new test.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html: Added.
+ This is imported from the W3C repository.
+ * web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3-expected.txt: Added.
+ The test passes, even if for now the 'allow-top-navigation-by-user-activation' triggers a
+ parsing error message in the console.
+
2017-07-10 Javier Fernandez <[email protected]>
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3-expected.txt (0 => 219395)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3-expected.txt 2017-07-12 15:47:33 UTC (rev 219395)
@@ -0,0 +1,6 @@
+CONSOLE MESSAGE: line 15: Error while parsing the 'sandbox' attribute: 'allow-top-navigation-by-user-activation' is an invalid sandbox flag.
+CONSOLE MESSAGE: line 15: Error while parsing the 'sandbox' attribute: 'allow-top-navigation-by-user-activation' is an invalid sandbox flag.
+
+
+PASS Frames with `allow-top-navigation` should be able to navigate the top frame even when `allow-top-navigation-by-user-activation` is set.
+
Property changes on: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3-expected.txt
___________________________________________________________________
Added: svn:eol-style
+LF
\ No newline at end of property
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html (0 => 219395)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html 2017-07-12 15:47:33 UTC (rev 219395)
@@ -0,0 +1,38 @@
+<!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 (even when
+ allow-top-navigation-by-user-activation is set)</title>
+ <script src=""
+ <script src=""
+ </head>
+ <body>
+ <!-- Specifying both allow-top-navigation and
+ allow-top-navigation-by-user-activation is a document conformance
+ error: allow-top-navigation-by-user-activation will have no effect. -->
+ <iframe sandbox="allow-top-navigation allow-top-navigation-by-user-activation 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 even when `allow-top-navigation-by-user-activation` is set.");
+ }
+ </script>
+ </body>
+</html>
Property changes on: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html
___________________________________________________________________
Added: svn:eol-style
+LF
\ No newline at end of property
Added: svn:mime-type
+text/html
\ No newline at end of property
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log (219394 => 219395)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log 2017-07-12 15:37:52 UTC (rev 219394)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log 2017-07-12 15:47:33 UTC (rev 219395)
@@ -33,6 +33,7 @@
/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-3.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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes