зеркало из https://github.com/mozilla/pjs.git
not part of build; adding logging by sicking, robustness by peterv, speed by me. (last patch before moving to outliner?)
This commit is contained in:
Родитель
8dfb0c65f3
Коммит
b4443152e7
|
@ -59,8 +59,15 @@
|
|||
</menulist>
|
||||
</titledbox>
|
||||
<spring flex="1" /></box>
|
||||
<box id="tests" flex="1">
|
||||
<grid>
|
||||
<box align="horizontal"><titledbox align="horizontal"><title value="stats" />
|
||||
<text value="tests run: "/><text id="tests_run" value="0" />
|
||||
<text value=" tests passed: "/><text id="tests_passed" value="0"/>
|
||||
<text value=" tests failed: "/><text id="tests_failed" value="0"/>
|
||||
</titledbox>
|
||||
<spring flex="1" /></box>
|
||||
|
||||
<box id="tests" flex="1" orient="vertical">
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column flex="1"/>
|
||||
|
@ -77,5 +84,6 @@
|
|||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<spring flex="1" />
|
||||
</box>
|
||||
</window>
|
||||
|
|
|
@ -42,3 +42,14 @@ column {
|
|||
.failed {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
:-moz-outliner-row(success)
|
||||
{
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
:-moz-outliner-row(fail)
|
||||
{
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ function do_transforms(new_name_array,verbose){
|
|||
if (name_array.length){
|
||||
current=name_array.shift();
|
||||
__docSet=new txDocSet(current);
|
||||
setTimeout("do_transforms()",20);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,6 +94,7 @@ txDocSet.prototype = {
|
|||
dump("Reference:\n");
|
||||
DumpDOM(this.mReference);
|
||||
}
|
||||
do_transforms();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -24,6 +24,7 @@ var pop_last=0, pop_chunk=25;
|
|||
var isinited=false;
|
||||
var xalan_base, xalan_xml, xalan_elems, xalan_length, content_row, target;
|
||||
var matchRE, matchNameTag, matchFieldTag;
|
||||
var tests_run, tests_passed, tests_failed;
|
||||
|
||||
function loaderstuff(eve) {
|
||||
var ns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
@ -38,6 +39,9 @@ function loaderstuff(eve) {
|
|||
target = document.getElementById("xalan_grid");
|
||||
matchNameTag = document.getElementById("search-name");
|
||||
matchFieldTag = document.getElementById("search-field");
|
||||
tests_run = document.getElementById("tests_run");
|
||||
tests_passed = document.getElementById("tests_passed");
|
||||
tests_failed = document.getElementById("tests_failed");
|
||||
xalan_base = document.getElementById("xalan_base");
|
||||
xalan_xml = document.implementation.createDocument("","",null);
|
||||
xalan_xml.addEventListener("load", xalanIndexLoaded, false);
|
||||
|
@ -47,15 +51,14 @@ function loaderstuff(eve) {
|
|||
}
|
||||
|
||||
function xalanIndexLoaded(e) {
|
||||
xalan_elems = xalan_xml.getElementsByTagName("test");
|
||||
xalan_length = xalan_elems.length;
|
||||
xalan_elems = xalan_xml.documentElement;
|
||||
xalan_length = Math.floor(xalan_elems.childNodes.length/2);
|
||||
return true;
|
||||
}
|
||||
|
||||
function refresh_xalan() {
|
||||
while(target.childNodes.length>1) target.removeChild(target.lastChild);
|
||||
xalan_elems = xalan_xml.getElementsByTagName("test");
|
||||
xalan_length = xalan_elems.length;
|
||||
pop_last = 0;
|
||||
populate_xalan();
|
||||
return true;
|
||||
}
|
||||
|
@ -70,7 +73,7 @@ function populate_xalan() {
|
|||
var matchRE = new RegExp(matchValue);
|
||||
for (i=pop_last;i<Math.min(upper,xalan_length);i++){
|
||||
current = content_row.cloneNode(true);
|
||||
test = xalan_elems.item(i);
|
||||
test = xalan_elems.childNodes.item(2*i+1);
|
||||
if (!test.getAttribute("file").match(re)){
|
||||
current.setAttribute("id", test.getAttribute("file"));
|
||||
current.childNodes.item(1).setAttribute("value",
|
||||
|
@ -101,10 +104,14 @@ function dump_checked(){
|
|||
var nds = target.childNodes;
|
||||
var todo = new Array();
|
||||
for (i=1;i<nds.length;i++){
|
||||
node=nds.item(i).firstChild;
|
||||
node=nds.item(i);
|
||||
if(node.getAttribute("class") != "notrun")
|
||||
node.setAttribute("class", "notrun");
|
||||
node=node.firstChild;
|
||||
if(node.hasAttribute("checked"))
|
||||
todo.push(node.nextSibling.getAttribute("value"));
|
||||
}
|
||||
reset_stats();
|
||||
do_transforms(todo);
|
||||
}
|
||||
|
||||
|
@ -114,6 +121,11 @@ function handle_result(name,success){
|
|||
if (content_row){
|
||||
content_row.setAttribute("class",classname);
|
||||
}
|
||||
tests_run.getAttributeNode("value").nodeValue++;
|
||||
if (success)
|
||||
tests_passed.getAttributeNode("value").nodeValue++;
|
||||
else
|
||||
tests_failed.getAttributeNode("value").nodeValue++;
|
||||
}
|
||||
|
||||
function hide_checked(yes){
|
||||
|
@ -181,3 +193,9 @@ function browse_base_dir(){
|
|||
xalan_base.setAttribute('value',fp.fileURL.path);
|
||||
}
|
||||
}
|
||||
|
||||
function reset_stats(){
|
||||
tests_run.setAttribute("value", "0");
|
||||
tests_passed.setAttribute("value", "0");
|
||||
tests_failed.setAttribute("value", "0");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче