|
1 <?xml version="1.0"?> |
|
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
|
3 <?xml-stylesheet href="chrome://mochikit/content/static/harness.css" |
|
4 type="text/css"?> |
|
5 |
|
6 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
|
7 title="Chrome Test Harness" |
|
8 directory="chrome"> |
|
9 |
|
10 <script type="text/javascript" |
|
11 src="chrome://mochikit/content/tests/SimpleTest/LogController.js"/> |
|
12 <script type="text/javascript" |
|
13 src="chrome://mochikit/content/tests/SimpleTest/MemoryStats.js"/> |
|
14 <script type="text/javascript" |
|
15 src="chrome://mochikit/content/tests/SimpleTest/TestRunner.js"/> |
|
16 <script type="text/javascript" |
|
17 src="chrome://mochikit/content/tests/SimpleTest/MozillaLogger.js"/> |
|
18 <script type="application/javascript" |
|
19 src="chrome://mochikit/content/chrome-harness.js" /> |
|
20 <script type="application/javascript" |
|
21 src="chrome://mochikit/content/chunkifyTests.js" /> |
|
22 <script type="application/javascript" |
|
23 src="chrome://mochikit/content/manifestLibrary.js" /> |
|
24 <script type="text/javascript" |
|
25 src="chrome://mochikit/content/tests/SimpleTest/setup.js" /> |
|
26 <script type="application/javascript;version=1.7"><![CDATA[ |
|
27 |
|
28 if (Cc === undefined) { |
|
29 var Cc = Components.classes; |
|
30 var Ci = Components.interfaces; |
|
31 } |
|
32 |
|
33 function loadTests() |
|
34 { |
|
35 window.removeEventListener("load", loadTests, false); |
|
36 getTestList({}, linkAndHookup); |
|
37 } |
|
38 |
|
39 function linkAndHookup(links) { |
|
40 // load server.js in so we can share template functions |
|
41 var scriptLoader = Cc["@mozilla.org/moz/jssubscript-loader;1"]. |
|
42 getService(Ci.mozIJSSubScriptLoader); |
|
43 var srvScope = {}; |
|
44 scriptLoader.loadSubScript('chrome://mochikit/content/server.js', |
|
45 srvScope); |
|
46 |
|
47 // generate our test list |
|
48 srvScope.makeTags(); |
|
49 var tableContent = srvScope.linksToTableRows(links, 0); |
|
50 |
|
51 function populate() { |
|
52 document.getElementById("test-table").innerHTML += tableContent; |
|
53 } |
|
54 gTestList = eval(srvScope.jsonArrayOfTestFiles(links)); |
|
55 populate(); |
|
56 |
|
57 hookup(); |
|
58 } |
|
59 |
|
60 window.addEventListener("load", loadTests, false); |
|
61 ]]> |
|
62 </script> |
|
63 |
|
64 <vbox> |
|
65 <button label="Run Chrome Tests" id="runtests" flex="1"/> |
|
66 |
|
67 <body xmlns="http://www.w3.org/1999/xhtml" id="xulharness"> |
|
68 <!--TODO: this should be separated into a file that both this file and server.js uses--> |
|
69 <div class="container"> |
|
70 <p style="float:right;"> |
|
71 <small>Based on the MochiKit unit tests.</small> |
|
72 </p> |
|
73 <div class="status"> |
|
74 <h1 id="indicator">Status</h1> |
|
75 <h2 id="pass">Passed: <span id="pass-count">0</span></h2> |
|
76 <h2 id="fail">Failed: <span id="fail-count">0</span></h2> |
|
77 <h2 id="fail">Todo: <span id="todo-count">0</span></h2> |
|
78 </div> |
|
79 <div class="clear"></div> |
|
80 <div id="current-test"> |
|
81 <b>Currently Executing: <span id="current-test-path">_</span></b> |
|
82 </div> |
|
83 <div class="clear"></div> |
|
84 <div class="frameholder"> |
|
85 <iframe type="content" scrolling="no" id="testframe" width="550" height="350"></iframe> |
|
86 </div> |
|
87 <div class="clear"></div> |
|
88 <div class="toggle"> |
|
89 <a href="#" id="toggleNonTests">Show Non-Tests</a> |
|
90 <br /> |
|
91 </div> |
|
92 <div id="wrapper"> |
|
93 <table cellpadding="0" cellspacing="0"> |
|
94 <!-- tbody needed to avoid bug 494546 causing performance problems --> |
|
95 <tbody id="test-table"> |
|
96 <tr> |
|
97 <td>Passed</td> |
|
98 <td>Failed</td> |
|
99 <td>Todo</td> |
|
100 <td>Test Files</td> |
|
101 </tr> |
|
102 </tbody> |
|
103 </table> |
|
104 <br/> |
|
105 <table cellpadding="0" cellspacing="0" border="1" bordercolor="red"> |
|
106 <!-- tbody needed to avoid bug 494546 causing performance problems --> |
|
107 <tbody id="fail-table"> |
|
108 </tbody> |
|
109 </table> |
|
110 </div> |
|
111 </div> |
|
112 </body> |
|
113 </vbox> |
|
114 </window> |