| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <title>Test that FileReader.result returns the same result regardless of whether
it's from cache or not by getting it twice.</title> |
| 3 <body> | 4 <body> |
| 4 <p>Test that FileReader.result returns the same result regardless of whether it'
s from cache or not by getting it twice.</p> | |
| 5 <script src="../../resources/testharness.js"></script> | 5 <script src="../../resources/testharness.js"></script> |
| 6 <script src="../../resources/testharnessreport.js"></script> | 6 <script src="../../resources/testharnessreport.js"></script> |
| 7 <script type="text/javascript"> | 7 <script type="text/javascript"> |
| 8 function setupHandlers(test, reader, expectedResult) | 8 function setupHandlers(test, reader, expectedResult) |
| 9 { | 9 { |
| 10 reader.onabort = test.step_func(function() { | 10 reader.onabort = test.step_func(function() { |
| 11 assert_unreached("onabort invoked on reader"); | 11 assert_unreached("onabort invoked on reader"); |
| 12 }); | 12 }); |
| 13 reader.onerror = test.step_func(function() { | 13 reader.onerror = test.step_func(function() { |
| 14 assert_unreached("onerror invoked on reader"); | 14 assert_unreached("onerror invoked on reader"); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 43 | 43 |
| 44 var testDataURL = async_test("Read from a blob as a data URL"); | 44 var testDataURL = async_test("Read from a blob as a data URL"); |
| 45 testDataURL.step(function() { | 45 testDataURL.step(function() { |
| 46 var reader = new FileReader(); | 46 var reader = new FileReader(); |
| 47 reader.readAsDataURL(blob); | 47 reader.readAsDataURL(blob); |
| 48 setupHandlers(testDataURL, reader, "data:text/plain;charset=us-ascii;base64,
SGVsbG9Xb3JsZA=="); | 48 setupHandlers(testDataURL, reader, "data:text/plain;charset=us-ascii;base64,
SGVsbG9Xb3JsZA=="); |
| 49 }); | 49 }); |
| 50 </script> | 50 </script> |
| 51 </body> | 51 </body> |
| 52 </html> | 52 </html> |
| OLD | NEW |