TestCase = function(name) { return jstestdriver.testCaseManager.TestCase(name); }; HIDDEN = jQuery.browser.msie ? '' : jQuery.browser.safari ? ' style="display: none; "' : ' style="display: none;"'; nglr.msie = jQuery.browser.msie; nglr.alert = function(msg) {jstestdriver.console.log("ALERT: " + msg);}; function noop(){} jstd = jstestdriver; function html(content) { return jQuery("
").html(content); } function report(reportTest){ $("#tests").children().each(function(i){ var success = this.className == "pass"; var strong = this.firstChild; var msg = strong.firstChild.nodeValue; var parts = msg.split(" module: "); var module = parts[0]; var name = parts[1].replace(/ *$/, ""); reportTest(success, module, name, this.nodeValue); }); } MockUrlWatcher = function() { this.url = "http://server"; }; MockUrlWatcher.prototype.getUrl = function(){ return this.url; }; MockUrlWatcher.prototype.setUrl = function(url){ this.url = url; }; jQuery.fn.sortedHtml = function() { var html = ""; var toString = function(index, node) { node = node || this; if (node.nodeName == "#text") { html += nglr.escapeHtml(node.nodeValue); } else { html += '<' + node.nodeName.toLowerCase(); var attributes = node.attributes || []; var attrs = []; for(var i=0; i