11cb0ef41Sopenharmony_cipromise_test(async t => {
21cb0ef41Sopenharmony_ci  var reader = new FileReader();
31cb0ef41Sopenharmony_ci  var eventWatcher = new EventWatcher(t, reader, ['loadstart', 'progress', 'abort', 'error', 'load', 'loadend']);
41cb0ef41Sopenharmony_ci  reader.readAsText(new Blob([]));
51cb0ef41Sopenharmony_ci  await eventWatcher.wait_for('loadstart');
61cb0ef41Sopenharmony_ci  // No progress event for an empty blob, as no data is loaded.
71cb0ef41Sopenharmony_ci  await eventWatcher.wait_for('load');
81cb0ef41Sopenharmony_ci  await eventWatcher.wait_for('loadend');
91cb0ef41Sopenharmony_ci}, 'events are dispatched in the correct order for an empty blob');
101cb0ef41Sopenharmony_ci
111cb0ef41Sopenharmony_cipromise_test(async t => {
121cb0ef41Sopenharmony_ci  var reader = new FileReader();
131cb0ef41Sopenharmony_ci  var eventWatcher = new EventWatcher(t, reader, ['loadstart', 'progress', 'abort', 'error', 'load', 'loadend']);
141cb0ef41Sopenharmony_ci  reader.readAsText(new Blob(['a']));
151cb0ef41Sopenharmony_ci  await eventWatcher.wait_for('loadstart');
161cb0ef41Sopenharmony_ci  await eventWatcher.wait_for('progress');
171cb0ef41Sopenharmony_ci  await eventWatcher.wait_for('load');
181cb0ef41Sopenharmony_ci  await eventWatcher.wait_for('loadend');
191cb0ef41Sopenharmony_ci}, 'events are dispatched in the correct order for a non-empty blob');
20