AX: <svg> elements with labels and no accessible contents are exposed as empty AXGroups
[WebKit-https.git] / LayoutTests / performance-api / performance-observer-order.html
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <script>
8 description("Ensure PerformanceObservers are notified in order of registration (observe).");
9 window.jsTestIsAsync = true;
10
11 window.count = 0;
12
13 let observer1 = new PerformanceObserver((list) => {
14     count++;
15     testPassed("PerformanceObserver 1 callback fired");
16     shouldBe(`count`, `1`);
17 });
18
19 let observer2 = new PerformanceObserver((list) => {
20     count++;
21     testPassed("PerformanceObserver 2 callback fired");
22     shouldBe(`count`, `2`);
23 });
24
25 // Ensure creation doesn't impact order.
26 let observerSpecial = new PerformanceObserver((list) => {
27     count++;
28     testPassed("PerformanceObserver 6 callback fired");
29     shouldBe(`count`, `6`);
30     finishJSTest();
31 });
32
33 let observer3 = new PerformanceObserver((list) => {
34     count++;
35     testPassed("PerformanceObserver 3 callback fired");
36     shouldBe(`count`, `3`);
37 });
38
39 let observer4 = new PerformanceObserver((list) => {
40     count++;
41     testPassed("PerformanceObserver 4 callback fired");
42     shouldBe(`count`, `4`);
43 });
44
45 let observer5 = new PerformanceObserver((list) => {
46     count++;
47     testPassed("PerformanceObserver 5 callback fired");
48     shouldBe(`count`, `5`);
49 });
50
51 // Register all in order.
52 for (let o of [observer1, observer2, observerSpecial, observer3, observer4, observer5])
53     o.observe({entryTypes: ["mark"]});
54
55 // Unregister and re-register moves this to the back of the line.
56 observerSpecial.disconnect();
57 observerSpecial.observe({entryTypes: ["mark"]});
58
59 performance.mark("mark1");
60 </script>
61 <script src="../resources/js-test-post.js"></script>
62 </body>
63 </html>