Source code
Revision control
Copy as Markdown
Other Tools
<script>
onload = function() {
window.test_prop = 1;
parent.tests[0].step(function() {parent.assert_equals(test_prop, 1)});
parent.tests[0].step(function() {parent.assert_equals(document.open(), document)});
document.write("<script>test_prop = 2;<\/script>");
document.close();
parent.tests[0].step(function() {parent.assert_equals(test_prop, 2)});
parent.tests[1].step(function() {parent.assert_equals(window.test_prop, 2)});
parent.tests[2].step(function() {parent.assert_equals(get_this(), window)});
parent.tests_done();
};
function get_this() {
return this;
}
</script>