blob: 1dcb92615d085b28d3c9d2a22d744be849158d18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<!doctype html>
<title>Cancelling error after document.open</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe src="/common/blank.html"></iframe>
<script>
var t = async_test();
var iframe;
onload = t.step_func(function() {
var iframe = document.getElementsByTagName("iframe")[0];
var img = iframe.contentDocument.createElement("img");
img.onerror = t.step_func(function() {assert_unreached()})
img.src = "missing";
iframe.contentDocument.body.appendChild(img);
assert_equals(iframe.contentDocument.open(), iframe.contentDocument);
setTimeout(function() {t.done();}, 500);
});
</script>
|