| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script> | 7 <script> |
| 8 description("Tests that manipulating location properties in a just-created windo
w object does not crash. Note: Turn off pop-up blocking to run this in-browser."
); | 8 description("Tests that manipulating location properties in a just-created windo
w object does not crash. Note: Turn off pop-up blocking to run this in-browser."
); |
| 9 | 9 |
| 10 if (window.testRunner) { | 10 if (window.testRunner) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 shouldBe("testWindow.location.hostname = 'd'", "'d'"); // Firefox throws an exce
ption | 34 shouldBe("testWindow.location.hostname = 'd'", "'d'"); // Firefox throws an exce
ption |
| 35 shouldBe("testWindow.location.port = 'e'", "'e'"); // Firefox throws an exceptio
n | 35 shouldBe("testWindow.location.port = 'e'", "'e'"); // Firefox throws an exceptio
n |
| 36 shouldBe("testWindow.location.pathname = 'f'", "'f'"); // Firefox throws an exce
ption | 36 shouldBe("testWindow.location.pathname = 'f'", "'f'"); // Firefox throws an exce
ption |
| 37 shouldBe("testWindow.location.search = 'g'", "'g'"); | 37 shouldBe("testWindow.location.search = 'g'", "'g'"); |
| 38 shouldBe("testWindow.location.hash = 'h'", "'h'"); | 38 shouldBe("testWindow.location.hash = 'h'", "'h'"); |
| 39 | 39 |
| 40 shouldBe("testWindow.location.assign('data:text/plain,i')", "undefined"); | 40 shouldBe("testWindow.location.assign('data:text/plain,i')", "undefined"); |
| 41 shouldBe("testWindow.location.replace('data:text/plain,j')", "undefined"); | 41 shouldBe("testWindow.location.replace('data:text/plain,j')", "undefined"); |
| 42 shouldBe("testWindow.location.reload()", "undefined"); | 42 shouldBe("testWindow.location.reload()", "undefined"); |
| 43 | 43 |
| 44 shouldBe("testWindow.location.toString()", "'about:blank'"); | 44 shouldBe("testWindow.location.toString()", "'about:blank#h'"); |
| 45 shouldBe("testWindow.location.href", "'about:blank'"); | 45 shouldBe("testWindow.location.href", "'about:blank#h'"); |
| 46 shouldBe("testWindow.location.protocol", "'about:'"); | 46 shouldBe("testWindow.location.protocol", "'about:'"); |
| 47 shouldBe("testWindow.location.host", "''"); // Firefox throws an exception | 47 shouldBe("testWindow.location.host", "''"); // Firefox throws an exception |
| 48 shouldBe("testWindow.location.hostname", "''"); // Firefox throws an exception | 48 shouldBe("testWindow.location.hostname", "''"); // Firefox throws an exception |
| 49 shouldBe("testWindow.location.port", "''"); | 49 shouldBe("testWindow.location.port", "''"); |
| 50 shouldBe("testWindow.location.pathname", "'blank'"); // Firefox returns the empt
y string | 50 shouldBe("testWindow.location.pathname", "'blank'"); // Firefox returns the empt
y string |
| 51 shouldBe("testWindow.location.search", "''"); | 51 shouldBe("testWindow.location.search", "''"); |
| 52 shouldBe("testWindow.location.hash", "''"); | 52 shouldBe("testWindow.location.hash", "'#h'"); |
| 53 | 53 |
| 54 testWindow.close(); | 54 testWindow.close(); |
| 55 | 55 |
| 56 if (window.testRunner) { | 56 if (window.testRunner) { |
| 57 function doneHandler() | 57 function doneHandler() |
| 58 { | 58 { |
| 59 if (testWindow.closed) { | 59 if (testWindow.closed) { |
| 60 testRunner.notifyDone(); | 60 testRunner.notifyDone(); |
| 61 return; | 61 return; |
| 62 } | 62 } |
| 63 setTimeout(doneHandler, 0); | 63 setTimeout(doneHandler, 0); |
| 64 } | 64 } |
| 65 doneHandler(); | 65 doneHandler(); |
| 66 } | 66 } |
| 67 </script> | 67 </script> |
| 68 </body> | 68 </body> |
| 69 </html> | 69 </html> |
| OLD | NEW |