From cdd2355f0f516e55ef638f38006677003685a92f Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Mon, 26 Apr 2021 13:02:49 +0200 Subject: [PATCH] tests: enable idlharness wpt (#10371) This enables more test cases that expose issues in our implementation. --- test_util/wpt | 2 +- tools/wpt/expectation.json | 282 +++++++++++++++++++++++++++++++++++-- 2 files changed, 271 insertions(+), 13 deletions(-) diff --git a/test_util/wpt b/test_util/wpt index 5d9a0686bd..50b30cfba0 160000 --- a/test_util/wpt +++ b/test_util/wpt @@ -1 +1 @@ -Subproject commit 5d9a0686bd51cc20df785fc013700c7b18fc0e0b +Subproject commit 50b30cfba06e3e8baa564da872241aa7c8f2e439 diff --git a/tools/wpt/expectation.json b/tools/wpt/expectation.json index bcb12ce93b..72e96a0311 100644 --- a/tools/wpt/expectation.json +++ b/tools/wpt/expectation.json @@ -7,7 +7,11 @@ "console-label-conversion.any.js": true, "console-namespace-object-class-string.any.js": true, "console-tests-historical.any.js": true, - "idlharness.any.js": false + "idlharness.any.js": [ + "console namespace: operation table(optional any, optional sequence)", + "console namespace: operation dir(optional any, optional object?)", + "console namespace: operation dirxml(any...)" + ] }, "dom": { "abort": { @@ -27,9 +31,7 @@ "Untitled 2", "Untitled 3" ] - }, - "idlharness.any.js": false, - "idlharness.window.js": false + } }, "encoding": { "api-basics.any.js": true, @@ -103,7 +105,36 @@ "Invalid encodeInto() destination: Float64Array, backed by: SharedArrayBuffer", "Invalid encodeInto() destination: SharedArrayBuffer" ], - "idlharness.any.js": false, + "idlharness.any.js": [ + "TextDecoder interface: existence and properties of interface object", + "TextDecoder interface: operation decode(optional BufferSource, optional TextDecodeOptions)", + "TextDecoder interface: attribute encoding", + "TextDecoder interface: attribute fatal", + "TextDecoder interface: attribute ignoreBOM", + "TextDecoder interface: new TextDecoder() must inherit property \"fatal\" with the proper type", + "TextDecoder interface: new TextDecoder() must inherit property \"ignoreBOM\" with the proper type", + "TextEncoder interface: existence and properties of interface object", + "TextEncoder interface: operation encode(optional USVString)", + "TextEncoder interface: operation encodeInto(USVString, Uint8Array)", + "TextEncoder interface: attribute encoding", + "TextEncoder interface: new TextEncoder() must inherit property \"encoding\" with the proper type", + "TextDecoderStream interface: existence and properties of interface object", + "TextDecoderStream interface object length", + "TextDecoderStream interface object name", + "TextDecoderStream interface: existence and properties of interface prototype object", + "TextDecoderStream interface: existence and properties of interface prototype object's \"constructor\" property", + "TextDecoderStream interface: existence and properties of interface prototype object's @@unscopables property", + "TextDecoderStream interface: attribute encoding", + "TextDecoderStream interface: attribute fatal", + "TextDecoderStream interface: attribute ignoreBOM", + "TextEncoderStream interface: existence and properties of interface object", + "TextEncoderStream interface object length", + "TextEncoderStream interface object name", + "TextEncoderStream interface: existence and properties of interface prototype object", + "TextEncoderStream interface: existence and properties of interface prototype object's \"constructor\" property", + "TextEncoderStream interface: existence and properties of interface prototype object's @@unscopables property", + "TextEncoderStream interface: attribute encoding" + ], "iso-2022-jp-decoder.any.js": false, "legacy-mb-schinese": { "gb18030": { @@ -182,10 +213,144 @@ "basic.any.js": [ "Performance interface extends EventTarget." ], - "idlharness.any.js": false + "idlharness.any.js": [ + "Performance interface: existence and properties of interface object", + "Performance interface: existence and properties of interface prototype object", + "Performance interface: operation now()", + "Performance interface: attribute timeOrigin", + "Performance interface: operation toJSON()", + "Stringification of performance", + "Performance interface: performance must inherit property \"timeOrigin\" with the proper type", + "Performance interface: performance must inherit property \"toJSON()\" with the proper type", + "Performance interface: default toJSON operation on performance", + "Window interface: attribute performance" + ] }, "streams": { - "idlharness.any.js": false, + "idlharness.any.js": [ + "ReadableStream interface object length", + "ReadableStream interface: attribute locked", + "ReadableStream interface: operation cancel(optional any)", + "ReadableStream interface: operation getReader(optional ReadableStreamGetReaderOptions)", + "ReadableStream interface: operation pipeThrough(ReadableWritablePair, optional StreamPipeOptions)", + "ReadableStream interface: operation pipeTo(WritableStream, optional StreamPipeOptions)", + "ReadableStream interface: operation tee()", + "ReadableStream interface: async iterable", + "Stringification of new ReadableStream()", + "ReadableStream interface: calling pipeTo(WritableStream, optional StreamPipeOptions) on new ReadableStream() with too few arguments must throw TypeError", + "ReadableStreamDefaultReader interface: existence and properties of interface object", + "ReadableStreamDefaultReader interface: existence and properties of interface prototype object", + "ReadableStreamDefaultReader interface: operation read()", + "ReadableStreamDefaultReader interface: operation releaseLock()", + "ReadableStreamDefaultReader interface: attribute closed", + "ReadableStreamDefaultReader interface: operation cancel(optional any)", + "Stringification of (new ReadableStream()).getReader()", + "ReadableStreamBYOBReader interface: existence and properties of interface object", + "ReadableStreamBYOBReader interface object length", + "ReadableStreamBYOBReader interface object name", + "ReadableStreamBYOBReader interface: existence and properties of interface prototype object", + "ReadableStreamBYOBReader interface: existence and properties of interface prototype object's \"constructor\" property", + "ReadableStreamBYOBReader interface: existence and properties of interface prototype object's @@unscopables property", + "ReadableStreamBYOBReader interface: operation read(ArrayBufferView)", + "ReadableStreamBYOBReader interface: operation releaseLock()", + "ReadableStreamBYOBReader interface: attribute closed", + "ReadableStreamBYOBReader interface: operation cancel(optional any)", + "ReadableStreamBYOBReader must be primary interface of (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' })", + "Stringification of (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' })", + "ReadableStreamBYOBReader interface: (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) must inherit property \"read(ArrayBufferView)\" with the proper type", + "ReadableStreamBYOBReader interface: calling read(ArrayBufferView) on (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) with too few arguments must throw TypeError", + "ReadableStreamBYOBReader interface: (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) must inherit property \"releaseLock()\" with the proper type", + "ReadableStreamBYOBReader interface: (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) must inherit property \"closed\" with the proper type", + "ReadableStreamBYOBReader interface: (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) must inherit property \"cancel(optional any)\" with the proper type", + "ReadableStreamBYOBReader interface: calling cancel(optional any) on (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) with too few arguments must throw TypeError", + "ReadableStreamDefaultController interface: existence and properties of interface object", + "ReadableStreamDefaultController interface object length", + "ReadableStreamDefaultController interface object name", + "ReadableStreamDefaultController interface: existence and properties of interface prototype object", + "ReadableStreamDefaultController interface: existence and properties of interface prototype object's \"constructor\" property", + "ReadableStreamDefaultController interface: existence and properties of interface prototype object's @@unscopables property", + "ReadableStreamDefaultController interface: attribute desiredSize", + "ReadableStreamDefaultController interface: operation close()", + "ReadableStreamDefaultController interface: operation enqueue(optional any)", + "ReadableStreamDefaultController interface: operation error(optional any)", + "ReadableStreamDefaultController must be primary interface of self.readableStreamDefaultController", + "Stringification of self.readableStreamDefaultController", + "ReadableByteStreamController interface: existence and properties of interface object", + "ReadableByteStreamController interface object length", + "ReadableByteStreamController interface object name", + "ReadableByteStreamController interface: existence and properties of interface prototype object", + "ReadableByteStreamController interface: existence and properties of interface prototype object's \"constructor\" property", + "ReadableByteStreamController interface: existence and properties of interface prototype object's @@unscopables property", + "ReadableByteStreamController interface: attribute byobRequest", + "ReadableByteStreamController interface: attribute desiredSize", + "ReadableByteStreamController interface: operation close()", + "ReadableByteStreamController interface: operation enqueue(ArrayBufferView)", + "ReadableByteStreamController interface: operation error(optional any)", + "ReadableByteStreamController must be primary interface of self.readableByteStreamController", + "Stringification of self.readableByteStreamController", + "ReadableByteStreamController interface: self.readableByteStreamController must inherit property \"byobRequest\" with the proper type", + "ReadableStreamBYOBRequest interface: existence and properties of interface object", + "ReadableStreamBYOBRequest interface object length", + "ReadableStreamBYOBRequest interface object name", + "ReadableStreamBYOBRequest interface: existence and properties of interface prototype object", + "ReadableStreamBYOBRequest interface: existence and properties of interface prototype object's \"constructor\" property", + "ReadableStreamBYOBRequest interface: existence and properties of interface prototype object's @@unscopables property", + "ReadableStreamBYOBRequest interface: attribute view", + "ReadableStreamBYOBRequest interface: operation respond(unsigned long long)", + "ReadableStreamBYOBRequest interface: operation respondWithNewView(ArrayBufferView)", + "ReadableStreamBYOBRequest must be primary interface of self.readableStreamByobRequest", + "Stringification of self.readableStreamByobRequest", + "ReadableStreamBYOBRequest interface: self.readableStreamByobRequest must inherit property \"view\" with the proper type", + "ReadableStreamBYOBRequest interface: self.readableStreamByobRequest must inherit property \"respond(unsigned long long)\" with the proper type", + "ReadableStreamBYOBRequest interface: calling respond(unsigned long long) on self.readableStreamByobRequest with too few arguments must throw TypeError", + "ReadableStreamBYOBRequest interface: self.readableStreamByobRequest must inherit property \"respondWithNewView(ArrayBufferView)\" with the proper type", + "ReadableStreamBYOBRequest interface: calling respondWithNewView(ArrayBufferView) on self.readableStreamByobRequest with too few arguments must throw TypeError", + "WritableStream interface: attribute locked", + "WritableStream interface: operation abort(optional any)", + "WritableStream interface: operation close()", + "WritableStream interface: operation getWriter()", + "Stringification of new WritableStream()", + "WritableStreamDefaultWriter interface: attribute closed", + "WritableStreamDefaultWriter interface: attribute desiredSize", + "WritableStreamDefaultWriter interface: attribute ready", + "WritableStreamDefaultWriter interface: operation abort(optional any)", + "WritableStreamDefaultWriter interface: operation close()", + "WritableStreamDefaultWriter interface: operation releaseLock()", + "WritableStreamDefaultWriter interface: operation write(optional any)", + "Stringification of (new WritableStream()).getWriter()", + "WritableStreamDefaultController interface: existence and properties of interface object", + "WritableStreamDefaultController interface object length", + "WritableStreamDefaultController interface object name", + "WritableStreamDefaultController interface: existence and properties of interface prototype object", + "WritableStreamDefaultController interface: existence and properties of interface prototype object's \"constructor\" property", + "WritableStreamDefaultController interface: existence and properties of interface prototype object's @@unscopables property", + "WritableStreamDefaultController interface: operation error(optional any)", + "WritableStreamDefaultController must be primary interface of self.writableStreamDefaultController", + "Stringification of self.writableStreamDefaultController", + "TransformStream interface: attribute readable", + "TransformStream interface: attribute writable", + "Stringification of new TransformStream()", + "TransformStreamDefaultController interface: existence and properties of interface object", + "TransformStreamDefaultController interface object length", + "TransformStreamDefaultController interface object name", + "TransformStreamDefaultController interface: existence and properties of interface prototype object", + "TransformStreamDefaultController interface: existence and properties of interface prototype object's \"constructor\" property", + "TransformStreamDefaultController interface: existence and properties of interface prototype object's @@unscopables property", + "TransformStreamDefaultController interface: attribute desiredSize", + "TransformStreamDefaultController interface: operation enqueue(optional any)", + "TransformStreamDefaultController interface: operation error(optional any)", + "TransformStreamDefaultController interface: operation terminate()", + "TransformStreamDefaultController must be primary interface of self.transformStreamDefaultController", + "Stringification of self.transformStreamDefaultController", + "ByteLengthQueuingStrategy interface: attribute highWaterMark", + "ByteLengthQueuingStrategy interface: attribute size", + "Stringification of new ByteLengthQueuingStrategy({ highWaterMark: 5 })", + "ByteLengthQueuingStrategy interface: new ByteLengthQueuingStrategy({ highWaterMark: 5 }) must inherit property \"highWaterMark\" with the proper type", + "CountQueuingStrategy interface: attribute highWaterMark", + "CountQueuingStrategy interface: attribute size", + "Stringification of new CountQueuingStrategy({ highWaterMark: 5 })", + "CountQueuingStrategy interface: new CountQueuingStrategy({ highWaterMark: 5 }) must inherit property \"highWaterMark\" with the proper type" + ], "piping": { "abort.any.js": [ "a signal argument 'null' should cause pipeTo() to reject", @@ -414,7 +579,17 @@ "clear_one_mark.any.js": true, "clear_one_measure.any.js": true, "entry_type.any.js": true, - "idlharness.any.js": false, + "idlharness.any.js": [ + "PerformanceMark interface: attribute detail", + "PerformanceMeasure interface object length", + "PerformanceMeasure interface: attribute detail", + "Performance interface: operation mark(DOMString, optional PerformanceMarkOptions)", + "Performance interface: operation clearMarks(optional DOMString)", + "Performance interface: operation measure(DOMString, optional (DOMString or PerformanceMeasureOptions), optional DOMString)", + "Performance interface: operation clearMeasures(optional DOMString)", + "Performance interface: calling mark(DOMString, optional PerformanceMarkOptions) on performance with too few arguments must throw TypeError", + "Performance interface: calling measure(DOMString, optional (DOMString or PerformanceMeasureOptions), optional DOMString) on performance with too few arguments must throw TypeError" + ], "mark-entry-constructor.any.js": true, "mark-errors.any.js": true, "mark-l3.any.js": false, @@ -448,7 +623,9 @@ "value-get-set.any.js": true, "valueOf.any.js": true }, - "idlharness.any.js": false, + "idlharness.any.js": [ + "Table interface: operation set(unsigned long, optional any)" + ], "instance": { "constructor-bad-imports.any.js": false, "constructor-caching.any.js": true, @@ -517,7 +694,10 @@ "contenttype.any.js": false, "empty-body.any.js": false, "historical.any.js": false, - "idlharness.any.js": false, + "idlharness.any.js": [ + "WebAssembly namespace: operation compileStreaming(Promise)", + "WebAssembly namespace: operation instantiateStreaming(Promise, optional object)" + ], "instantiateStreaming-bad-imports.any.js": false, "instantiateStreaming.any.js": false, "invalid-args.any.js": false, @@ -544,7 +724,34 @@ "historical.any.js": [ " and .searchParams should be undefined" ], - "idlharness.any.js": false, + "idlharness.any.js": [ + "URL interface object length", + "URL interface: attribute href", + "URL interface: stringifier", + "URL interface: attribute origin", + "URL interface: attribute protocol", + "URL interface: attribute username", + "URL interface: attribute password", + "URL interface: attribute host", + "URL interface: attribute hostname", + "URL interface: attribute port", + "URL interface: attribute pathname", + "URL interface: attribute search", + "URL interface: attribute searchParams", + "URL interface: attribute hash", + "URL interface: operation toJSON()", + "Stringification of new URL(\"http://foo\")", + "URLSearchParams interface: operation append(USVString, USVString)", + "URLSearchParams interface: operation delete(USVString)", + "URLSearchParams interface: operation get(USVString)", + "URLSearchParams interface: operation getAll(USVString)", + "URLSearchParams interface: operation has(USVString)", + "URLSearchParams interface: operation set(USVString, USVString)", + "URLSearchParams interface: operation sort()", + "URLSearchParams interface: iterable", + "URLSearchParams interface: stringifier", + "Stringification of new URLSearchParams(\"hi=there&thank=you\")" + ], "url-constructor.any.js": [ "Parsing: against ", "Parsing: against ", @@ -802,7 +1009,58 @@ "redirect-method.any.js": true, "redirect-schemes.any.js": true, "redirect-to-dataurl.any.js": true - } + }, + "idlharness.any.js": [ + "Headers interface: operation append(ByteString, ByteString)", + "Headers interface: operation delete(ByteString)", + "Headers interface: operation get(ByteString)", + "Headers interface: operation has(ByteString)", + "Headers interface: operation set(ByteString, ByteString)", + "Headers interface: iterable", + "Request interface: attribute method", + "Request interface: attribute url", + "Request interface: attribute headers", + "Request interface: attribute destination", + "Request interface: attribute referrer", + "Request interface: attribute referrerPolicy", + "Request interface: attribute mode", + "Request interface: attribute credentials", + "Request interface: attribute cache", + "Request interface: attribute redirect", + "Request interface: attribute integrity", + "Request interface: attribute keepalive", + "Request interface: attribute isReloadNavigation", + "Request interface: attribute isHistoryNavigation", + "Request interface: attribute signal", + "Request interface: operation clone()", + "Request interface: attribute body", + "Request interface: attribute bodyUsed", + "Request interface: operation arrayBuffer()", + "Request interface: operation blob()", + "Request interface: operation formData()", + "Request interface: operation json()", + "Request interface: operation text()", + "Response interface: operation error()", + "Response interface: operation redirect(USVString, optional unsigned short)", + "Response interface: attribute type", + "Response interface: attribute url", + "Response interface: attribute redirected", + "Response interface: attribute status", + "Response interface: attribute ok", + "Response interface: attribute statusText", + "Response interface: attribute headers", + "Response interface: operation clone()", + "Response interface: attribute body", + "Response interface: attribute bodyUsed", + "Response interface: operation arrayBuffer()", + "Response interface: operation blob()", + "Response interface: operation formData()", + "Response interface: operation json()", + "Response interface: operation text()", + "Response interface: calling redirect(USVString, optional unsigned short) on new Response() with too few arguments must throw TypeError", + "Window interface: calling fetch(RequestInfo, optional RequestInit) on window with too few arguments must throw TypeError", + "Window interface: operation fetch(RequestInfo, optional RequestInit)" + ] }, "data-urls": { "base64.any.js": true,