diff options
Diffstat (limited to 'testing/web-platform/tests/FileAPI/reading-data-section/filereader_readystate.any.js')
-rw-r--r-- | testing/web-platform/tests/FileAPI/reading-data-section/filereader_readystate.any.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/web-platform/tests/FileAPI/reading-data-section/filereader_readystate.any.js b/testing/web-platform/tests/FileAPI/reading-data-section/filereader_readystate.any.js new file mode 100644 index 0000000000..3cb36ab999 --- /dev/null +++ b/testing/web-platform/tests/FileAPI/reading-data-section/filereader_readystate.any.js @@ -0,0 +1,19 @@ +// META: title=FileAPI Test: filereader_readystate + + async_test(function() { + var blob = new Blob(["THIS TEST THE READYSTATE WHEN READ BLOB"]); + var reader = new FileReader(); + + assert_equals(reader.readyState, reader.EMPTY); + + reader.onloadstart = this.step_func(function(evt) { + assert_equals(reader.readyState, reader.LOADING); + }); + + reader.onloadend = this.step_func(function(evt) { + assert_equals(reader.readyState, reader.DONE); + this.done(); + }); + + reader.readAsDataURL(blob); + }); |