11cb0ef41Sopenharmony_ci<!DOCTYPE html> 21cb0ef41Sopenharmony_ci<html> 31cb0ef41Sopenharmony_ci <head> 41cb0ef41Sopenharmony_ci <meta charset="utf-8"> 51cb0ef41Sopenharmony_ci <title>FileAPI Test: filereader_readystate</title> 61cb0ef41Sopenharmony_ci <link rel="author" title="Intel" href="http://www.intel.com"> 71cb0ef41Sopenharmony_ci <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#blobreader-state"> 81cb0ef41Sopenharmony_ci <script src="/resources/testharness.js"></script> 91cb0ef41Sopenharmony_ci <script src="/resources/testharnessreport.js"></script> 101cb0ef41Sopenharmony_ci </head> 111cb0ef41Sopenharmony_ci <body> 121cb0ef41Sopenharmony_ci <div id="log"></div> 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_ci <script> 151cb0ef41Sopenharmony_ci async_test(function() { 161cb0ef41Sopenharmony_ci var blob = new Blob(["THIS TEST THE READYSTATE WHEN READ BLOB"]); 171cb0ef41Sopenharmony_ci var reader = new FileReader(); 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_ci assert_equals(reader.readyState, reader.EMPTY); 201cb0ef41Sopenharmony_ci 211cb0ef41Sopenharmony_ci reader.onloadstart = this.step_func(function(evt) { 221cb0ef41Sopenharmony_ci assert_equals(reader.readyState, reader.LOADING); 231cb0ef41Sopenharmony_ci }); 241cb0ef41Sopenharmony_ci 251cb0ef41Sopenharmony_ci reader.onloadend = this.step_func(function(evt) { 261cb0ef41Sopenharmony_ci assert_equals(reader.readyState, reader.DONE); 271cb0ef41Sopenharmony_ci this.done(); 281cb0ef41Sopenharmony_ci }); 291cb0ef41Sopenharmony_ci 301cb0ef41Sopenharmony_ci reader.readAsDataURL(blob); 311cb0ef41Sopenharmony_ci }); 321cb0ef41Sopenharmony_ci </script> 331cb0ef41Sopenharmony_ci </body> 341cb0ef41Sopenharmony_ci</html> 35