summaryrefslogtreecommitdiffstats
path: root/layout/tools/tests/regression_tests.html
blob: 8eff8fc77e95dcd9f014adbd863e5e79292253b7 (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
  <title>Layout Regression Test Harness</title>
</head>

<style>
p.note
{
  background-color: #FFFFDD;
  border: 2px solid red;
  padding: 10px;
}

div.indent
{
  margin-left: 20px;
  padding:     5px;
}

#tests
{
  border: 1px solid black;
  margin: 10px;
}

#results
{
  border:   1px solid black;
  margin:   10px;
  overflow: auto;
  height:   200px;
}
</style>

<script src="regression_tests.js" type="application/javascript">
<!--

//-->
</script>

<body onload="DoOnload();">

<h1>Layout Regression Test Harness</h1>

<p class="note">
The JavaScript in this file requires that you grant it XPConnect access,
via the dialog that appears when you first load the file. Note that the code
herein creates directories and files, so there is the possibility that it
may do damage to the contents of your hard disk. You have been warned!
</p>

<h2>Tests</h2>
<div id="tests">
<form name="testForm">
  <div class="indent">
    <input type="radio" name="testType" id="singleFileRadio" checked="true" onclick="UpdateRunTestsButton()"></input><label for="singleFileRadio">Single testcase</label>
    <div class="indent">
      URL: <input id="singleTestFileInput" name="singleTestFileInput" type="text" size="80" oninput="UpdateRunTestsButton()"></input>
      <input type="button" onclick="ChooseTestcaseFile();" value="Choose File...">
    </div>
  </div>

  <div class="indent">
    <input type="radio" name="testType" id="dirsRadio" onclick="UpdateRunTestsButton()"></input><label for="dirsRadio">Local Directories</label>
    <div class="indent">
      <select id="testDirsSelect" size="5" style="width: 200pt">
        <option>None selected</option>
      </select><br>
      <input type="button" value="Add..." onclick="AppendTestcaseDir();">
      <input type="button" value="Remove" onclick="RemoveTestcaseDir();">
    </div>
  </div>
  
  <div class="indent">
    <hr>
    <table cellpadding="5px">
      <thead>
      <tr>
      <td><strong>Do what</strong></td>
      <td><strong>Output file locations</strong></td>
      </tr>
      </thead>
      <tr>
      <td>
        <div><input id="baselineRadio"  type="radio" name="doWhat" onclick="UpdateRunTestsButton()" checked="true"></input><label for="baselineRadio">Baseline</label></div>
        <div><input id="verifyRadio"    type="radio" name="doWhat" onclick="UpdateRunTestsButton()"></input><label for="verifyRadio">Verify</label></div>
        <div><input id="verifCompRadio" type="radio" name="doWhat" onclick="UpdateRunTestsButton()"></input><label for="verifCompRadio">Verify and Compare</label></div>
        <div><input id="compRadio"      type="radio" name="doWhat" onclick="UpdateRunTestsButton()"></input><label for="compRadio">Compare</label></div>
      </td>
      <td valign="top">
        <table cellpadding="4px">
          <tr>
            <td></td>
            <td></td>
            <td>File extensions</td>
          </tr>
          <tr>
            <td align="right">Baseline:</td>
            <td><input id="baselineOutputDir" name="baselineOutputDir" type="text" size="40" disabled="true"></input>
                <input type="button" onclick="gBaselineOutputDir = ChooseOutputDirectory('baselineOutputDir'); UpdateRunTestsButton();" value="Choose..."></td>
            <td><input type="text" size="6" name="baselineFileExtension" value=".bas"></input> (like ".bas")</td>
          </tr>
          <tr>
            <td align="right">Verify:</td>
            <td><input id="verifyOutputDir" name="verifyOutputDir" type="text" size="40" disabled="true"></input>
                <input type="button" onclick="gVerifyOutputDir = ChooseOutputDirectory('verifyOutputDir'); UpdateRunTestsButton();" value="Choose..."></td>
            <td><input type="text" size="6" name="verifyFileExtension" value=".ver"></input>(like ".ver")</td>
          </tr>
        </table>
      </td>
      </tr>
      </table>
    </div>
    <div class="indent">
      <hr>
      <input type="Button" name="runTests" value="Run the Tests!" onclick="RunTests();">
    </div>

  </div>
  
</form>
</div>

<h2>Results</h2>
<div id="results">
</div>

</body>
</html>