OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../js/resources/js-test-pre.js"></script> | 2 <script src="../../js/resources/js-test-pre.js"></script> |
3 <script> | 3 <script> |
4 | 4 |
5 description('This tests that accessing ownerNode on a disconnected style sheet d
oes not crash'); | 5 description('This tests that accessing ownerNode on a disconnected style sheet d
oes not crash'); |
6 | 6 |
7 jsTestIsAsync = true; | 7 jsTestIsAsync = true; |
8 | 8 |
9 window.onload = function() { | 9 window.onload = function() { |
10 var innerDocument = document.querySelector('iframe').contentDocument; | 10 var innerDocument = document.querySelector('iframe').contentDocument; |
11 document.body.removeChild(document.querySelector('iframe')); | 11 document.body.removeChild(document.querySelector('iframe')); |
12 | 12 |
13 innerDocument.querySelector('link').rel = 'icon'; // this triggers process | 13 innerDocument.querySelector('link').rel = 'icon'; // this triggers process |
14 innerDocument.documentElement.textContent = ''; | 14 innerDocument.documentElement.textContent = ''; |
15 | 15 |
16 gc(); | 16 gc(); |
17 innerDocument.styleSheets[0] && innerDocument.styleSheets[0].ownerNode; | 17 innerDocument.styleSheets[0] && innerDocument.styleSheets[0].ownerNode; |
18 finishJSTest(); | 18 finishJSTest(); |
19 }; | 19 }; |
20 | 20 |
21 </script> | 21 </script> |
22 <iframe src="data:text/html,<link rel='stylesheet' href='data:text/css,*{}'>"></
iframe> | 22 <iframe src="data:text/html,<link rel='stylesheet' href='data:text/css,*{}'>"></
iframe> |
23 <script src="../../js/resources/js-test-post.js"></script> | 23 <script src="../../js/resources/js-test-post.js"></script> |
OLD | NEW |