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

Side by Side Diff: LayoutTests/fast/dom/StyleSheet/discarded-sheet-owner-null.html

Issue 18854017: StyleSheet.ownerNode should be null when it gets orphaned. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 7 years, 5 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/StyleSheet/discarded-sheet-owner-null-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="../../js/resources/js-test-pre.js"></script>
5 <link id="target" rel="stylesheet" href="old.css">
6 </head>
7 <body>
8 <script>
9 description('This tests that ownerNode of orphan sheet is null.');
10
11 jsTestIsAsync = true;
12
13 window.onload = function()
14 {
15 oldSheet = target.sheet;
16 target.setAttribute("href", "new.css");
17
18 function waitAndTest() {
19 if (0 <= target.sheet.href.indexOf("old.css"))
20 return window.setTimeout(waitAndTest, 0);
21 shouldBeNull("oldSheet.ownerNode");
22 if (oldSheet.ownerNode)
23 return finishJSTest();
24 // We need to exercise cached case as well, which can be executed with a reload.
25 if (0 <= window.location.toString().indexOf("?reloaded"))
26 return finishJSTest();
27 window.location = window.location.toString() + "?reloaded";
28 };
29
30 window.setTimeout(waitAndTest, 0);
31 };
32
33 </script>
34 <script src="../../js/resources/js-test-post.js"></script>
35 </body>
36 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/StyleSheet/discarded-sheet-owner-null-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698