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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/sandbox-DENIED-top-navigation-without-user-gesture.html

Issue 2696703010: Rename the flag of 'allow-top-navigation-with-user-activation' to 'allow-top-navigation-by-user-act… (Closed)
Patch Set: Add the *-with-two-flags-expected.txt that I forgot previously. Created 3 years, 10 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 <!doctype html>
1 <html> 2 <html>
2 <head> 3 <head>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
3 <script> 6 <script>
4 if (window.testRunner) { 7 async_test(function(t) {
5 testRunner.dumpAsText(); 8 window.addEventListener("message", t.step_func_done(function(e) {
6 testRunner.dumpChildFramesAsText(); 9 assert_equals(e.data, "PASS", "The message should say 'PASS' instead of 'F AIL'");
7 testRunner.setDumpConsoleMessages(false); 10 }));
8 testRunner.waitUntilDone(); 11 }, "The sandboxed iframe should post a message saying the test was in the state of 'PASS'.");
9 }
10
11 window.addEventListener("message", e => {
12 if (e.data == "PASS")
13 testRunner.notifyDone();
14 else
15 testRunner.testFailed("'top.location' didn't throw.");
16 });
17 </script> 12 </script>
18 </head> 13 </head>
19 <body> 14 <body>
20 <p>This tests that an iframe in sandbox with 'allow-top-navigation-with-user -activation' 15 <p>This tests that an iframe in sandbox with 'allow-top-navigation-by-user-a ctivation'
21 cannot navigate its top level page, if it is not trigged by a user gesture.< /p> 16 cannot navigate its top level page, if it is not trigged by a user gesture.< /p>
22 <iframe sandbox='allow-top-navigation-with-user-activation allow-scripts' sr c="http://localhost:8000/security/frameNavigation/resources/iframe-that-performs -top-navigation-without-user-gesture-failed.html"></iframe> 17 <iframe sandbox='allow-top-navigation-by-user-activation allow-scripts' src= "resources/iframe-that-performs-top-navigation-without-user-gesture-failed.html" ></iframe>
23 </body> 18 </body>
24 </html> 19 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698