mirror of
https://github.com/servo/servo.git
synced 2025-06-28 02:53:48 +01:00
Auto merge of #12662 - izgzhen:fileapi-idlharness, r=Ms2ger
Update FileAPI WPT idlharness Updated to match the latest https://w3c.github.io/FileAPI/#idl-index <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12662) <!-- Reviewable:end -->
This commit is contained in:
commit
76ae608290
3 changed files with 52 additions and 28 deletions
|
@ -30,3 +30,12 @@
|
||||||
[FileReader interface: calling readAsArrayBuffer(Blob) on new FileReader() with too few arguments must throw TypeError]
|
[FileReader interface: calling readAsArrayBuffer(Blob) on new FileReader() with too few arguments must throw TypeError]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[FileReader interface: operation readAsBinaryString(Blob)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[FileReader interface: new FileReader() must inherit property "readAsBinaryString" with the proper type (1)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[FileReader interface: calling readAsBinaryString(Blob) on new FileReader() with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -54,15 +54,27 @@
|
||||||
[Event interface: existence and properties of interface object]
|
[Event interface: existence and properties of interface object]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Blob interface: existence and properties of interface object]
|
[FileReader interface: operation readAsBinaryString(Blob)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[File interface: existence and properties of interface object]
|
[FileReader interface: new FileReader() must inherit property "readAsBinaryString" with the proper type (1)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[FileList interface: existence and properties of interface object]
|
[FileReader interface: calling readAsBinaryString(Blob) on new FileReader() with too few arguments must throw TypeError]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[FileReader interface: existence and properties of interface object]
|
[FileReaderSync interface: operation readAsBinaryString(Blob)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[FileReaderSync interface: new FileReaderSync() must inherit property "readAsBinaryString" with the proper type (1)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[FileReaderSync interface: calling readAsBinaryString(Blob) on new FileReaderSync() with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[FileReaderSync interface: new FileReaderSync() must inherit property "readAsText" with the proper type (2)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[FileReaderSync interface: new FileReaderSync() must inherit property "readAsDataURL" with the proper type (3)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
[Constructor,
|
// https://w3c.github.io/FileAPI/#idl-index
|
||||||
Constructor(sequence<(ArrayBuffer or ArrayBufferView or Blob or DOMString)> blobParts, optional BlobPropertyBag options), Exposed=Window,Worker]
|
|
||||||
|
[Constructor(optional sequence<BlobPart> blobParts, optional BlobPropertyBag options),
|
||||||
|
Exposed=(Window,Worker)]
|
||||||
interface Blob {
|
interface Blob {
|
||||||
|
|
||||||
readonly attribute unsigned long long size;
|
readonly attribute unsigned long long size;
|
||||||
|
@ -19,32 +21,33 @@ dictionary BlobPropertyBag {
|
||||||
DOMString type = "";
|
DOMString type = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
[Constructor(sequence<(Blob or DOMString or ArrayBufferView or ArrayBuffer)> fileBits,
|
typedef (BufferSource or Blob or USVString) BlobPart;
|
||||||
[EnsureUTF16] DOMString fileName, optional FilePropertyBag options), Exposed=Window,Worker]
|
|
||||||
interface File : Blob {
|
|
||||||
|
|
||||||
|
[Constructor(sequence<BlobPart> fileBits,
|
||||||
|
[EnsureUTF16] DOMString fileName,
|
||||||
|
optional FilePropertyBag options),
|
||||||
|
Exposed=(Window,Worker)]
|
||||||
|
interface File : Blob {
|
||||||
readonly attribute DOMString name;
|
readonly attribute DOMString name;
|
||||||
readonly attribute long long lastModified;
|
readonly attribute long long lastModified;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary FilePropertyBag {
|
dictionary FilePropertyBag : BlobPropertyBag {
|
||||||
|
|
||||||
DOMString type = "";
|
|
||||||
long long lastModified;
|
long long lastModified;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=Window,Worker] interface FileList {
|
[Exposed=(Window,Worker)]
|
||||||
|
interface FileList {
|
||||||
getter File? item(unsigned long index);
|
getter File? item(unsigned long index);
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
};
|
};
|
||||||
|
|
||||||
[Constructor, Exposed=Window,Worker]
|
[Constructor, Exposed=(Window,Worker)]
|
||||||
interface FileReader: EventTarget {
|
interface FileReader: EventTarget {
|
||||||
|
|
||||||
// async read methods
|
// async read methods
|
||||||
void readAsArrayBuffer(Blob blob);
|
void readAsArrayBuffer(Blob blob);
|
||||||
|
void readAsBinaryString(Blob blob);
|
||||||
void readAsText(Blob blob, optional DOMString label);
|
void readAsText(Blob blob, optional DOMString label);
|
||||||
void readAsDataURL(Blob blob);
|
void readAsDataURL(Blob blob);
|
||||||
|
|
||||||
|
@ -55,6 +58,7 @@ interface FileReader: EventTarget {
|
||||||
const unsigned short LOADING = 1;
|
const unsigned short LOADING = 1;
|
||||||
const unsigned short DONE = 2;
|
const unsigned short DONE = 2;
|
||||||
|
|
||||||
|
|
||||||
readonly attribute unsigned short readyState;
|
readonly attribute unsigned short readyState;
|
||||||
|
|
||||||
// File or Blob data
|
// File or Blob data
|
||||||
|
@ -62,7 +66,7 @@ interface FileReader: EventTarget {
|
||||||
|
|
||||||
readonly attribute DOMError? error;
|
readonly attribute DOMError? error;
|
||||||
|
|
||||||
// event handler attributes
|
// event handler content attributes
|
||||||
attribute EventHandler onloadstart;
|
attribute EventHandler onloadstart;
|
||||||
attribute EventHandler onprogress;
|
attribute EventHandler onprogress;
|
||||||
attribute EventHandler onload;
|
attribute EventHandler onload;
|
||||||
|
@ -72,20 +76,19 @@ interface FileReader: EventTarget {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
partial interface URL {
|
|
||||||
|
|
||||||
static DOMString createObjectURL(Blob blob);
|
|
||||||
static DOMString createFor(Blob blob);
|
|
||||||
static void revokeObjectURL(DOMString url);
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
[Constructor, Exposed=Worker]
|
[Constructor, Exposed=Worker]
|
||||||
interface FileReaderSync {
|
interface FileReaderSync {
|
||||||
|
|
||||||
// Synchronously return strings
|
// Synchronously return strings
|
||||||
|
|
||||||
ArrayBuffer readAsArrayBuffer(Blob blob);
|
ArrayBuffer readAsArrayBuffer(Blob blob);
|
||||||
|
DOMString readAsBinaryString(Blob blob);
|
||||||
DOMString readAsText(Blob blob, optional DOMString label);
|
DOMString readAsText(Blob blob, optional DOMString label);
|
||||||
DOMString readAsDataURL(Blob blob);
|
DOMString readAsDataURL(Blob blob);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[Exposed=(Window,DedicatedWorker,SharedWorker)]
|
||||||
|
partial interface URL {
|
||||||
|
static DOMString createObjectURL(Blob blob);
|
||||||
|
static DOMString createFor(Blob blob);
|
||||||
|
static void revokeObjectURL(DOMString url);
|
||||||
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue