1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <title>Core JavaScript Tests
</title>
6 <script language=
"JavaScript">
7 function selectAll (suite, testDir)
9 if (typeof suite == "undefined")
10 for (var suite in suites)
11 setAllDirs (suite, true);
12 else if (typeof testDir == "undefined")
13 setAllDirs (suite, true);
15 setAllTests (suite, testDir, true);
19 function selectNone (suite, testDir)
22 if (typeof suite == "undefined")
23 for (var suite in suites)
24 setAllDirs (suite, false);
25 else if (typeof testDir == "undefined")
26 setAllDirs (suite, false);
28 setAllTests (suite, testDir, false);
32 function setAllDirs (suite, value)
35 for (dir in suites[suite].testDirs)
36 setAllTests (suite, dir, value);
40 function setAllTests (suite, testDir, value)
44 for (test in suites[suite].testDirs[testDir].tests)
46 radioName = suites[suite].testDirs[testDir].tests[test];
47 document.forms["testCases"].elements[radioName].checked = value;
52 function createList ()
54 var suite, testDir, test, radioName;
55 var elements = document.forms["testCases"].elements;
57 var win = window.open ("about:blank", "other_window");
59 win.document.write ("
<pre>\n");
61 win.document.write ("# Created " + new Date() + "\n");
64 win.document.write ("# " + suite + ": " +
65 elements["SUMMARY_" + suite].value + "\n");
66 win.document.write ("# TOTAL: " + elements["TOTAL"].value + "\n");
69 for (testDir in suites[suite].testDirs)
70 for (test in suites[suite].testDirs[testDir].tests)
72 radioName = suites[suite].testDirs[testDir].tests[test];
73 if (elements[radioName].checked)
74 win.document.write (suite + "/" + testDir + "/" +
75 elements[radioName].value + "\n");
82 function onRadioClick (name)
84 var radio = document.forms["testCases"].elements[name];
85 radio.checked = !radio.checked;
86 setTimeout ("updateTotals();",
100);
90 function updateTotals()
92 var suite, testDir, test, radioName, selected, available, pct;
93 var totalAvailable =
0, totalSelected =
0;
95 var elements = document.forms["testCases"].elements;
99 selected = available =
0;
100 for (testDir in suites[suite].testDirs)
101 for (test in suites[suite].testDirs[testDir].tests)
104 radioName = suites[suite].testDirs[testDir].tests[test];
105 if (elements[radioName].checked)
108 totalSelected += selected;
109 totalAvailable += available;
110 pct = parseInt((selected / available) *
100);
114 elements["SUMMARY_" + suite].value = selected + "/" + available +
115 " (" + pct + "%) selected";
118 pct = parseInt((totalSelected / totalAvailable) *
100);
122 elements["TOTAL"].value = totalSelected + "/" + totalAvailable + " (" +
131 <body bgcolor=
"white" onLoad=
"updateTotals()">
132 <a name='top_of_page'
></a>
133 <h1>Core JavaScript Tests
</h1>
135 <form name=
"testCases">
136 <input type='button' value='Export Test List' onClick='createList();'
>
137 <input type='button' value='Import Test List'
138 onClick='window.open(
"importList.html",
"other_window");'
>