blob: 2bba396a6b69ebad56ad4f1b135cb8ad49d321b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// META: script=performanceobservers.js
async_test(function (t) {
const observer = new PerformanceObserver(
t.step_func(function (entryList) {
checkEntries(entryList.getEntries(),
[{ entryType: "mark", name: "early"}]);
observer.disconnect();
t.done();
})
);
performance.mark("early");
// This call will not trigger anything.
observer.observe({type: "mark"});
// This call should override the previous call and detect the early mark.
observer.observe({type: "mark", buffered: true});
}, "Two calls of observe() with the same 'type' cause override.");
|