1 <p>This test checks for a crash that once happened due to cloned nodes copying style
2 declaration pointers without retaining them.
5 <p>PASS: You didn't crash.
</p>
7 <div style=
"width: 100px;">hello world
</div>
8 <div style=
"width: 100px;">hello world
</div>
9 <div style=
"width: 100px;">hello world
</div>
10 <div style=
"width: 100px;">hello world
</div>
11 <div style=
"width: 100px;">hello world
</div>
12 <div style=
"width: 100px;">hello world
</div>
13 <div style=
"width: 100px;">hello world
</div>
14 <div style=
"width: 100px;">hello world
</div>
15 <div style=
"width: 100px;">hello world
</div>
16 <div style=
"width: 100px;">hello world
</div>
17 <div style=
"width: 100px;">hello world
</div>
18 <div style=
"width: 100px;">hello world
</div>
19 <div style=
"width: 100px;">hello world
</div>
20 <div style=
"width: 100px;">hello world
</div>
21 <div style=
"width: 100px;">hello world
</div>
22 <div style=
"width: 100px;">hello world
</div>
23 <div style=
"width: 100px;">hello world
</div>
24 <div style=
"width: 100px;">hello world
</div>
25 <div style=
"width: 100px;">hello world
</div>
26 <div style=
"width: 100px;">hello world
</div>
27 <div style=
"width: 100px;">hello world
</div>
28 <div style=
"width: 100px;">hello world
</div>
29 <div style=
"width: 100px;">hello world
</div>
30 <div style=
"width: 100px;">hello world
</div>
31 <div style=
"width: 100px;">hello world
</div>
32 <div style=
"width: 100px;">hello world
</div>
33 <div style=
"width: 100px;">hello world
</div>
34 <div style=
"width: 100px;">hello world
</div>
35 <div style=
"width: 100px;">hello world
</div>
36 <div style=
"width: 100px;">hello world
</div>
37 <div style=
"width: 100px;">hello world
</div>
38 <div style=
"width: 100px;">hello world
</div>
39 <div style=
"width: 100px;">hello world
</div>
40 <div style=
"width: 100px;">hello world
</div>
41 <div style=
"width: 100px;">hello world
</div>
42 <div style=
"width: 100px;">hello world
</div>
43 <div style=
"width: 100px;">hello world
</div>
44 <div style=
"width: 100px;">hello world
</div>
45 <div style=
"width: 100px;">hello world
</div>
46 <div style=
"width: 100px;">hello world
</div>
47 <div style=
"width: 100px;">hello world
</div>
48 <div style=
"width: 100px;">hello world
</div>
49 <div style=
"width: 100px;">hello world
</div>
50 <div style=
"width: 100px;">hello world
</div>
51 <div style=
"width: 100px;">hello world
</div>
52 <div style=
"width: 100px;">hello world
</div>
53 <div style=
"width: 100px;">hello world
</div>
54 <div style=
"width: 100px;">hello world
</div>
55 <div style=
"width: 100px;">hello world
</div>
56 <div style=
"width: 100px;">hello world
</div>
57 <div style=
"width: 100px;">hello world
</div>
58 <div style=
"width: 100px;">hello world
</div>
59 <div style=
"width: 100px;">hello world
</div>
60 <div style=
"width: 100px;">hello world
</div>
61 <div style=
"width: 100px;">hello world
</div>
62 <div style=
"width: 100px;">hello world
</div>
63 <div style=
"width: 100px;">hello world
</div>
64 <div style=
"width: 100px;">hello world
</div>
65 <div style=
"width: 100px;">hello world
</div>
66 <div style=
"width: 100px;">hello world
</div>
67 <div style=
"width: 100px;">hello world
</div>
68 <div style=
"width: 100px;">hello world
</div>
69 <div style=
"width: 100px;">hello world
</div>
70 <div style=
"width: 100px;">hello world
</div>
71 <div style=
"width: 100px;">hello world
</div>
72 <div style=
"width: 100px;">hello world
</div>
73 <div style=
"width: 100px;">hello world
</div>
74 <div style=
"width: 100px;">hello world
</div>
75 <div style=
"width: 100px;">hello world
</div>
76 <div style=
"width: 100px;">hello world
</div>
77 <div style=
"width: 100px;">hello world
</div>
78 <div style=
"width: 100px;">hello world
</div>
79 <div style=
"width: 100px;">hello world
</div>
80 <div style=
"width: 100px;">hello world
</div>
81 <div style=
"width: 100px;">hello world
</div>
82 <div style=
"width: 100px;">hello world
</div>
83 <div style=
"width: 100px;">hello world
</div>
84 <div style=
"width: 100px;">hello world
</div>
85 <div style=
"width: 100px;">hello world
</div>
86 <div style=
"width: 100px;">hello world
</div>
87 <div style=
"width: 100px;">hello world
</div>
88 <div style=
"width: 100px;">hello world
</div>
89 <div style=
"width: 100px;">hello world
</div>
90 <div style=
"width: 100px;">hello world
</div>
91 <div style=
"width: 100px;">hello world
</div>
92 <div style=
"width: 100px;">hello world
</div>
93 <div style=
"width: 100px;">hello world
</div>
94 <div style=
"width: 100px;">hello world
</div>
95 <div style=
"width: 100px;">hello world
</div>
96 <div style=
"width: 100px;">hello world
</div>
97 <div style=
"width: 100px;">hello world
</div>
98 <div style=
"width: 100px;">hello world
</div>
99 <div style=
"width: 100px;">hello world
</div>
100 <div style=
"width: 100px;">hello world
</div>
101 <div style=
"width: 100px;">hello world
</div>
102 <div style=
"width: 100px;">hello world
</div>
103 <div style=
"width: 100px;">hello world
</div>
104 <div style=
"width: 100px;">hello world
</div>
105 <div style=
"width: 100px;">hello world
</div>
106 <div style=
"width: 100px;">hello world
</div>
109 function garbageCollect()
111 if (window
.GCController
) {
112 GCController
.collect();
116 for (var i
= 0; i
< 10000; i
++) {
117 var o
= new Object();
121 if (window
.testRunner
)
122 testRunner
.dumpAsText();
124 // Create an army of clones, removing the originals.
126 var divs
= document
.getElementsByTagName('div');
127 var divClones
= new Array();
130 while (div
= divs
[0]) {
131 divClones
.push(div
.cloneNode(false));
132 div
.parentNode
.removeChild(div
);
135 // Garbage collect to force destruction of the originals.
139 // Now try setting properties on the clones' style declarations.
141 for (var i
= 0; i
< divClones
.length
; i
++) {
142 divClones
[i
].style
.width
= "100px";