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

Side by Side Diff: LayoutTests/http/tests/security/sandbox-iframe-blocks-modals.html

Issue 1126253007: Block modal dialogs inside sandboxes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: WebSandboxFlags. Created 5 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="Content-Security-Policy" content="sandbox allow-scripts">
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <script>
10 test(function () {
11 var result = alert("Yay!");
12 assert_equals(result, undefined);
13 }, "alert() returns synchronously in a sandboxed page without blocking o n user input.");
14
15 test(function () {
16 var result = print();
17 assert_equals(result, undefined);
18 }, "print() returns synchronously in a sandboxed page without blocking o n user input.");
19
20 test(function () {
21 var result = confirm("Question?");
22 assert_equals(result, false);
23 }, "confirm() returns 'false' synchronously in a sandboxed page without blocking on user input.");
24
25 test(function () {
26 var result = prompt("Question?");
27 assert_equals(result, null);
28 }, "prompt() returns 'null' synchronously in a sandboxed page without bl ocking on user input.");
29 </script>
30 </body>
31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698