OLD | NEW |
1 <html> | 1 <html> |
2 <body> | 2 <body> |
3 <p> | 3 <p> |
4 Test that window.onerror won't reveal any potentially sensitive script content i
f the latter is loaded from a different domain. The test passes if you don't see
any data from the linked resource. <a href="https://bugs.webkit.org/show_bug.cg
i?id=52903">Bug 52903.</a> | 4 Test that window.onerror won't reveal any potentially sensitive script content i
f the latter is loaded from a different domain. The test passes if you don't see
any data from the linked resource. <a href="https://bugs.webkit.org/show_bug.cg
i?id=52903">Bug 52903.</a> |
5 </p> | 5 </p> |
6 | 6 |
7 </p> | 7 </p> |
8 <div id="result"></div> | 8 <div id="result"></div> |
9 <script> | 9 <script> |
10 if (window.layoutTestController) { | 10 if (window.layoutTestController) { |
11 layoutTestController.waitUntilDone(); | 11 layoutTestController.waitUntilDone(); |
12 layoutTestController.dumpAsText(); | 12 layoutTestController.dumpAsText(); |
13 } | 13 } |
14 | 14 |
15 window.onerror = function(message, url, line) { | 15 window.onerror = function(message, url, line) { |
16 document.getElementById("result").textContent = "window.onerror message: " + m
essage + " at " + url + ": " + line; | 16 document.getElementById("result").textContent = "window.onerror message: " + m
essage + " at " + url + ": " + line; |
17 if (window.layoutTestController) | 17 if (window.layoutTestController) |
18 layoutTestController.notifyDone(); | 18 layoutTestController.notifyDone(); |
19 return false; | 19 return false; |
20 } | 20 } |
21 </script> | 21 </script> |
22 <script src="http://localhost:8000/security/resources/cross-origin-script.txt"> | 22 <script src="http://localhost:8000/security/resources/cross-origin-script.txt"> |
23 </script> | 23 </script> |
24 </body> | 24 </body> |
25 </html> | 25 </html> |
OLD | NEW |