Sweden-Number/dlls/mshtml/tests/exectest.html

33 lines
727 B
HTML

<html>
<body>
Script execution test
<div id="b1"></div>
<div id="b2"></div>
<div id="b3"></div>
<script>
function ok(b, msg) {
return external.ok(b, msg);
}
var executed = false;
var len = document.getElementsByTagName('div').length;
ok(len === 3, "init length = " + len);
document.write("<script>"
+ "var len = document.getElementsByTagName('div').length;"
+ "ok(len === 3, 'unexpected length ' + len);"
+ "executed = true;"
+ "<" + "/script>");
len = document.getElementsByTagName('script').length;
ok(len === 2, "script col length = " + len);
ok(executed, "written script not executed");
external.reportSuccess();
</script>
<div id="a1"></div>
<div id="a2"></div>
<div id="b3"></div>
</body>
</html>