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

Side by Side Diff: LayoutTests/http/tests/inspector/console-cross-origin-iframe-logging.html

Issue 19095003: Throw 'SecurityError' upon cross-origin Location access. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaseline. 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 <head> 2 <head>
3 <script src="inspector-test.js"></script> 3 <script src="inspector-test.js"></script>
4 <script src="console-test.js"></script> 4 <script src="console-test.js"></script>
5 <script> 5 <script>
6 function accessFrame() 6 function accessFrame()
7 { 7 {
8 // Should fail. 8 // Should fail.
9 var host = frames[0].location.host; 9 try {
10 var host = frames[0].location.host;
11 } catch (e) {}
10 12
11 // Should fail. 13 // Should fail.
12 frames[0].location.reload(); 14 try {
15 frames[0].location.reload();
16 } catch (e) {}
13 17
14 // Should fail. 18 // Should fail.
15 frames[0].postMessage("fail", "http://127.0.0.1:8000"); 19 frames[0].postMessage("fail", "http://127.0.0.1:8000");
16 } 20 }
17 21
18 function test() 22 function test()
19 { 23 {
20 var finishAttemptsLeft = 4; 24 var finishAttemptsLeft = 4;
21 InspectorTest.addConsoleSniffer(maybeFinish, true); 25 InspectorTest.addConsoleSniffer(maybeFinish, true);
22 ConsoleAgent.setMonitoringXHREnabled(true, step1); 26 ConsoleAgent.setMonitoringXHREnabled(true, step1);
(...skipping 18 matching lines...) Expand all
41 InspectorTest.completeTest(); 45 InspectorTest.completeTest();
42 } 46 }
43 } 47 }
44 </script> 48 </script>
45 </head> 49 </head>
46 <body onload="runTest()"> 50 <body onload="runTest()">
47 <p>Tests that cross origin errors are logged with source url and line number.</p > 51 <p>Tests that cross origin errors are logged with source url and line number.</p >
48 <iframe src="http://localhost:8000/inspector/resources/cross-origin-iframe.html" ></iframe> 52 <iframe src="http://localhost:8000/inspector/resources/cross-origin-iframe.html" ></iframe>
49 </body> 53 </body>
50 </html> 54 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698