Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(681)

Side by Side Diff: LayoutTests/fast/dom/shadow/access-document-of-detached-stylesheetlist-crash.html

Issue 211933008: Remove multiple GC calls and replace GCController.collect calls with GCController.collectAll (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert change to worker-event-listener Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script> 5 <script>
6 if (window.testRunner) 6 if (window.testRunner)
7 testRunner.waitUntilDone(); 7 testRunner.waitUntilDone();
8 8
9 function runTest() 9 function runTest()
10 { 10 {
11 var host = document.getElementById('host'); 11 var host = document.getElementById('host');
12 var sr = host.createShadowRoot(); 12 var sr = host.createShadowRoot();
13 sr.innerHTML = '<style>background-color: red;</style><div>Shadow</div>'; 13 sr.innerHTML = '<style>background-color: red;</style><div>Shadow</div>';
14 14
15 // Need to use ShadowRoot.styleSheets API to create a styleSheetList. 15 // Need to use ShadowRoot.styleSheets API to create a styleSheetList.
16 sr.styleSheets.length; 16 sr.styleSheets.length;
17 host.parentNode.removeChild(host); 17 host.parentNode.removeChild(host);
18 18
19 setTimeout(function() { 19 setTimeout(function() {
20 gc(); 20 gc();
21 gc(); // FIXME: remove one gc() after refactoring gc()'s c++ code.
22 21
23 if (window.testRunner) 22 if (window.testRunner)
24 testRunner.notifyDone(); 23 testRunner.notifyDone();
25 }, 0); 24 }, 0);
26 } 25 }
27 </script> 26 </script>
28 </head> 27 </head>
29 <body onload="runTest()"> 28 <body onload="runTest()">
30 <div id='host'></div> 29 <div id='host'></div>
31 <pre id='console'></pre> 30 <pre id='console'></pre>
32 </body> 31 </body>
33 <script> 32 <script>
34 description('Test for crbug.com/337059: accessing StyleSheetList::document() fro m GC causes crash.'); 33 description('Test for crbug.com/337059: accessing StyleSheetList::document() fro m GC causes crash.');
35 </script> 34 </script>
36 </html> 35 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/resources/script-element-gc.js ('k') | LayoutTests/fast/events/message-port-gc-closed.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698