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

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

Issue 2645733002: Add an 'allow-top-navigation-with-user-interaction' sandbox flag. (Closed)
Patch Set: Fix the tests finally! Created 3 years, 11 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
(Empty)
1 <html>
2 <head>
3 <script>
4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.dumpChildFramesAsText();
7 testRunner.setDumpConsoleMessages(true);
8 testRunner.waitUntilDone();
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>
18 </head>
19 <body>
20 <p>This tests that an iframe in sandbox with 'allow-top-navigation-with-user -activation'
21 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>
23 </body>
24 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698