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 after a redirect. The test passes
if you don't see any data from the linked resource. <a href="https://bugs.webki
t.org/show_bug.cgi?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 after a redirect. The test passes
if you don't see any data from the linked resource. <a href="https://bugs.webki
t.org/show_bug.cgi?id=52903">Bug 52903.</a> |
5 </p> | 5 </p> |
6 <div id="result"></div> | 6 <div id="result"></div> |
7 <script> | 7 <script> |
8 if (window.layoutTestController) { | 8 if (window.layoutTestController) { |
9 layoutTestController.waitUntilDone(); | 9 layoutTestController.waitUntilDone(); |
10 layoutTestController.dumpAsText(); | 10 layoutTestController.dumpAsText(); |
11 } | 11 } |
12 | 12 |
13 window.onerror = function(message, url, line) { | 13 window.onerror = function(message, url, line) { |
14 document.getElementById("result").textContent = "window.onerror message: " + m
essage + " at " + url + ": " + line; | 14 document.getElementById("result").textContent = "window.onerror message: " + m
essage + " at " + url + ": " + line; |
15 if (window.layoutTestController) | 15 if (window.layoutTestController) |
16 layoutTestController.notifyDone(); | 16 layoutTestController.notifyDone(); |
17 return false; | 17 return false; |
18 } | 18 } |
19 </script> | 19 </script> |
20 <script src="resources/redir.php?url=http://localhost:8000/security/resources/cr
oss-origin-script.txt"> | 20 <script src="resources/redir.php?url=http://localhost:8000/security/resources/cr
oss-origin-script.txt"> |
21 </script> | 21 </script> |
22 </body> | 22 </body> |
23 </html> | 23 </html> |
OLD | NEW |