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

Side by Side Diff: LayoutTests/fast/dom/css-delete-doc.html

Issue 6474050: Revert 78101 - Merge r76728, crbug 68263 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 9 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/css-delete-doc-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 <html>
2 <head>
3 <script src="../js/resources/js-test-pre.js"></script>
4 <script>
5
6 window.jsTestIsAsync = true;
7
8 var iteration = 0;
9 var sheet, rules;
10
11 function step1(opt_media)
12 {
13 var doc = document.implementation.createHTMLDocument();
14 var style = doc.createElement('style');
15 doc.head.appendChild(style);
16 sheet = style.sheet;
17 if (opt_media) {
18 sheet.insertRule('@media screen { body { background: red; } p { color: w hite; } }', 0);
19 rules = sheet.rules[0];
20 sheet.removeRule(0);
21 sheet = 0;
22 }
23
24 doc.head.removeChild(style);
25 document.adoptNode(style);
26 delete doc;
27 gc();
28 setTimeout(opt_media ? step2a : step2b, 10);
29 }
30
31 function step2a()
32 {
33 try {
34 rules.insertRule('a { }', 1);
35 if (iteration++ == 10) {
36 iteration = 0;
37 step1(true);
38 return;
39 }
40
41 setTimeout('step1(false)', 0);
42 }
43 catch(e) {
44 document.body.innerText = 'FAIL, threw exception.';
45 if (window.layoutTestController)
46 layoutTestController.notifyDone();
47
48 }
49 }
50
51 function step2b()
52 {
53 try {
54 sheet.insertRule('a { }', 0);
55 if (iteration++ == 10) {
56 document.body.innerText = 'PASS';
57 if (window.layoutTestController)
58 layoutTestController.notifyDone();
59 return;
60 }
61
62 setTimeout('step1(true)', 0);
63 }
64 catch(e) {
65 document.body.innerText = 'FAIL, threw exception.';
66 if (window.layoutTestController)
67 layoutTestController.notifyDone();
68
69 }
70 }
71
72 </script>
73 <script src="../js/resources/js-test-post.js"></script>
74 </head>
75 <body onload="step1()">
76 Running...
77 </body>
78 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/css-delete-doc-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698