mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326
This commit is contained in:
parent
462c272380
commit
1f531f66ea
5377 changed files with 174916 additions and 84369 deletions
|
@ -14,16 +14,18 @@
|
|||
assert_throws(new TypeError(), function () {
|
||||
obs.observe({entryTypes: "mark"});
|
||||
});
|
||||
assert_throws(new TypeError(), function () {
|
||||
obs.observe({entryTypes: []});
|
||||
});
|
||||
assert_throws(new TypeError(), function () {
|
||||
obs.observe({entryTypes: ["this-cannot-match-an-entryType"]});
|
||||
});
|
||||
assert_throws(new TypeError(), function () {
|
||||
obs.observe({entryTypes: ["marks","navigate", "resources"]});
|
||||
});
|
||||
}, "Empty sequence entryTypes throws a TypeError");
|
||||
}, "entryTypes must be a sequence or throw a TypeError");
|
||||
|
||||
test(function () {
|
||||
var obs = new PerformanceObserver(function () { return true; });
|
||||
obs.observe({entryTypes: []});
|
||||
}, "Empty sequence entryTypes is a no-op");
|
||||
|
||||
test(function () {
|
||||
var obs = new PerformanceObserver(function () { return true; });
|
||||
obs.observe({entryTypes: ["this-cannot-match-an-entryType"]});
|
||||
obs.observe({entryTypes: ["marks","navigate", "resources"]});
|
||||
}, "Unknown entryTypes are no-op");
|
||||
|
||||
test(function () {
|
||||
var obs = new PerformanceObserver(function () { return true; });
|
||||
|
@ -32,6 +34,27 @@
|
|||
obs.observe({entryTypes: ["mark"], others: true});
|
||||
}, "Filter unsupported entryType entryType names within the entryTypes sequence");
|
||||
|
||||
async_test(function (t) {
|
||||
var finish = t.step_func(function () { t.done(); });
|
||||
var observer = new PerformanceObserver(
|
||||
function (entryList, obs) {
|
||||
var self = this;
|
||||
t.step(function () {
|
||||
assert_true(entryList instanceof PerformanceObserverEntryList, "first callback parameter must be a PerformanceObserverEntryList instance");
|
||||
assert_true(obs instanceof PerformanceObserver, "second callback parameter must be a PerformanceObserver instance");
|
||||
assert_equals(observer, self, "observer is the this value");
|
||||
assert_equals(observer, obs, "observer is second parameter");
|
||||
assert_equals(self, obs, "this and second parameter are the same");
|
||||
observer.disconnect();
|
||||
finish();
|
||||
});
|
||||
}
|
||||
);
|
||||
self.performance.clearMarks();
|
||||
observer.observe({entryTypes: ["mark"]});
|
||||
self.performance.mark("mark1");
|
||||
}, "Check observer callback parameter and this values");
|
||||
|
||||
async_test(function (t) {
|
||||
var observer = new PerformanceObserver(
|
||||
t.step_func(function (entryList, obs) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue