Removed useless safari workarounds, added rerun-single-test feature: just doubleclick on a single test to execute that one, use browser's back button get back to executing all
This commit is contained in:
parent
f621f92a4d
commit
4b8c7d8561
|
@ -15,10 +15,7 @@ var _config = {
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
$('#userAgent').html(navigator.userAgent);
|
$('#userAgent').html(navigator.userAgent);
|
||||||
if($.browser.safari)
|
runTest();
|
||||||
$("h1").append(" - Disabled for Safari");
|
|
||||||
else
|
|
||||||
runTest();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function synchronize(callback) {
|
function synchronize(callback) {
|
||||||
|
@ -67,17 +64,13 @@ function runTest() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function test(name, callback, nowait) {
|
function test(name, callback, nowait) {
|
||||||
// safari seems to have some memory problems, so we need to slow it down
|
|
||||||
if($.browser.safari && !nowait) {
|
|
||||||
test("", function() {
|
|
||||||
stop();
|
|
||||||
setTimeout(start, 250);
|
|
||||||
}, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(_config.currentModule)
|
if(_config.currentModule)
|
||||||
name = _config.currentModule + " module: " + name;
|
name = _config.currentModule + " module: " + name;
|
||||||
|
|
||||||
|
var filter = location.search.slice(1);
|
||||||
|
if ( filter && encodeURIComponent(name) != filter )
|
||||||
|
return;
|
||||||
|
|
||||||
synchronize(function() {
|
synchronize(function() {
|
||||||
_config.Test = [];
|
_config.Test = [];
|
||||||
try {
|
try {
|
||||||
|
@ -123,7 +116,7 @@ function test(name, callback, nowait) {
|
||||||
var li = document.createElement("li");
|
var li = document.createElement("li");
|
||||||
li.className = state;
|
li.className = state;
|
||||||
|
|
||||||
var b = document.createElement("b");
|
var b = document.createElement("strong");
|
||||||
b.innerHTML = name + " <b style='color:black;'>(<b class='fail'>" + bad + "</b>, <b class='pass'>" + good + "</b>, " + _config.Test.length + ")</b>";
|
b.innerHTML = name + " <b style='color:black;'>(<b class='fail'>" + bad + "</b>, <b class='pass'>" + good + "</b>, " + _config.Test.length + ")</b>";
|
||||||
b.onclick = function(){
|
b.onclick = function(){
|
||||||
var n = this.nextSibling;
|
var n = this.nextSibling;
|
||||||
|
@ -132,6 +125,13 @@ function test(name, callback, nowait) {
|
||||||
else
|
else
|
||||||
n.style.display = "none";
|
n.style.display = "none";
|
||||||
};
|
};
|
||||||
|
b.ondblclick = function(event) {
|
||||||
|
var target = jQuery(event.target).filter("strong").clone();
|
||||||
|
if ( target.length ) {
|
||||||
|
target.children().remove();
|
||||||
|
location.href = location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent($.trim(target.text()));
|
||||||
|
}
|
||||||
|
};
|
||||||
li.appendChild( b );
|
li.appendChild( b );
|
||||||
li.appendChild( ol );
|
li.appendChild( ol );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue