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 </head> | 5 </head> |
6 <script> | 6 <script> |
7 description("Accessing FileReader when in a detached state."); | 7 description("Accessing FileReader when in a detached state."); |
8 | 8 |
9 window.jsTestIsAsync = true; | 9 window.jsTestIsAsync = true; |
10 | 10 |
11 var w; | 11 var w; |
12 var fileReader; | 12 var fileReader; |
13 function processMessage(event) { | 13 function processMessage(event) { |
14 if (event.data == "opened") { | 14 if (event.data == "opened") { |
15 fileReader = new w.FileReader(); | 15 fileReader = new w.FileReader(); |
16 w.close(); | 16 w.close(); |
17 } else if (event.data == "closed") { | 17 } else if (event.data == "closed") { |
18 shouldThrow("fileReader.readAsArrayBuffer(new File(['hello'], 'world.htm
l'))"); | 18 shouldThrow("fileReader.readAsArrayBuffer(new File(['hello'], 'world.htm
l'))"); |
19 finishJSTest(); | 19 finishJSTest(); |
20 } | 20 } |
21 } | 21 } |
22 | 22 |
23 if (window.testRunner) { | 23 if (window.testRunner) { |
24 testRunner.dumpAsText(); | 24 testRunner.dumpAsText(); |
25 testRunner.setCanOpenWindows(); | 25 testRunner.setCanOpenWindows(); |
26 } | 26 } |
27 w = window.open('resources/file-reader-detached-no-crash-new-window.html'); | 27 w = window.open('../../resources/window-postmessage-open-close.html'); |
28 window.addEventListener("message", processMessage, false); | 28 window.addEventListener("message", processMessage, false); |
29 </script> | 29 </script> |
30 </body> | 30 </body> |
OLD | NEW |