OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> |
| 5 <script> |
| 6 if (window.testRunner) |
| 7 testRunner.waitUntilDone(); |
| 8 |
| 9 function runTest() |
| 10 { |
| 11 var host = document.getElementById('host'); |
| 12 var sr = host.createShadowRoot(); |
| 13 sr.innerHTML = '<style>background-color: red;</style><div>Shadow</div>'; |
| 14 |
| 15 // Need to use ShadowRoot.styleSheets API to create a styleSheetList. |
| 16 sr.styleSheets.length; |
| 17 host.parentNode.removeChild(host); |
| 18 |
| 19 setTimeout(function() { |
| 20 gc(); |
| 21 gc(); // FIXME: remove one gc() after refactoring gc()'s c++ code. |
| 22 |
| 23 if (window.testRunner) |
| 24 testRunner.notifyDone(); |
| 25 }, 0); |
| 26 } |
| 27 </script> |
| 28 </head> |
| 29 <body onload="runTest()"> |
| 30 <div id='host'></div> |
| 31 <pre id='console'></pre> |
| 32 </body> |
| 33 <script> |
| 34 description('Test for crbug.com/337059: accessing StyleSheetList::document() fro
m GC causes crash.'); |
| 35 </script> |
| 36 </html> |
OLD | NEW |