| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
| 5 <title>FileAPI Test: filereader_readAsText</title> | 5 <title>FileAPI Test: filereader_readAsText</title> |
| 6 <link rel="author" title="Intel" href="http://www.intel.com"> | 6 <link rel="author" title="Intel" href="http://www.intel.com"> |
| 7 <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#readAsDataText
"> | 7 <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#readAsDataText
"> |
| 8 <script src="../../../../resources/testharness.js"></script> | 8 <script src="/resources/testharness.js"></script> |
| 9 <script src="../../../../resources/testharnessreport.js"></script> | 9 <script src="/resources/testharnessreport.js"></script> |
| 10 </head> | 10 </head> |
| 11 <body> | 11 <body> |
| 12 <div id="log"></div> | 12 <div id="log"></div> |
| 13 | 13 |
| 14 <script> | 14 <script> |
| 15 async_test(function() { | 15 async_test(function() { |
| 16 var blob = new Blob(["TEST"]); | 16 var blob = new Blob(["TEST"]); |
| 17 var reader = new FileReader(); | 17 var reader = new FileReader(); |
| 18 | 18 |
| 19 reader.onload = this.step_func(function(evt) { | 19 reader.onload = this.step_func(function(evt) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 42 // Decoded as utf-16 (little-endian), we get 0x4554 0x5453. | 42 // Decoded as utf-16 (little-endian), we get 0x4554 0x5453. |
| 43 assert_equals(reader_UTF16.readyState, reader.DONE, "The readyState"); | 43 assert_equals(reader_UTF16.readyState, reader.DONE, "The readyState"); |
| 44 assert_equals(reader_UTF16.result, "\u4554\u5453", "The result is not TE
ST"); | 44 assert_equals(reader_UTF16.result, "\u4554\u5453", "The result is not TE
ST"); |
| 45 this.done(); | 45 this.done(); |
| 46 }); | 46 }); |
| 47 reader_UTF16.readAsText(blob, "UTF-16"); | 47 reader_UTF16.readAsText(blob, "UTF-16"); |
| 48 }, "readAsText should correctly read UTF-16."); | 48 }, "readAsText should correctly read UTF-16."); |
| 49 </script> | 49 </script> |
| 50 </body> | 50 </body> |
| 51 </html> | 51 </html> |
| OLD | NEW |