blob: cac97bea0755c1182956fdf94c98ee78ca40b017 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// META: script=performanceobservers.js
async_test(function (t) {
const observer = new PerformanceObserver(
t.step_func(function (entryList) {
// There should be no mark entry.
checkEntries(entryList.getEntries(),
[{ entryType: "measure", name: "b"}]);
t.done();
})
);
observer.observe({type: "mark"});
// Disconnect the observer.
observer.disconnect();
// Now, only observe measure.
observer.observe({type: "measure"});
performance.mark("a");
performance.measure("b");
}, "Types observed are forgotten when disconnect() is called.");
|