mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444
This commit is contained in:
parent
25e8bf69e6
commit
665817d2a6
35333 changed files with 1818077 additions and 16036 deletions
|
@ -0,0 +1,24 @@
|
|||
"use strict";
|
||||
// https://console.spec.whatwg.org/#count
|
||||
|
||||
test(() => {
|
||||
let countLabelToStringCalled = false;
|
||||
|
||||
console.count({
|
||||
toString() {
|
||||
countLabelToStringCalled = true;
|
||||
}
|
||||
});
|
||||
|
||||
assert_true(countLabelToStringCalled, "toString() must be called on count()'s label when label is an object");
|
||||
}, "console.count()'s label gets converted to string via label.toString() when label is an object");
|
||||
|
||||
test(() => {
|
||||
assert_throws({name: "Error"}, () => {
|
||||
console.count({
|
||||
toString() {
|
||||
throw new Error("conversion error");
|
||||
}
|
||||
});
|
||||
}, "count() must re-throw any exceptions thrown by label.toString() conversion");
|
||||
}, "console.count() throws exceptions generated by erroneous label.toString() conversion");
|
Loading…
Add table
Add a link
Reference in a new issue