OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
2 <head> | |
3 <script> | |
4 if (window.testRunner) { | |
arv (Not doing code reviews)
2013/08/14 13:43:03
Can you just use js-test-pre/post instead?
Use mkwst_at_chromium.org plz.
2013/08/14 13:57:21
Not without modifying it to support a document wit
| |
5 testRunner.dumpAsText(); | |
6 testRunner.dumpChildFramesAsText(); | |
7 testRunner.waitUntilDone(); | |
8 } | |
9 | |
10 window.addEventListener('message', function() { | |
11 runTest(); | |
12 if (window.testRunner) | |
13 testRunner.notifyDone(); | |
14 }); | |
15 | |
16 window.onerror = function (msg) { | |
17 var jsErrorMessage = 'Uncaught SecurityError: Blocked a frame with o rigin "http://127.0.0.1:8000" from accessing a cross-origin frame.'; | |
18 if (msg == jsErrorMessage) | |
19 console.log("PASS: Exception was '" + msg + "'."); | |
20 else | |
21 console.log("FAIL: Exception should have been '" + jsErrorMessag e + "', was '" + msg + "'."); | |
22 | |
23 if (window.testRunner) | |
24 setTimeout(testRunner.notifyDone.bind(testRunner), 0); | |
25 | |
26 return false; // Don't handle the exception to ensure it shows up in the console. | |
27 }; | |
28 | |
29 runTest = function() | |
arv (Not doing code reviews)
2013/08/14 13:43:03
function runTest() {
Use mkwst_at_chromium.org plz.
2013/08/14 13:57:21
Done.
| |
30 { | |
31 var frame = document.getElementById('aFrame'); | |
32 frame.location = 'javascript:"FAIL: this should not have been loaded ."'; | |
33 } | |
34 </script> | |
35 </head> | |
36 <frameset rows="10%,*"> | |
37 <frame id='main' src="data:text/html,<p>This test passes as long as the oner ror handler logs PASS to the console, and the uncaught exception reported to the console has unsanitized detail.</p>"> | |
38 <frame id='aFrame' src='http://localhost:8000/security/resources/cross-frame -iframe.html'> | |
39 </frameset> | |
40 </html> | |
OLD | NEW |