mshtml: Added noscript tag handling tests.
[wine] / dlls / mshtml / tests / vbtest.html
1 <html>
2 <head>
3 <script type="text/vbscript">
4 Dim counter
5
6 counter = 1
7
8 Sub ok(b,m)
9     Call external.ok(b,m)
10 End Sub
11 </script>
12 <script>
13 ' Verifies that we're in VBScript although there is no type specified
14 If true then counter = counter+1
15 function inccounter(x)
16     counter = counter+x
17 end function
18 </script>
19 <script type="text/javascript">
20 // We're in javascript
21 try {
22     counter++;
23     incCounter(2);
24 }catch(e) {
25     ok(false, "got an exception");
26 }
27 </script>
28 <script>
29 ' And back to VBScript
30 If true then counter = counter+1
31
32 Sub runTest()
33     Call ok(counter = 6, "counter = " & counter)
34     Call ok(isNull(document.onkeyup), "document.onkeyup is not null")
35     Call ok(document.formname.tagName = "FORM", "document.form.tagName = " & document.formname.tagName)
36     Call ok(formname.tagName = "FORM", "form.tagName = " & formname.tagName)
37     Call external.reportSuccess()
38 End Sub
39 </script>
40 <script type="text/javascript">
41 // We're in javascript
42 </script>
43 <body onload="If true then runTest()">
44 <form name="formname"></form>
45 </body>
46 </html>