asyncTimeout: 2 // seconds for async timeout
};
+var isLocal = !!(window.location.protocol == 'file:');
+
$(function() {
$('#userAgent').html(navigator.userAgent);
runTest();
ok( false, "Test timed out" );
start();
};
- _config.timeout = setTimeout(handler, _config.asyncTimeout * 1000);
+ // Disabled, caused too many random errors
+ //_config.timeout = setTimeout(handler, _config.asyncTimeout * 1000);
}
function start() {
- if(_config.timeout)
- clearTimeout(_config.timeout);
- _config.blocking = false;
- process();
+ // A slight delay, to avoid any current callbacks
+ setTimeout(function(){
+ if(_config.timeout)
+ clearTimeout(_config.timeout);
+ _config.blocking = false;
+ process();
+ }, 13);
}
function runTest() {
name = _config.currentModule + " module: " + name;
var filter = location.search.slice(1);
- if ( filter && encodeURIComponent(name) != filter )
+ if ( filter && encodeURIComponent(name).indexOf(filter) == -1 )
return;
synchronize(function() {
else
n.style.display = "none";
};
- b.ondblclick = function(event) {
+ $(b).dblclick(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( ol );
* @param Object actual
* @param String message (optional)
*/
-function equals(expected, actual, message) {
+function equals(actual, expected, message) {
var result = expected == actual;
message = message || (result ? "okay" : "failed");
_config.Test.push( [ result, result ? message + ": " + expected : message + " expected: " + expected + " actual: " + actual ] );