Skip to content

Commit

Permalink
split FileAPI/idlharness tests into any.js (#29576)
Browse files Browse the repository at this point in the history
* split FileAPI/idlharness tests into any.js
  • Loading branch information
lucacasonato committed Jul 26, 2021
1 parent 1389ca3 commit 3572a38
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
19 changes: 19 additions & 0 deletions FileAPI/idlharness.any.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// META: timeout=long

'use strict';

// https://w3c.github.io/FileAPI/

idl_test(
['FileAPI'],
['dom', 'html', 'url'],
idl_array => {
idl_array.add_objects({
Blob: ['new Blob(["TEST"])'],
File: ['new File(["myFileBits"], "myFileName")'],
FileReader: ['new FileReader()']
});
}
);
7 changes: 2 additions & 5 deletions FileAPI/idlharness.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<title>File API automated IDL tests</title>
<title>File API automated IDL tests (requiring dom)</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#conformance">
<script src="/resources/testharness.js"></script>
Expand All @@ -27,10 +27,7 @@ <h1>File API automated IDL tests</h1>
['dom', 'html', 'url'],
idl_array => {
idl_array.add_objects({
Blob: ['new Blob(["TEST"])'],
File: ['new File(["myFileBits"], "myFileName")'],
FileList: ['document.querySelector("#fileChooser").files'],
FileReader: ['new FileReader()']
FileList: ['document.querySelector("#fileChooser").files']
});
}
);
Expand Down
3 changes: 0 additions & 3 deletions FileAPI/idlharness.worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ idl_test(
['dom', 'html', 'url'],
idl_array => {
idl_array.add_objects({
Blob: ['new Blob(["TEST"])'],
File: ['new File(["myFileBits"], "myFileName")'],
FileReader: ['new FileReader()'],
FileReaderSync: ['new FileReaderSync()']
});
}
Expand Down

0 comments on commit 3572a38

Please sign in to comment.