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">
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[
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/",
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);
42 scriptLoader.loadSubScript(
"chrome://mochikit/content/server.js",
45 // generate our test list
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);
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));
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)
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>
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>
83 <div class=
"clear"></div>
84 <div id=
"current-test">
85 <b>Currently Executing:
<span id=
"current-test-path">_
</span></b>
87 <div class=
"clear"></div>
88 <div class=
"frameholder">
89 <iframe scrolling=
"no" id=
"testframe" width=
"500"></iframe>
91 <div class=
"clear"></div>
93 <a href=
"#" id=
"toggleNonTests">Show Non-Tests
</a>
97 <table cellpadding=
"0" cellspacing=
"0" id=
"test-table">
102 <td id=
"list-holder">
103 <ul class=
"top" id=
"test-list"><li><b>Test Files
</b></li></ul>