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

Side by Side Diff: LayoutTests/http/tests/history/resources/cross-origin-replaces-history-object-iframe.html

Issue 19932002: Throw exceptions on all failed cross-origin access checks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test. Created 7 years, 5 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 <html> 1 <html>
2 <script> 2 <script>
3 if (window.testRunner) 3 if (window.testRunner)
4 testRunner.dumpAsText(); 4 testRunner.dumpAsText();
5 5
6 window.onmessage = function(evt) 6 window.onmessage = function(evt)
7 { 7 {
8 if (evt.data == "setHistoryLength") { 8 if (evt.data == "setHistoryLength") {
9 setHistoryLength(); 9 setHistoryLength();
10 return; 10 return;
11 } else 11 } else
12 alert("Unknown message."); 12 alert("Unknown message.");
13 } 13 }
14 14
15 function setHistoryLength() 15 function setHistoryLength()
16 { 16 {
17 alert("Attempting to clear parent window's history object:"); 17 alert("Attempting to clear parent window's history object:");
18 parent.window.history = ""; 18 try {
19 parent.window.history = "";
20 } catch (e) {
21 alert("PASS: access to parent.window.history threw an exception.");
22 }
19 parent.window.postMessage("done", "*"); 23 parent.window.postMessage("done", "*");
20 } 24 }
21 25
22 </script> 26 </script>
23 <body> 27 <body>
24 HELLO THERE 28 HELLO THERE
25 </body> 29 </body>
26 </html> 30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698