diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation-manual.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation-manual.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation-manual.html b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation-manual.html new file mode 100644 index 0000000000..0fa9de7c12 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation-manual.html @@ -0,0 +1,24 @@ +<html> +<head> + <style> + iframe { width: 400px; height: 300px;} + </style> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script> + setup({explicit_timeout: true}); + + async_test(function(t) { + window.addEventListener("message", t.step_func_done(function(e) { + assert_equals(e.data, "BLOCKED", "The message should say 'BLOCKED'."); + })); + }, "The sandboxed iframe should post a message saying the top navigation was blocked when no user gesture."); + </script> +</head> +<body> + <p>This tests that an iframe in sandbox with 'allow-top-navigation-by-user-activation' + can navigate the top level page, if it is trigged by a user gesture.</p> + <p>Click on the button in the iframe and it should navigate the top page.</p> + <iframe id="i" sandbox="allow-scripts allow-top-navigation-by-user-activation" src="support/iframe-that-performs-top-navigation.html"></iframe> +</body> +</html> |