2 // This tests that we don't crash if a CachedResource load is cancelled due to the removal
3 // of its last client, and it is deleted during cancellation. See crbug.com/258419
5 if (window
.testRunner
) {
6 testRunner
.dumpAsText();
7 testRunner
.waitUntilDone();
10 var scripts
= document
.getElementsByTagName("script");
11 for(var i
= 0; i
< scripts
.length
; i
++) {
12 scripts
[i
].parentNode
.removeChild(scripts
[i
]);
16 document
.execCommand("SelectAll", false)
18 document
.addEventListener("readystatechange", rsc
, false);
20 var inSubtreeModified
= false;
21 var subtreeModifiedFiredCount
= 0;
22 function subtreeModified() {
23 if (subtreeModifiedFiredCount
>= 20) {
24 if (window
.testRunner
)
25 testRunner
.notifyDone();
28 if (inSubtreeModified
)
30 subtreeModifiedFiredCount
++;
31 inSubtreeModified
= true;
33 document
.execCommand("SelectAll", false)
34 window
.getSelection().collapseToStart()
35 var targetElement
= event
.target
;
36 if (targetElement
.tagName
!= 'animateTransform')
37 targetElement
.insertAdjacentText('afterbegin', '%')
38 var clonedNode
= document
.getElementsByTagName("*")[2].cloneNode(false);
40 targetElement
.insertAdjacentElement('afterend', clonedNode
)
43 inSubtreeModified
= false;
45 document
.addEventListener("DOMSubtreeModified", subtreeModified
, true);
48 var targetElement
= event
.target
;
49 targetElement
.insertAdjacentElement('afterend', document
.createElementNS('http://www.w3.org/2000/svg', 'animateTransform'));
50 targetElement
.parentNode
.removeChild(targetElement
)
51 targetElement
.appendChild(document
.createElementNS('http://www.w3.org/2000/svg', 'animateTransform'));
53 var all
= document
.getElementsByTagName("*");
54 all
[70 % all
.length
].appendChild(targetElement
)
55 targetElement
.parentNode
.removeChild(targetElement
)
57 targetElement
= document
.importNode(targetElement
, true)
58 var all
= document
.getElementsByTagName("*");
59 all
[32 % all
.length
].appendChild(targetElement
)
60 targetElement
.insertAdjacentElement('beforeend', document
.createElementNS('http://www.w3.org/2000/svg', 'animateTransform'))
61 if (targetElement
.outerHTML
)
62 targetElement
.outerHTML
= ""
63 var all
= document
.getElementsByTagName("*");
64 var newParent
= all
[66 % all
.length
];
65 newParent
.insertBefore(targetElement
, newParent
.childNodes
[98 % newParent
.childNodes
.length
])
67 document
.addEventListener("load", load
, true);
71 .CLASS13{white-space:pre-wrap;background-image:url('?');
</style>
84 <rb<select tabindex=
"-1">