mirror of
https://github.com/servo/servo
synced 2026-04-29 02:47:55 +02:00
21 lines
734 B
HTML
21 lines
734 B
HTML
<!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>
|