X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/7c1a4aea7aeb083c7424823d11f24401edcba439..699231ae09f7057a4d0000cdf32e50a3df6a04ca:/wp-includes/js/scriptaculous/unittest.js diff --git a/wp-includes/js/scriptaculous/unittest.js b/wp-includes/js/scriptaculous/unittest.js index 13473a30..33a0c715 100644 --- a/wp-includes/js/scriptaculous/unittest.js +++ b/wp-includes/js/scriptaculous/unittest.js @@ -1,8 +1,8 @@ -// script.aculo.us unittest.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007 +// script.aculo.us unittest.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 -// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// (c) 2005-2007 Jon Tirsen (http://www.tirsen.com) -// (c) 2005-2007 Michael Schuerig (http://www.schuerig.de/michael/) +// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// (c) 2005-2009 Jon Tirsen (http://www.tirsen.com) +// (c) 2005-2009 Michael Schuerig (http://www.schuerig.de/michael/) // // script.aculo.us is freely distributable under the terms of an MIT-style license. // For details, see the script.aculo.us web site: http://script.aculo.us/ @@ -32,8 +32,8 @@ Event.simulateMouse = function(element, eventName) { this.mark.style.left = options.pointerX + "px"; this.mark.style.width = "5px"; this.mark.style.height = "5px;"; - this.mark.style.borderTop = "1px solid red;" - this.mark.style.borderLeft = "1px solid red;" + this.mark.style.borderTop = "1px solid red;"; + this.mark.style.borderLeft = "1px solid red;"; if(this.step) alert('['+new Date().getTime().toString()+'] '+eventName+'/'+Test.Unit.inspect(options)); @@ -67,7 +67,7 @@ Event.simulateKeys = function(element, command) { } }; -var Test = {} +var Test = {}; Test.Unit = {}; // security exception workaround @@ -117,7 +117,7 @@ Test.Unit.Logger.prototype = { 'StatusTestMessage' + '' + ''; - this.logsummary = $('logsummary') + this.logsummary = $('logsummary'); this.loglines = $('loglines'); }, _toHTML: function(txt) { @@ -125,15 +125,15 @@ Test.Unit.Logger.prototype = { }, addLinksToResults: function(){ $$("tr.failed .nameCell").each( function(td){ // todo: limit to children of this.log - td.title = "Run only this test" + td.title = "Run only this test"; Event.observe(td, 'click', function(){ window.location.search = "?tests=" + td.innerHTML;}); }); $$("tr.passed .nameCell").each( function(td){ // todo: limit to children of this.log - td.title = "Run all tests" + td.title = "Run all tests"; Event.observe(td, 'click', function(){ window.location.search = "";}); }); } -} +}; Test.Unit.Runner = Class.create(); Test.Unit.Runner.prototype = { @@ -246,7 +246,7 @@ Test.Unit.Runner.prototype = { failures + " failures, " + errors + " errors"); } -} +}; Test.Unit.Assertions = Class.create(); Test.Unit.Assertions.prototype = { @@ -331,7 +331,7 @@ Test.Unit.Assertions.prototype = { catch(e) { this.error(e); } }, assertNull: function(obj) { - var message = arguments[1] || 'assertNull' + var message = arguments[1] || 'assertNull'; try { (obj==null) ? this.pass() : this.fail(message + ': got "' + Test.Unit.inspect(obj) + '"'); } catch(e) { this.error(e); } @@ -461,7 +461,7 @@ Test.Unit.Assertions.prototype = { iterations + ' iterations in ' + (timeTaken/1000)+'s' ); return timeTaken; } -} +}; Test.Unit.Testcase = Class.create(); Object.extend(Object.extend(Test.Unit.Testcase.prototype, Test.Unit.Assertions.prototype), { @@ -526,7 +526,7 @@ Test.setupBDDExtensionMethods = function(){ }; var makeAssertion = function(assertion, args, object) { this[assertion].apply(this,(args || []).concat([object])); - } + }; Test.BDDMethods = {}; $H(METHODMAP).each(function(pair) { @@ -539,7 +539,7 @@ Test.setupBDDExtensionMethods = function(){ [Array.prototype, String.prototype, Number.prototype, Boolean.prototype].each( function(p){ Object.extend(p, Test.BDDMethods) } ); -} +}; Test.context = function(name, spec, log){ Test.setupBDDExtensionMethods();