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

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

Issue 170403002: StyleSheetList::document() should return null after detaching the StyleSheetList from document. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added a layout test Created 6 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/access-document-of-detached-stylesheetlist-crash-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/access-document-of-detached-stylesheetlist-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698