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

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

Issue 19564003: Populate cross-origin location access SecurityError messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/console-cross-origin-iframe-logging-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 try { 9 try {
10 var host = frames[0].location.host; 10 var host = frames[0].location.host;
11 } catch (e) {} 11 } catch (e) {}
12 12
13 // Should fail. 13 // Should fail.
14 try { 14 try {
15 frames[0].location.reload(); 15 frames[0].location.reload();
16 } catch (e) {} 16 } catch (e) {}
17 17
18 // Should fail. 18 // Should fail.
19 frames[0].postMessage("fail", "http://127.0.0.1:8000"); 19 frames[0].postMessage("fail", "http://127.0.0.1:8000");
20 } 20 }
21 21
22 function test() 22 function test()
23 { 23 {
24 var finishAttemptsLeft = 4; 24 var finishAttemptsLeft = 2;
25 InspectorTest.addConsoleSniffer(maybeFinish, true); 25 InspectorTest.addConsoleSniffer(maybeFinish, true);
26 ConsoleAgent.setMonitoringXHREnabled(true, step1); 26 ConsoleAgent.setMonitoringXHREnabled(true, step1);
27 27
28 function step1() 28 function step1()
29 { 29 {
30 InspectorTest.evaluateInPage("accessFrame()", maybeFinish); 30 InspectorTest.evaluateInPage("accessFrame()", maybeFinish);
31 } 31 }
32 32
33 function maybeFinish() 33 function maybeFinish()
34 { 34 {
(...skipping 10 matching lines...) Expand all
45 InspectorTest.completeTest(); 45 InspectorTest.completeTest();
46 } 46 }
47 } 47 }
48 </script> 48 </script>
49 </head> 49 </head>
50 <body onload="runTest()"> 50 <body onload="runTest()">
51 <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 >
52 <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>
53 </body> 53 </body>
54 </html> 54 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/console-cross-origin-iframe-logging-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698