mirror of
https://github.com/servo/servo
synced 2026-04-29 02:47:55 +02:00
18 lines
529 B
HTML
18 lines
529 B
HTML
<script>
|
|
onload = function() {
|
|
window.test_prop = 1;
|
|
parent.tests[0].step(function() {parent.assert_equals(test_prop, 1)});
|
|
document.open();
|
|
document.write("<script>test_prop = 2;<\/script>");
|
|
document.close();
|
|
parent.tests[0].step(function() {parent.assert_equals(test_prop, 1)});
|
|
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>
|