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

Side by Side Diff: LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-allow-scripts-in-http-header.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 <iframe src="resources/sandbox.php?sandbox=allow-scripts"></iframe> 2 <iframe src="resources/sandbox.php?sandbox=allow-scripts"></iframe>
3 <script> 3 <script>
4 if (window.testRunner) 4 if (window.testRunner)
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 6
7 window.onload = function() { 7 window.onload = function() {
8 var frame = document.getElementsByTagName("iframe")[0]; 8 var frame = document.getElementsByTagName("iframe")[0];
9 try { 9 try {
10 var secret = frame.contentWindow.secret; 10 var secret = frame.contentWindow.secret;
11 alert("FAIL: Iframe was not in a unique origin: " + secret); 11 console.log("FAIL: Iframe was not in a unique origin: " + secret);
12 } catch (e) { 12 } catch (e) {
13 alert("PASS: Iframe was in a unique origin"); 13 console.log("PASS: Iframe was in a unique origin");
14 } 14 }
15 }; 15 };
16 </script> 16 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698