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 dd4ffcf4345..76b398963ae 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,4 +1,5 @@ [url-in-tags-revoke.window.html] + expected: TIMEOUT [Fetching a blob URL immediately before revoking it works in an iframe.] expected: FAIL @@ -14,3 +15,6 @@ [Opening a blob URL in a new window by clicking an tag works immediately before revoking the URL.] expected: FAIL + [Fetching a blob URL immediately before revoking it works in diff --git a/tests/wpt/web-platform-tests/docs/_writing-tests/testharness-api.md b/tests/wpt/web-platform-tests/docs/_writing-tests/testharness-api.md index bb552453291..952c8365fb7 100644 --- a/tests/wpt/web-platform-tests/docs/_writing-tests/testharness-api.md +++ b/tests/wpt/web-platform-tests/docs/_writing-tests/testharness-api.md @@ -161,9 +161,9 @@ Test is finished. promise_test(test_function, name, properties) ``` -`test_function` is a function that receives a test as an argument and returns a -promise. The test completes when the returned promise resolves. The test fails -if the returned promise rejects. +`test_function` is a function that receives a test as an argument. It must +return a promise. The test completes when the returned promise resolves. The +test fails if the returned promise rejects. E.g.: diff --git a/tests/wpt/web-platform-tests/resources/test/tests/functional/promise.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/promise.html index bdf6dc3ec2a..9db1dec0f9e 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/functional/promise.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/promise.html @@ -100,11 +100,15 @@ promise_test( function() { return true; }, - "promise_test with function that doesn't return a Promise"); + "promise_test with function that doesn't return a Promise (should FAIL)"); promise_test(function(){}, "promise_test with function that doesn't return anything"); +promise_test( + function() { return { then: 23 }; }, + "promise_test that returns a non-thenable (should FAIL)"); + promise_test( function() { return Promise.reject("Expected rejection"); @@ -170,15 +174,21 @@ promise_test( "properties": {} }, { - "status_string": "PASS", - "name": "promise_test with function that doesn't return a Promise", - "message": null, + "status_string": "FAIL", + "name": "promise_test with function that doesn't return a Promise (should FAIL)", + "message": "promise_test: test body must return a 'thenable' object (received an object with no `then` method)", "properties": {} }, { "status_string": "FAIL", "name": "promise_test with function that doesn't return anything", - "message": "assert_not_equals: got disallowed value undefined", + "message": "promise_test: test body must return a 'thenable' object (received undefined)", + "properties": {} + }, + { + "status_string": "FAIL", + "name": "promise_test that returns a non-thenable (should FAIL)", + "message": "promise_test: test body must return a 'thenable' object (received an object with no `then` method)", "properties": {} }, { diff --git a/tests/wpt/web-platform-tests/resources/testharness.js b/tests/wpt/web-platform-tests/resources/testharness.js index f0c24635017..85e211ff60a 100644 --- a/tests/wpt/web-platform-tests/resources/testharness.js +++ b/tests/wpt/web-platform-tests/resources/testharness.js @@ -576,7 +576,12 @@ policies and contribution forms [3]. var promise = test.step(func, test, test); test.step(function() { - assert_not_equals(promise, undefined); + assert(!!promise, "promise_test", null, + "test body must return a 'thenable' object (received ${value})", + {value:promise}); + assert(typeof promise.then === "function", "promise_test", null, + "test body must return a 'thenable' object (received an object with no `then` method)", + null); }); // Test authors may use the `step` method within a diff --git a/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-list.js b/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-list.js index 8d027178351..e2f3adcd7af 100644 --- a/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-list.js +++ b/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-list.js @@ -361,13 +361,13 @@ const gCSSProperties = { 'color-interpolation': { // https://svgwg.org/svg2-draft/painting.html#ColorInterpolationProperty types: [ - { type: 'discrete', options: [ [ 'linearRGB', 'auto' ] ] } + { type: 'discrete', options: [ [ 'linearrgb', 'auto' ] ] } ] }, 'color-interpolation-filters': { // https://drafts.fxtf.org/filters-1/#propdef-color-interpolation-filters types: [ - { type: 'discrete', options: [ [ 'sRGB', 'linearRGB' ] ] } + { type: 'discrete', options: [ [ 'srgb', 'linearrgb' ] ] } ] }, 'column-count': {