testing/mochitest/harness.xul

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial