blob: c11d4ee2bb1186926b9e6ec222bd85a387f2c5b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<html>
<head>
<script>
function done() {
if (window.testRunner) {
testRunner.notifyDone();
}
}
function elementRemover(doc, id) {
return function() {
var element = doc.getElementById(id);
element.parentNode.removeChild(element);
done();
}
}
function navigateIFrameThenRemoveLink() {
var iframe = document.getElementById('iframe');
iframe.onload = elementRemover(iframe.contentDocument, 'prerenderLink');
iframe.contentWindow.location = "resources/empty.html";
}
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
</script>
</head>
<body>
<h1>Test navigation and removal of link prerender elements</h1>
<iframe id=iframe onload="navigateIFrameThenRemoveLink()" src="resources/simple-prerender.html"></iframe><br>
This test succeeds when it does not crash. The iframe above this text should also not crash, and should show an empty page.
</body>
</html>
|