File: vbtest.html

package info (click to toggle)
wine-development 4.2-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 209,180 kB
  • sloc: ansic: 2,917,742; perl: 18,943; yacc: 15,637; makefile: 9,182; objc: 6,548; lex: 4,315; python: 1,786; cpp: 1,042; sh: 771; java: 742; xml: 557; awk: 69; cs: 17
file content (48 lines) | stat: -rw-r--r-- 1,066 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<html>
<head>
<script type="text/vbscript">
<!--
Dim counter

counter = 1

Sub ok(b,m)
    Call external.ok(b,m)
End Sub
-->
</script>
<script>
' Verifies that we're in VBScript although there is no type specified
If true then counter = counter+1
function inccounter(x)
    counter = counter+x
end function
</script>
<script type="text/javascript">
// We're in javascript
try {
    counter++;
    incCounter(2);
}catch(e) {
    ok(false, "got an exception " + e.message);
}
</script>
<script>
' And back to VBScript
If true then counter = counter+1

Sub runTest()
    Call ok(counter = 6, "counter = " & counter)
    Call ok(isNull(document.onkeyup), "document.onkeyup is not null")
    Call ok(document.formname.tagName = "FORM", "document.form.tagName = " & document.formname.tagName)
    Call ok(formname.tagName = "FORM", "form.tagName = " & formname.tagName)
    Call external.reportSuccess()
End Sub
</script>
<script type="text/javascript">
// We're in javascript
</script>
<body onload="If true then runTest()">
<form name="formname"></form>
</body>
</html>