Index: third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation-manual.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation-manual.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation-manual.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4bf8f5b312c4cd613556cece8eaec106255e14ac |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/external/wpt/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: 200px;} |
+ </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> |