| 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 language="JavaScript" type="text/javascript"> | 7 <script language="JavaScript" type="text/javascript"> |
| 8 var resetWidth; | 8 var resetWidth; |
| 9 var resetHeight; | 9 var resetHeight; |
| 10 var resetX; | 10 var resetX; |
| 11 var resetY; | 11 var resetY; |
| 12 | 12 |
| 13 var width = 100; | 13 var width = 100; |
| 14 var height = 200; | 14 var height = 200; |
| 15 var x = 25; | 15 var x = 25; |
| 16 var y = 50; | 16 var y = 50; |
| 17 | 17 |
| 18 function reset() | 18 function reset() |
| 19 { | 19 { |
| 20 window.moveTo(0, 0); | 20 window.moveTo(screen.availLeft + 100, screen.availTop + 100); |
| 21 window.resizeTo(300, 200); | 21 window.resizeTo(300, 200); |
| 22 resetWidth = window.outerWidth; | 22 resetWidth = window.outerWidth; |
| 23 resetHeight = window.outerHeight; | 23 resetHeight = window.outerHeight; |
| 24 resetX = window.screenX; | 24 resetX = window.screenX; |
| 25 resetY = window.screenY; | 25 resetY = window.screenY; |
| 26 } | 26 } |
| 27 | 27 |
| 28 if (window.testRunner) | 28 if (window.testRunner) |
| 29 testRunner.dumpAsText(); | 29 testRunner.dumpAsText(); |
| 30 | 30 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 reset(); | 80 reset(); |
| 81 | 81 |
| 82 | 82 |
| 83 // moveTo ///////////////////////// | 83 // moveTo ///////////////////////// |
| 84 debug(''); | 84 debug(''); |
| 85 debug('window.moveTo Tests'); | 85 debug('window.moveTo Tests'); |
| 86 debug(''); | 86 debug(''); |
| 87 | 87 |
| 88 debug("Testing - moveTo with 0 arguments"); | 88 debug("Testing - moveTo with 0 arguments"); |
| 89 window.moveTo(); | 89 window.moveTo(); |
| 90 shouldBe('window.screenX', 'screen.availLeft'); | 90 shouldBe('window.screenX', 'resetX'); |
| 91 shouldBe('window.screenY', 'screen.availTop'); | 91 shouldBe('window.screenY', 'resetY'); |
| 92 reset(); | 92 reset(); |
| 93 | 93 |
| 94 debug("Testing - moveTo with 1 argument"); | 94 debug("Testing - moveTo with 1 argument"); |
| 95 window.moveTo(x); | 95 window.moveTo(x); |
| 96 shouldBe('window.screenX', 'Math.max(x, screen.availLeft)'); | 96 shouldBe('window.screenX', 'Math.max(x, screen.availLeft)'); |
| 97 shouldBe('window.screenY', 'screen.availTop'); | 97 shouldBe('window.screenY', 'resetY'); |
| 98 reset(); | 98 reset(); |
| 99 | 99 |
| 100 debug("Testing - moveTo with more than 2 arguments"); | 100 debug("Testing - moveTo with more than 2 arguments"); |
| 101 window.moveTo(x, y, 200, "text"); | 101 window.moveTo(x, y, 200, "text"); |
| 102 shouldBe('window.screenX', 'Math.max(x, screen.availLeft)'); | 102 shouldBe('window.screenX', 'Math.max(x, screen.availLeft)'); |
| 103 shouldBe('window.screenY', 'Math.max(y, screen.availTop)'); | 103 shouldBe('window.screenY', 'Math.max(y, screen.availTop)'); |
| 104 reset(); | 104 reset(); |
| 105 | 105 |
| 106 | 106 |
| 107 | 107 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 122 shouldBe('window.screenY', 'resetY'); | 122 shouldBe('window.screenY', 'resetY'); |
| 123 reset(); | 123 reset(); |
| 124 | 124 |
| 125 debug("Testing - moveBy with more than 2 arguments"); | 125 debug("Testing - moveBy with more than 2 arguments"); |
| 126 window.moveBy(x, y, 200, "text"); | 126 window.moveBy(x, y, 200, "text"); |
| 127 shouldBe('window.screenX', 'resetX + x'); | 127 shouldBe('window.screenX', 'resetX + x'); |
| 128 shouldBe('window.screenY', 'resetY + y'); | 128 shouldBe('window.screenY', 'resetY + y'); |
| 129 </script> | 129 </script> |
| 130 </body> | 130 </body> |
| 131 </html> | 131 </html> |
| OLD | NEW |