Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation.html

Issue 2713283002: Turn on the flag for 'allow-top-navigation-by-user-activation'. (Closed)
Patch Set: Refine the error message for blocked navigation within sandboxed iframe. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 function performTest() 4 function performTest()
5 { 5 {
6 try { 6 try {
7 top.location = "navigation-changed-iframe.html"; 7 top.location = "navigation-changed-iframe.html";
8 } catch(e) { 8 } catch(e) {
9 top.postMessage("BLOCKED", "*"); 9 top.postMessage("BLOCKED", "*");
10 } 10 }
11 } 11 }
12 </script> 12 </script>
13 </head> 13 </head>
14 <body onload="performTest();"> 14 <body onload="performTest();">
15 <p>This doc tried to navigate the top page when loaded, which should fail si nce it's not trigged by user activation while in a sandboxed frame with 'allow-t op-navigtaion-by-user-activation'. <br> <br> 15 <p>This doc tried to navigate the top page when loaded, which should fail si nce it's not trigged by user activation while in a sandboxed frame with 'allow-t op-navigtaion-by-user-activation'. <br> <br>
16 If you click the button below, the top navigation should succeed with the ne w page saying "PASSED: Navigation succeeded.". 16 Click the button below, the top navigation should succeed with a new page sa ying "PASSED: Navigation succeeded." in browsers supporting the 'allow-top-navig taion-by-user-activation' iframe@sandbox keyword (eg., Chrome v58+); Otherwise, the top navigation should fail.
17 </p> 17 </p>
18 <button id="b" onclick="performTest();">Navigate the top page</button> 18 <button id="b" onclick="performTest();">Navigate the top page</button>
19 </body> 19 </body>
20 </html> 20 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698