blob: 7bc3ed6c29bbd09457bd3083f7ca234bc6b8cce7 (
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
|
<!doctype html>
<title>document.write external script into iframe write back into parent</title>
<script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>
<iframe id="test"></iframe>
<script>
var t = async_test();
var iframe = document.getElementById("test");
var order = [];
t.step(function() {
order.push(1);
var s = "<script src='iframe_005.js'></script" + ">";
iframe.contentDocument.write(s);
iframe.contentDocument.close();
order.push(2);
assert_array_equals(order, [1,2])
}
);
addEventListener("load", function() {
t.step(function() {
assert_array_equals(order, [1,2,3,4,5])
});
t.done();
}, false);
</script>
<div id="log"></div>
|