OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <body> | 2 <body> |
3 <head> | 3 <head> |
4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
5 <script src="vibration-utils.js"></script> | 5 <script src="vibration-utils.js"></script> |
6 </head> | 6 </head> |
7 <script> | 7 <script> |
8 description("Accessing navigator.vibrate on a closed window."); | 8 description("Accessing navigator.vibrate on a closed window."); |
9 | 9 |
10 window.jsTestIsAsync = true; | 10 window.jsTestIsAsync = true; |
11 | 11 |
12 var w; | 12 var w; |
13 function processMessage(event) { | 13 function processMessage(event) { |
14 if (event.data == "opened") { | 14 if (event.data == "opened") { |
15 w.close(); | 15 w.close(); |
16 } else if (event.data == "closed") { | 16 } else if (event.data == "closed") { |
17 shouldBeFalse("w.navigator.vibrate([])"); | 17 shouldBeFalse("w.navigator.vibrate([])"); |
18 finishJSTest(); | 18 finishJSTest(); |
19 } | 19 } |
20 } | 20 } |
21 | 21 |
22 if (window.testRunner) { | 22 if (window.testRunner) { |
23 testRunner.dumpAsText(); | 23 testRunner.dumpAsText(); |
24 testRunner.setCanOpenWindows(); | 24 testRunner.setCanOpenWindows(); |
25 } | 25 } |
26 w = window.open('resources/vibration-detached-no-crash-new-window.html'); | 26 w = window.open('../resources/window-postmessage-open-close.html'); |
27 window.addEventListener("message", processMessage, false); | 27 window.addEventListener("message", processMessage, false); |
28 </script> | 28 </script> |
29 </body> | 29 </body> |
OLD | NEW |