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

Side by Side Diff: LayoutTests/fast/frames/sandboxed-iframe-scripting-02.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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <script> 5 <script>
6 window.jsTestIsAsync = true; 6 window.jsTestIsAsync = true;
7 7
8 var allowedExecuted = 0; 8 var allowedExecuted = 0;
9 var disallowedExecuted = 0; 9 var disallowedExecuted = 0;
10 window.addEventListener('message', function () { 10 window.addEventListener('message', function () {
11 allowedExecuted++; 11 allowedExecuted++;
12 12
13 finish(); 13 finish();
14 }); 14 });
15 15
16 function finish() { 16 function finish() {
17 shouldBe("disallowedExecuted", "0"); 17 shouldBe("disallowedExecuted", "0");
18 shouldBe("allowedExecuted", "1"); 18 shouldBe("allowedExecuted", "1");
19 19
20 finishJSTest(); 20 finishJSTest();
21 }; 21 };
22 </script> 22 </script>
23 </head> 23 </head>
24 <body> 24 <body>
25 <iframe sandbox="allow-same-origin allow-scripts" 25 <iframe sandbox="allow-same-origin allow-scripts"
26 src="data:text/html,<script>alert('PASS: Executed script in data URL ');window.parent.postMessage({'pass': true}, '*');</script>"> 26 src="data:text/html,<script>console.log('PASS: Executed script in da ta URL');window.parent.postMessage({'pass': true}, '*');</script>">
27 </iframe> 27 </iframe>
28 <script> 28 <script>
29 description("Verify that sandboxed frames with sandbox='allow-scripts' c an execute script from data: URLs."); 29 description("Verify that sandboxed frames with sandbox='allow-scripts' c an execute script from data: URLs.");
30 </script> 30 </script>
31 </body> 31 </body>
32 </html> 32 </html>
33 33
34 34
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698