Index: third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..74c7a1ee2407d9b8dfe5b6a7c842578e29b85275 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation.html |
@@ -0,0 +1,20 @@ |
+<html> |
+<head> |
+ <script> |
+ function performTest() |
+ { |
+ try { |
+ top.location = "navigation-changed-iframe.html"; |
+ } catch(e) { |
+ top.postMessage("BLOCKED", "*"); |
+ } |
+ } |
+ </script> |
+</head> |
+<body onload="performTest();"> |
+ <p>This doc tried to navigate the top page when loaded, which should fail since it's not trigged by user activation while in a sandboxed frame with 'allow-top-navigtaion-by-user-activation'. <br> <br> |
+ If you click the button below, the top navigation should succeed with the new page saying "PASSED: Navigation succeeded.". |
+ </p> |
+ <button id="b" onclick="performTest();">Navigate the top page</button> |
+</body> |
+</html> |