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

Side by Side Diff: LayoutTests/http/tests/security/isolatedWorld/sandboxed-iframe.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 <script> 3 <script>
4 function test() 4 function test()
5 { 5 {
6 if (window.testRunner) { 6 if (window.testRunner) {
7 testRunner.dumpAsText(); 7 testRunner.dumpAsText();
8 var frame = document.getElementById("frame"); 8 var frame = document.getElementById("frame");
9 frame.contentWindow.focus(); 9 frame.contentWindow.focus();
10 testRunner.evaluateScriptInIsolatedWorld(1, "alert('PASS');"); 10 testRunner.evaluateScriptInIsolatedWorld(1, "console.log('PASS');");
11 } else { 11 } else {
12 var msg = document.createElement("p"); 12 var msg = document.createElement("p");
13 msg.innerText = "FAIL: Test requires testRunner to run."; 13 msg.innerText = "FAIL: Test requires testRunner to run.";
14 document.body.appendChild(msg); 14 document.body.appendChild(msg);
15 } 15 }
16 } 16 }
17 </script> 17 </script>
18 <body onload="test()"> 18 <body onload="test()">
19 <p> 19 <p>
20 Test that executing scripts in an isolated world works even inside sandboxed 20 Test that executing scripts in an isolated world works even inside sandboxed
21 iframes. The test passes, if an alert with the text "PASS" is shown. 21 iframes. The test passes, if an alert with the text "PASS" is shown.
22 </p> 22 </p>
23 <iframe id="frame" src="resources/fail.html" sandbox="allow-same-origin"></ifram e> 23 <iframe id="frame" src="resources/fail.html" sandbox="allow-same-origin"></ifram e>
24 </body> 24 </body>
25 </html> 25 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698