11cb0ef41Sopenharmony_ci<!DOCTYPE html>
21cb0ef41Sopenharmony_ci<html>
31cb0ef41Sopenharmony_ci  <head>
41cb0ef41Sopenharmony_ci    <meta charset="utf-8">
51cb0ef41Sopenharmony_ci    <title>File API manual IDL tests</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/#conformance">
81cb0ef41Sopenharmony_ci    <script src="/resources/testharness.js"></script>
91cb0ef41Sopenharmony_ci    <script src="/resources/testharnessreport.js"></script>
101cb0ef41Sopenharmony_ci    <script src="/resources/WebIDLParser.js"></script>
111cb0ef41Sopenharmony_ci    <script src="/resources/idlharness.js"></script>
121cb0ef41Sopenharmony_ci  </head>
131cb0ef41Sopenharmony_ci  <body>
141cb0ef41Sopenharmony_ci    <h1>File API manual IDL tests</h1>
151cb0ef41Sopenharmony_ci
161cb0ef41Sopenharmony_ci    <p>Either download <a href="support/upload.txt">upload.txt</a> and select it below or select an
171cb0ef41Sopenharmony_ci    arbitrary local file.</p>
181cb0ef41Sopenharmony_ci
191cb0ef41Sopenharmony_ci    <form name="uploadData">
201cb0ef41Sopenharmony_ci      <input type="file" id="fileChooser">
211cb0ef41Sopenharmony_ci    </form>
221cb0ef41Sopenharmony_ci
231cb0ef41Sopenharmony_ci    <div id="log"></div>
241cb0ef41Sopenharmony_ci
251cb0ef41Sopenharmony_ci    <script>
261cb0ef41Sopenharmony_ci      const fileInput = document.querySelector("#fileChooser");
271cb0ef41Sopenharmony_ci
281cb0ef41Sopenharmony_ci      setup({explicit_timeout: true});
291cb0ef41Sopenharmony_ci
301cb0ef41Sopenharmony_ci      idl_test(
311cb0ef41Sopenharmony_ci        ['FileAPI'],
321cb0ef41Sopenharmony_ci        ['dom', 'html', 'url'],
331cb0ef41Sopenharmony_ci        async idl_array => {
341cb0ef41Sopenharmony_ci          await new Promise(resolve => {
351cb0ef41Sopenharmony_ci            on_event(fileInput, "change", resolve);
361cb0ef41Sopenharmony_ci          });
371cb0ef41Sopenharmony_ci          idl_array.add_objects({
381cb0ef41Sopenharmony_ci            FileList: [fileInput.files],
391cb0ef41Sopenharmony_ci            File: [fileInput.files[0]],
401cb0ef41Sopenharmony_ci          });
411cb0ef41Sopenharmony_ci        }
421cb0ef41Sopenharmony_ci      );
431cb0ef41Sopenharmony_ci    </script>
441cb0ef41Sopenharmony_ci  </body>
451cb0ef41Sopenharmony_ci</html>
46