Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / testing / mochitest / harness-overlay.xul
blob70846c157ba9b11712097149cc0edfa227b6f2c7
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
4 <overlay id="browserTestOverlay"
5 xmlns:html="http://www.w3.org/1999/xhtml"
6 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
7 xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
9 <window>
10 <script type="application/javascript"
11 src="chrome://mochikit/content/MochiKit/packed.js" />
12 <script type="text/javascript"
13 src="chrome://mochikit/content/tests/SimpleTest/TestRunner.js"/>
14 <script type="text/javascript"
15 src="chrome://mochikit/content/tests/SimpleTest/MozillaFileLogger.js"/>
16 <script type="text/javascript"
17 src="chrome://mochikit/content/tests/SimpleTest/quit.js" />
18 <script type="text/javascript"
19 src="chrome://mochikit/content/tests/SimpleTest/setup.js" />
20 <script type="application/javascript;version=1.7"><![CDATA[
21 function loadTests()
23 var dir = document.documentElement.getAttribute('directory');
24 // Find our chrome dir
25 var ios = Cc["@mozilla.org/network/io-service;1"].
26 getService(Ci.nsIIOService);
27 var chromeURI = ios.newURI("chrome://mochikit/content/",
28 null, null);
29 var resolvedURI = Cc["@mozilla.org/chrome/chrome-registry;1"].
30 getService(Ci.nsIChromeRegistry).
31 convertChromeURL(chromeURI);
32 var fileHandler = Cc["@mozilla.org/network/protocol;1?name=file"].
33 getService(Ci.nsIFileProtocolHandler);
34 var chromeDir = fileHandler.getFileFromURLSpec(resolvedURI.spec);
35 chromeDir = chromeDir.parent.QueryInterface(Ci.nsILocalFile);
36 chromeDir.appendRelativePath(dir);
38 // load server.js in so we can share template functions
39 var scriptLoader = Cc["@mozilla.org/moz/jssubscript-loader;1"].
40 getService(Ci.mozIJSSubScriptLoader);
41 var srvScope = {};
42 scriptLoader.loadSubScript("chrome://mochikit/content/server.js",
43 srvScope);
45 // generate our test list
46 srvScope.makeTags();
47 var url = "chrome://mochikit/content/" + dir + "/";
48 var [links, count] = srvScope.list(url, chromeDir, true);
49 var listContent = srvScope.linksToListItems(links);
50 var tableContent = srvScope.linksToTableRows(links);
51 function populate() {
52 $("list-holder").setAttribute("rowspan", 1 + count);
53 $("test-list").innerHTML += listContent;
54 $("test-table").innerHTML += tableContent;
55 $("wrapper").innerHTML += " "; // redraw the table
57 gTestList = eval(srvScope.jsonArrayOfTestFiles(links));
58 populate();
59 hookup();
61 // if we got passed a test path, just run that single test
62 if ("testPath" in params && params.testPath)
63 window.location.href = url + params.testPath;
65 window.addEventListener("load", loadTests, false)
66 ]]>
67 </script>
69 <vbox>
70 <button label="Run Chrome Tests" id="runtests" flex="1"/>
72 <body xmlns="http://www.w3.org/1999/xhtml" id="xulharness">
73 <div class="container">
74 <p style="float:right;">
75 <small>Based on the MochiKit unit tests.</small>
76 </p>
77 <div class="status">
78 <h1 id="indicator">Status</h1>
79 <h2 id="pass">Passed: <span id="pass-count">0</span></h2>
80 <h2 id="fail">Failed: <span id="fail-count">0</span></h2>
81 <h2 id="fail">Todo: <span id="todo-count">0</span></h2>
82 </div>
83 <div class="clear"></div>
84 <div id="current-test">
85 <b>Currently Executing: <span id="current-test-path">_</span></b>
86 </div>
87 <div class="clear"></div>
88 <div class="frameholder">
89 <iframe scrolling="no" id="testframe" width="500"></iframe>
90 </div>
91 <div class="clear"></div>
92 <div class="toggle">
93 <a href="#" id="toggleNonTests">Show Non-Tests</a>
94 <br />
95 </div>
96 <div id="wrapper">
97 <table cellpadding="0" cellspacing="0" id="test-table">
98 <tr>
99 <td>Passed</td>
100 <td>Failed</td>
101 <td>Todo</td>
102 <td id="list-holder">
103 <ul class="top" id="test-list"><li><b>Test Files</b></li></ul>
104 </td>
105 </tr>
106 </table>
107 </div>
108 </div>
109 </body>
110 </vbox>
111 </window>
113 </overlay>