• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html>
2<html>
3  <head>
4    <meta charset="utf-8">
5    <title>File API automated IDL tests</title>
6    <link rel="author" title="Intel" href="http://www.intel.com">
7    <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#conformance">
8    <script src="/resources/testharness.js"></script>
9    <script src="/resources/testharnessreport.js"></script>
10    <script src="/resources/WebIDLParser.js"></script>
11    <script src="/resources/idlharness.js"></script>
12  </head>
13  <body>
14    <h1>File API automated IDL tests</h1>
15
16    <div id="log"></div>
17
18    <form name="uploadData">
19      <input type="file" id="fileChooser">
20    </form>
21
22    <script>
23      'use strict';
24
25      idl_test(
26        ['FileAPI'],
27        ['dom', 'html', 'url'],
28        idl_array => {
29          idl_array.add_objects({
30            Blob: ['new Blob(["TEST"])'],
31            File: ['new File(["myFileBits"], "myFileName")'],
32            FileList: ['document.querySelector("#fileChooser").files'],
33            FileReader: ['new FileReader()']
34          });
35        }
36      );
37    </script>
38
39  </body>
40</html>
41