mirror of
https://github.com/servo/servo.git
synced 2025-06-27 02:23:41 +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]
|
||||
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]
|
||||
expected: FAIL
|
||||
|
||||
[Blob interface: existence and properties of interface object]
|
||||
[FileReader interface: operation readAsBinaryString(Blob)]
|
||||
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
|
||||
|
||||
[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
|
||||
|
||||
[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
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
[Constructor,
|
||||
Constructor(sequence<(ArrayBuffer or ArrayBufferView or Blob or DOMString)> blobParts, optional BlobPropertyBag options), Exposed=Window,Worker]
|
||||
// https://w3c.github.io/FileAPI/#idl-index
|
||||
|
||||
[Constructor(optional sequence<BlobPart> blobParts, optional BlobPropertyBag options),
|
||||
Exposed=(Window,Worker)]
|
||||
interface Blob {
|
||||
|
||||
readonly attribute unsigned long long size;
|
||||
|
@ -19,32 +21,33 @@ dictionary BlobPropertyBag {
|
|||
DOMString type = "";
|
||||
};
|
||||
|
||||
[Constructor(sequence<(Blob or DOMString or ArrayBufferView or ArrayBuffer)> fileBits,
|
||||
[EnsureUTF16] DOMString fileName, optional FilePropertyBag options), Exposed=Window,Worker]
|
||||
interface File : Blob {
|
||||
typedef (BufferSource or Blob or USVString) BlobPart;
|
||||
|
||||
[Constructor(sequence<BlobPart> fileBits,
|
||||
[EnsureUTF16] DOMString fileName,
|
||||
optional FilePropertyBag options),
|
||||
Exposed=(Window,Worker)]
|
||||
interface File : Blob {
|
||||
readonly attribute DOMString name;
|
||||
readonly attribute long long lastModified;
|
||||
|
||||
};
|
||||
|
||||
dictionary FilePropertyBag {
|
||||
|
||||
DOMString type = "";
|
||||
dictionary FilePropertyBag : BlobPropertyBag {
|
||||
long long lastModified;
|
||||
|
||||
};
|
||||
|
||||
[Exposed=Window,Worker] interface FileList {
|
||||
[Exposed=(Window,Worker)]
|
||||
interface FileList {
|
||||
getter File? item(unsigned long index);
|
||||
readonly attribute unsigned long length;
|
||||
};
|
||||
|
||||
[Constructor, Exposed=Window,Worker]
|
||||
[Constructor, Exposed=(Window,Worker)]
|
||||
interface FileReader: EventTarget {
|
||||
|
||||
// async read methods
|
||||
void readAsArrayBuffer(Blob blob);
|
||||
void readAsBinaryString(Blob blob);
|
||||
void readAsText(Blob blob, optional DOMString label);
|
||||
void readAsDataURL(Blob blob);
|
||||
|
||||
|
@ -55,6 +58,7 @@ interface FileReader: EventTarget {
|
|||
const unsigned short LOADING = 1;
|
||||
const unsigned short DONE = 2;
|
||||
|
||||
|
||||
readonly attribute unsigned short readyState;
|
||||
|
||||
// File or Blob data
|
||||
|
@ -62,7 +66,7 @@ interface FileReader: EventTarget {
|
|||
|
||||
readonly attribute DOMError? error;
|
||||
|
||||
// event handler attributes
|
||||
// event handler content attributes
|
||||
attribute EventHandler onloadstart;
|
||||
attribute EventHandler onprogress;
|
||||
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]
|
||||
interface FileReaderSync {
|
||||
|
||||
// Synchronously return strings
|
||||
|
||||
ArrayBuffer readAsArrayBuffer(Blob blob);
|
||||
DOMString readAsBinaryString(Blob blob);
|
||||
DOMString readAsText(Blob blob, optional DOMString label);
|
||||
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