blob: f82d80be7b6b50608699b73a6f8d1b592e0a55c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<!doctype html>
<title>Replacement of window object after document.open</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe></iframe>
<script>
var t = async_test();
onload = t.step_func(function() {
var iframe = document.getElementsByTagName("iframe")[0];
iframe.contentWindow.state = 1;
var handle = iframe.contentWindow;
iframe.contentDocument.open();
assert_false("state" in iframe.contentWindow, "Variables are not preserved after document.open");
assert_equals(iframe.contentWindow.state, undefined, "Variables are not preserved after document.open");
assert_equals(iframe.contentWindow, handle);
t.done();
});
</script>
|