Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(916)

Side by Side Diff: LayoutTests/imported/web-platform-tests/FileAPI/idlharness.html

Issue 1236713002: Import FileAPI tests from web-platform-tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ugh, stupid baselines Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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 var file_input;
24 setup(function() {
25 var idl_array = new IdlArray();
26
27 var request = new XMLHttpRequest();
28 request.open("GET", "idlharness.idl");
29 request.send();
30 request.onload = function() {
31 var idls = request.responseText;
32
33 idl_array.add_untested_idls("[PrimaryGlobal] interface Window { };");
34
35 idl_array.add_untested_idls("interface ArrayBuffer {};");
36 idl_array.add_untested_idls("interface ArrayBufferView {};");
37 idl_array.add_untested_idls("interface URL {};");
38 idl_array.add_untested_idls("interface EventTarget {};");
39 idl_array.add_untested_idls("interface Event {};");
40 idl_array.add_untested_idls("[TreatNonCallableAsNull] callback EventHand lerNonNull = any (Event event);");
41 idl_array.add_untested_idls("typedef EventHandlerNonNull? EventHandler;" );
42
43 idl_array.add_idls(idls);
44
45 file_input = document.querySelector("#fileChooser");
46 idl_array.add_objects({
47 Blob: ['new Blob(["TEST"])'],
48 File: ['new File(["myFileBits"], "myFileName")'],
49 FileList: ['file_input.files'],
50 FileReader: ['new FileReader()']
51 });
52
53 idl_array.test();
54 done();
55 };
56 }, {explicit_done: true});
57 </script>
58
59 </body>
60 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698