1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2<html>
3  <head>
4    <title>Import Test List</title>
5    <script language="JavaScript">
6      function onRadioClick (name)
7      {
8	  var radio = document.forms["foo"].elements[name];
9	  radio.checked = !radio.checked;
10	  return false;
11      }
12
13      function doImport()
14      {
15          var lines =
16              document.forms["foo"].elements["testList"].value.split(/\r?\n/);
17          var suites = window.opener.suites;
18          var elems = window.opener.document.forms["testCases"].elements;
19
20          if (document.forms["foo"].elements["clear_all"].checked)
21              window.opener.selectNone();
22
23          for (var l in lines)
24          {
25              if (lines[l].search(/^\s$|\s*\#/) == -1)
26              {
27                  var ary = lines[l].match (/(.*)\/(.*)\/(.*)/);
28
29                  if (!ary) 
30                      if (!confirm ("Line " + lines[l] + " is confusing, " +
31                                    "continue with import?"))
32                          return;
33                      else
34                          continue;
35                  
36                  if (suites[ary[1]] && suites[ary[1]].testDirs[ary[2]] &&
37                      suites[ary[1]].testDirs[ary[2]].tests[ary[3]])
38                      elems[suites[ary[1]].testDirs[ary[2]].tests[ary[3]]].
39                          checked = true;    
40              }
41          }
42
43          window.opener.updateTotals();
44
45	  window.close();
46                  
47      }
48      </script>
49  </head>
50
51  <body>
52    
53    <form name="foo">
54      <textarea rows="25" cols="50" name="testList"></textarea><br>
55      <input type="radio" name="clear_all" checked 
56        onclick="return onRadioClick('clear_all');">
57      &nbsp;Clear all selections berofe import.<br>
58      <input type="button" value="Import" onclick="doImport();">
59      <input type="button" value="Cancel" onclick="window.close();">
60    </form>
61
62    <hr>
63    <address><a href="mailto:rginda@netscape.com"></a></address>
64<!-- Created: Wed Nov 17 13:52:23 PST 1999 -->
65<!-- hhmts start -->
66Last modified: Wed Nov 17 14:18:42 PST 1999
67<!-- hhmts end -->
68  </body>
69</html>
70