AX: <svg> elements with labels and no accessible contents are exposed as empty AXGroups
[WebKit-https.git] / LayoutTests / performance-api / performance-observer-no-document-leak.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <iframe id="testFrame" src="resources/performance-observer-no-document-leak-frame.html"></iframe>
8 <script>
9 description("Tests that using PerformanceObserver does not cause the document to get leaked.");
10 window.jsTestIsAsync = true;
11
12 function documentShouldDie(documentIdentifier)
13 {
14     return new Promise(function(resolve, reject) {
15         handle = setInterval(function() {
16             gc();
17             if (!internals.isDocumentAlive(documentIdentifier)) {
18                 clearInterval(handle);
19                 resolve();
20             }
21         }, 10);
22     });
23 }
24
25 onload = function() {
26     setTimeout(function() {
27         let frameDocumentIdentifier = internals.documentIdentifier(testFrame.contentDocument);
28         testFrame.remove();
29         documentShouldDie(frameDocumentIdentifier).then(function() {
30             testPassed("Document did not leak");
31             finishJSTest();
32         });
33     }, 10);
34 }
35 </script>
36 <script src="../resources/js-test-post.js"></script>
37 </body>
38 </html>