From 3572a3815407c62261f1a28dc3b16ff54c0cb865 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Mon, 26 Jul 2021 17:52:22 +0200 Subject: [PATCH] split FileAPI/idlharness tests into any.js (#29576) * split FileAPI/idlharness tests into any.js --- FileAPI/idlharness.any.js | 19 +++++++++++++++++++ FileAPI/idlharness.html | 7 ++----- FileAPI/idlharness.worker.js | 3 --- 3 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 FileAPI/idlharness.any.js diff --git a/FileAPI/idlharness.any.js b/FileAPI/idlharness.any.js new file mode 100644 index 00000000000000..1744242b9f3ff1 --- /dev/null +++ b/FileAPI/idlharness.any.js @@ -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()'] + }); + } +); diff --git a/FileAPI/idlharness.html b/FileAPI/idlharness.html index 5e0a43f80df3f8..45e8684f0027b2 100644 --- a/FileAPI/idlharness.html +++ b/FileAPI/idlharness.html @@ -2,7 +2,7 @@ - File API automated IDL tests + File API automated IDL tests (requiring dom) @@ -27,10 +27,7 @@

File API automated IDL tests

['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'] }); } ); diff --git a/FileAPI/idlharness.worker.js b/FileAPI/idlharness.worker.js index 786b7e4199fb45..002aaed40a562e 100644 --- a/FileAPI/idlharness.worker.js +++ b/FileAPI/idlharness.worker.js @@ -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()'] }); }