Update web-platform-tests to revision 86579034357501943927f3dc4abf75d76c477383

This commit is contained in:
WPT Sync Bot 2018-09-08 21:32:03 -04:00
parent 9c1c58a498
commit f708edc5ea
20 changed files with 160 additions and 81 deletions

View file

@ -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": {}
},
{

View file

@ -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