diff --git a/tests/wpt/metadata/2dcontext/imagebitmap/canvas-createImageBitmap-resize.html.ini b/tests/wpt/metadata/2dcontext/imagebitmap/canvas-createImageBitmap-resize.html.ini new file mode 100644 index 00000000000..689e0cbbe94 --- /dev/null +++ b/tests/wpt/metadata/2dcontext/imagebitmap/canvas-createImageBitmap-resize.html.ini @@ -0,0 +1,16 @@ +[canvas-createImageBitmap-resize.html] + [createImageBitmap from an ImageData with resize option.] + expected: FAIL + + [createImageBitmap from a HTMLImageElement with resize option.] + expected: FAIL + + [createImageBitmap from a HTMLCanvasElement with resize option.] + expected: FAIL + + [createImageBitmap from an ImageBitmap with resize option.] + expected: FAIL + + [createImageBitmap from a Blob with resize option.] + expected: FAIL + diff --git a/tests/wpt/metadata/2dcontext/imagebitmap/canvas-createImageBitmap-video-resize.html.ini b/tests/wpt/metadata/2dcontext/imagebitmap/canvas-createImageBitmap-video-resize.html.ini new file mode 100644 index 00000000000..457577efd90 --- /dev/null +++ b/tests/wpt/metadata/2dcontext/imagebitmap/canvas-createImageBitmap-video-resize.html.ini @@ -0,0 +1,4 @@ +[canvas-createImageBitmap-video-resize.html] + [createImageBitmap(HTMLVideoElement) with resize option] + expected: FAIL + diff --git a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini index e100670fed4..dd4ffcf4345 100644 --- a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -1,14 +1,10 @@ [url-in-tags-revoke.window.html] - expected: TIMEOUT [Fetching a blob URL immediately before revoking it works in an iframe.] expected: FAIL [Fetching a blob URL immediately before revoking it works in an iframe navigation.] expected: FAIL - [Fetching a blob URL immediately before revoking it works in + + diff --git a/tests/wpt/web-platform-tests/2dcontext/imagebitmap/canvas-createImageBitmap-video-resize.html b/tests/wpt/web-platform-tests/2dcontext/imagebitmap/canvas-createImageBitmap-video-resize.html new file mode 100644 index 00000000000..366d1fd36e0 --- /dev/null +++ b/tests/wpt/web-platform-tests/2dcontext/imagebitmap/canvas-createImageBitmap-video-resize.html @@ -0,0 +1,58 @@ + + + + diff --git a/tests/wpt/web-platform-tests/BackgroundSync/interfaces.https.any.js b/tests/wpt/web-platform-tests/BackgroundSync/interfaces.https.any.js index 325bef8edbf..989139e9904 100644 --- a/tests/wpt/web-platform-tests/BackgroundSync/interfaces.https.any.js +++ b/tests/wpt/web-platform-tests/BackgroundSync/interfaces.https.any.js @@ -10,6 +10,5 @@ idl_test( ['service-workers', 'html', 'dom'], idlArray => { // TODO: Objects - }, - 'Background Sync interfaces.' + } ); diff --git a/tests/wpt/web-platform-tests/FileAPI/idlharness.html b/tests/wpt/web-platform-tests/FileAPI/idlharness.html index eb55b6550ef..db6592e6220 100644 --- a/tests/wpt/web-platform-tests/FileAPI/idlharness.html +++ b/tests/wpt/web-platform-tests/FileAPI/idlharness.html @@ -35,8 +35,7 @@ FileList: ['document.querySelector("#fileChooser").files'], FileReader: ['new FileReader()'] }); - }, - 'Test FileAPI IDL implementation' + } ); diff --git a/tests/wpt/web-platform-tests/FileAPI/idlharness.worker.js b/tests/wpt/web-platform-tests/FileAPI/idlharness.worker.js index e65ee01ff5b..5bf82e0b890 100644 --- a/tests/wpt/web-platform-tests/FileAPI/idlharness.worker.js +++ b/tests/wpt/web-platform-tests/FileAPI/idlharness.worker.js @@ -16,7 +16,6 @@ idl_test( FileReader: ['new FileReader()'], FileReaderSync: ['new FileReaderSync()'] }); - }, - 'Test FileAPI IDL implementation' + } ); done(); diff --git a/tests/wpt/web-platform-tests/IndexedDB/idlharness.any.js b/tests/wpt/web-platform-tests/IndexedDB/idlharness.any.js index bf83066ea82..efb84661e80 100644 --- a/tests/wpt/web-platform-tests/IndexedDB/idlharness.any.js +++ b/tests/wpt/web-platform-tests/IndexedDB/idlharness.any.js @@ -20,6 +20,5 @@ idl_test( IDBVersionChangeEvent: ['new IDBVersionChangeEvent("type")'], DOMStringList: [], }); - }, - 'IndexedDB interfaces' + } ); diff --git a/tests/wpt/web-platform-tests/WebCryptoAPI/idlharness.https.any.js b/tests/wpt/web-platform-tests/WebCryptoAPI/idlharness.https.any.js index f5095cba4f7..b0ccebd9f48 100644 --- a/tests/wpt/web-platform-tests/WebCryptoAPI/idlharness.https.any.js +++ b/tests/wpt/web-platform-tests/WebCryptoAPI/idlharness.https.any.js @@ -11,6 +11,5 @@ idl_test( Crypto: ['crypto'], SubtleCrypto: ['crypto.subtle'] }); - }, - 'WebCryptoAPI interfaces' + } ); diff --git a/tests/wpt/web-platform-tests/accelerometer/idlharness.https.window.js b/tests/wpt/web-platform-tests/accelerometer/idlharness.https.window.js index f6cbcd960cb..1e041e9a23b 100644 --- a/tests/wpt/web-platform-tests/accelerometer/idlharness.https.window.js +++ b/tests/wpt/web-platform-tests/accelerometer/idlharness.https.window.js @@ -14,6 +14,5 @@ idl_test( LinearAccelerationSensor: ['new LinearAccelerationSensor();'], GravitySensor: ['new GravitySensor();'] }); - }, - 'Test IDL implementation of Accelerometer Sensor' + } ); diff --git a/tests/wpt/web-platform-tests/ambient-light/idlharness.https.window.js b/tests/wpt/web-platform-tests/ambient-light/idlharness.https.window.js index ea99fc1fc8a..211e6aa0171 100644 --- a/tests/wpt/web-platform-tests/ambient-light/idlharness.https.window.js +++ b/tests/wpt/web-platform-tests/ambient-light/idlharness.https.window.js @@ -12,6 +12,5 @@ idl_test( idl_array.add_objects({ AmbientLightSensor: ['new AmbientLightSensor()'] }); - }, - 'Test IDL implementation of Ambient Light Sensor' + } ); diff --git a/tests/wpt/web-platform-tests/animation-worklet/idlharness.any.js b/tests/wpt/web-platform-tests/animation-worklet/idlharness.any.js new file mode 100644 index 00000000000..e821a2fee8a --- /dev/null +++ b/tests/wpt/web-platform-tests/animation-worklet/idlharness.any.js @@ -0,0 +1,17 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +'use strict'; + +// https://wicg.github.io/animation-worklet/ + +idl_test( + ['animation-worklet'], + ['worklets', 'web-animations', 'html', 'cssom', 'dom'], + idl_array => { + idl_array.add_objects({ + WorkletAnimation: ['new WorkletAnimation("name")'], + // TODO: WorkletGroupEffect + }); + } +); diff --git a/tests/wpt/web-platform-tests/animation-worklet/interfaces.any.js b/tests/wpt/web-platform-tests/animation-worklet/interfaces.any.js deleted file mode 100644 index 9b1d75649a0..00000000000 --- a/tests/wpt/web-platform-tests/animation-worklet/interfaces.any.js +++ /dev/null @@ -1,16 +0,0 @@ -// META: script=/resources/WebIDLParser.js -// META: script=/resources/idlharness.js - -'use strict'; - -// https://wicg.github.io/animation-worklet/ - -promise_test(async () => { - const idl = await (await fetch('/interfaces/animation-worklet.idl')).text(); - const html = await (await fetch('/interfaces/html.idl')).text(); - const idlArray = new IdlArray(); - idlArray.add_idls(idl); - idlArray.add_dependency_idls(html); - idlArray.test(); - done(); -}, 'Test driver'); diff --git a/tests/wpt/web-platform-tests/appmanifest/idlharness.window.js b/tests/wpt/web-platform-tests/appmanifest/idlharness.window.js index a877c76fa31..55e8b9871e7 100644 --- a/tests/wpt/web-platform-tests/appmanifest/idlharness.window.js +++ b/tests/wpt/web-platform-tests/appmanifest/idlharness.window.js @@ -13,6 +13,5 @@ idl_test( Window: ['window'], BeforeInstallPromptEvent: ['new BeforeInstallPromptEvent("type")'], }); - }, - 'appmanifest interfaces' + } ); diff --git a/tests/wpt/web-platform-tests/background-fetch/idlharness.https.any.js b/tests/wpt/web-platform-tests/background-fetch/idlharness.https.any.js index ad204771c3a..f2c8a56590a 100644 --- a/tests/wpt/web-platform-tests/background-fetch/idlharness.https.any.js +++ b/tests/wpt/web-platform-tests/background-fetch/idlharness.https.any.js @@ -20,6 +20,5 @@ idl_test( BackgroundFetchUpdateEvent: ['new BackgroundFetchUpdateEvent("type")'], }); } - }, - 'background-fetch interfaces' + } ); diff --git a/tests/wpt/web-platform-tests/battery-status/battery-interface-idlharness.https.window.js b/tests/wpt/web-platform-tests/battery-status/battery-interface-idlharness.https.window.js index 3db3e16e2e4..b33c82e426c 100644 --- a/tests/wpt/web-platform-tests/battery-status/battery-interface-idlharness.https.window.js +++ b/tests/wpt/web-platform-tests/battery-status/battery-interface-idlharness.https.window.js @@ -6,7 +6,7 @@ 'use strict'; idl_test( - ['battery'], + ['battery-status'], ['dom', 'html'], async idl_array => { idl_array.add_objects({ @@ -15,6 +15,5 @@ idl_test( }) self.manager = await navigator.getBattery(); - }, - 'Test IDL implementation of Battery Status API' + } ); diff --git a/tests/wpt/web-platform-tests/bluetooth/idl/idlharness.tentative.https.window.js b/tests/wpt/web-platform-tests/bluetooth/idl/idlharness.tentative.https.window.js index 4bacd5688f7..f4e6d958696 100644 --- a/tests/wpt/web-platform-tests/bluetooth/idl/idlharness.tentative.https.window.js +++ b/tests/wpt/web-platform-tests/bluetooth/idl/idlharness.tentative.https.window.js @@ -20,6 +20,5 @@ idl_test( Bluetooth: ['navigator.bluetooth'], BluetoothAdvertisingEvent: ['event'], }); - }, - 'web-bluetooth interfaces.' + } ); diff --git a/tests/wpt/web-platform-tests/content-security-policy/embedded-enforcement/idlharness.window.js b/tests/wpt/web-platform-tests/content-security-policy/embedded-enforcement/idlharness.window.js index 6ac306ca0a1..2845f82c955 100644 --- a/tests/wpt/web-platform-tests/content-security-policy/embedded-enforcement/idlharness.window.js +++ b/tests/wpt/web-platform-tests/content-security-policy/embedded-enforcement/idlharness.window.js @@ -12,6 +12,5 @@ idl_test( idl_array.add_objects({ HTMLIFrameElement: ['document.createElement("iframe")'], }); - }, - 'csp-embedded-enforcement IDL' + } ); diff --git a/tests/wpt/web-platform-tests/content-security-policy/securitypolicyviolation/idlharness.window.js b/tests/wpt/web-platform-tests/content-security-policy/securitypolicyviolation/idlharness.window.js index 361282a327d..fc5e65d6cfd 100644 --- a/tests/wpt/web-platform-tests/content-security-policy/securitypolicyviolation/idlharness.window.js +++ b/tests/wpt/web-platform-tests/content-security-policy/securitypolicyviolation/idlharness.window.js @@ -14,6 +14,5 @@ idl_test( 'new SecurityPolicyViolationEvent("securitypolicyviolation")' ] }) - }, - 'Test Content Security Policy IDL implementation' + } ); diff --git a/tests/wpt/web-platform-tests/cookie-store/idlharness.tentative.https.html b/tests/wpt/web-platform-tests/cookie-store/idlharness.tentative.https.html index 864b6994f0d..fafe79ad570 100644 --- a/tests/wpt/web-platform-tests/cookie-store/idlharness.tentative.https.html +++ b/tests/wpt/web-platform-tests/cookie-store/idlharness.tentative.https.html @@ -17,7 +17,6 @@ idl_test( CookieStore: ['cookieStore'], CookieChangeEvent: ['new CookieChangeEvent("change")'], }); - }, - 'Interface test' + } ); diff --git a/tests/wpt/web-platform-tests/css/css-animations/idlharness.html b/tests/wpt/web-platform-tests/css/css-animations/idlharness.html index b25b97048a4..1d3ed2b9b80 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/idlharness.html +++ b/tests/wpt/web-platform-tests/css/css-animations/idlharness.html @@ -39,8 +39,8 @@ CSSKeyframesRule: ['keyframes'], CSSKeyframeRule: ['keyframes.cssRules[0]'], }); - }, - 'Test css-animations IDL implementation'); + } + ); diff --git a/tests/wpt/web-platform-tests/css/css-counter-styles/idlharness.html b/tests/wpt/web-platform-tests/css/css-counter-styles/idlharness.html index b36a5de12f0..e914b41b0e4 100644 --- a/tests/wpt/web-platform-tests/css/css-counter-styles/idlharness.html +++ b/tests/wpt/web-platform-tests/css/css-counter-styles/idlharness.html @@ -28,7 +28,6 @@ idl_array.add_objects({ CSSCounterStyleRule: ['counter'], }); - }, - 'css-counter-styles interfaces' + } ); diff --git a/tests/wpt/web-platform-tests/css/css-font-loading/idlharness.https.html b/tests/wpt/web-platform-tests/css/css-font-loading/idlharness.https.html index 9e3d45fbe19..61a99e01b51 100644 --- a/tests/wpt/web-platform-tests/css/css-font-loading/idlharness.https.html +++ b/tests/wpt/web-platform-tests/css/css-font-loading/idlharness.https.html @@ -18,7 +18,6 @@ idl_test( FontFaceSetLoadEvent: ['new FontFaceSetLoadEvent("type")'], FontFaceSet: ['document.fonts'], }); - }, - 'css-font-loading interfaces' + } ); diff --git a/tests/wpt/web-platform-tests/css/css-images/idlharness.html b/tests/wpt/web-platform-tests/css/css-images/idlharness.html index ec9c3584c2b..17bccbddcee 100644 --- a/tests/wpt/web-platform-tests/css/css-images/idlharness.html +++ b/tests/wpt/web-platform-tests/css/css-images/idlharness.html @@ -13,7 +13,6 @@ ['cssom'], idl_array => { // No objects, - }, - 'Test IDL implementation of css-masking' + } ); diff --git a/tests/wpt/web-platform-tests/css/css-masking/idlharness.html b/tests/wpt/web-platform-tests/css/css-masking/idlharness.html index 41bab663d40..c415eaaa67a 100644 --- a/tests/wpt/web-platform-tests/css/css-masking/idlharness.html +++ b/tests/wpt/web-platform-tests/css/css-masking/idlharness.html @@ -17,8 +17,7 @@ SVGClipPathElement: [document.querySelector('#clip1')], SVGMaskElement: [document.querySelector('#mask1')], }); - }, - 'Test IDL implementation of css-masking' + } ); diff --git a/tests/wpt/web-platform-tests/css/css-parser-api/idlharness.html b/tests/wpt/web-platform-tests/css/css-parser-api/idlharness.html index 79b607954dd..078a1081ca4 100644 --- a/tests/wpt/web-platform-tests/css/css-parser-api/idlharness.html +++ b/tests/wpt/web-platform-tests/css/css-parser-api/idlharness.html @@ -13,7 +13,6 @@ ['cssom'], idl_array => { // No objects - }, - 'CSS-Parser-API interfaces' + } ); diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/typedom.tentative.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/typedom.tentative.html index 9fff08004cb..065280614cc 100644 --- a/tests/wpt/web-platform-tests/css/css-properties-values-api/typedom.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/typedom.tentative.html @@ -13,16 +13,22 @@ // Properties are generated on demand, as `--prop-${g_counter}`. let g_counter = 1; +// Generate a new property name. +function gen_name() { + let name = `--prop-${g_counter}`; + g_counter++; + return name; +} + // Generate a property and return its name. function gen_prop(syntax, initialValue) { - let name = `--prop-${g_counter}`; + let name = gen_name(); CSS.registerProperty({ name: name, syntax: syntax, initialValue: initialValue, inherits: false }); - g_counter++; return name; } @@ -50,6 +56,28 @@ function assert_computed_type(name, value, expected) { } } +function assert_attribute_get_type(syntax, value, expected) { + let name = gen_name(); + target.style = `${name}: ${value}`; + + assert_true(target.attributeStyleMap.get(name) instanceof CSSUnparsedValue); + + CSS.registerProperty({ + name: name, + syntax: syntax, + initialValue: value, + inherits: false + }); + + if (expected == CSSStyleValue) { + assert_false(target.attributeStyleMap.get(name) instanceof CSSUnparsedValue); + } + + assert_true(target.attributeStyleMap.get(name) instanceof expected); +} + +// computedStyleMap + test(function(){ let name = gen_prop('*', 'if(){}'); assert_true(target.computedStyleMap().get(name) instanceof CSSUnparsedValue); @@ -164,4 +192,110 @@ test(function(){ assert_true(target.computedStyleMap().getAll(name).every(x => x instanceof CSSUnitValue)); }, 'All computed values correctly reified in comma-separated list'); +// attributeStyleMap.get + +test(function(){ + let name1 = gen_prop('', '100px'); + let name2 = gen_prop('', '0px'); + target.style = `${name2}: var(${name1})`; + assert_true(target.attributeStyleMap.get(name2) instanceof CSSUnparsedValue); +}, 'attributeStyleMap.get returns CSSUnparsedValue for value with var references'); + +test(function(){ + let name1 = gen_prop('', '100px'); + let name2 = gen_prop('#', '0px'); + target.style = `${name2}: 1px, var(${name1}), 3px`; + assert_true(target.attributeStyleMap.get(name2) instanceof CSSUnparsedValue); +}, 'attributeStyleMap.get returns CSSUnparsedValue for value with var reference in list'); + +test(function(){ + assert_attribute_get_type('*', 'if(){}', CSSUnparsedValue); +}, 'attributeStyleMap.get returns CSSUnparsedValue for *'); + +test(function(){ + assert_attribute_get_type('', '42deg', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for '); + +test(function(){ + assert_attribute_get_type('', '#fefefe', CSSStyleValue); +}, 'attributeStyleMap.get returns CSSStyleValue for '); + +test(function(){ + assert_attribute_get_type('', 'none', CSSKeywordValue); +}, 'attributeStyleMap.get returns CSSKeywordValue for '); + +test(function(){ + assert_attribute_get_type('', 'url(thing.png)', CSSImageValue); +}, 'attributeStyleMap.get returns CSSImageValue for '); + +test(function(){ + assert_attribute_get_type('', '100', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for '); + +test(function(){ + assert_attribute_get_type('', '10%', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for [10%]'); + +test(function(){ + assert_attribute_get_type('', '10px', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for [10px]'); + +test(function(){ + assert_attribute_get_type('', 'calc(10px + 10%)', CSSMathSum); +}, 'attributeStyleMap.get returns CSSMathSum for [calc(10px + 10%)]'); + +test(function(){ + assert_attribute_get_type('', '10px', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for '); + +test(function(){ + assert_attribute_get_type('', '42', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for '); + +test(function(){ + assert_attribute_get_type('', '10%', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for '); + +test(function(){ + assert_attribute_get_type('', '300dpi', CSSUnitValue); +}, 'attributeStyleMap.get returns CSSUnitValue for '); + +test(function(){ + assert_attribute_get_type('