Changeset 5812
- Timestamp:
- 08/08/08 17:07:04 (4 months ago)
- Files:
-
- 1 modified
-
trunk/qunit/testrunner.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qunit/testrunner.js
r5739 r5812 27 27 28 28 _config.filters = location.search.length > 1 && //restrict modules/tests by get parameters 29 $.map( location.search.slice(1).split('&'), decodeURIComponent );29 jQuery.map( location.search.slice(1).split('&'), decodeURIComponent ); 30 30 31 31 var isLocal = !!(window.location.protocol == 'file:'); 32 32 33 $(function() {34 $('#userAgent').html(navigator.userAgent);33 jQuery(function() { 34 jQuery('#userAgent').html(navigator.userAgent); 35 35 runTest(); 36 36 }); … … 94 94 var time = new Date(); 95 95 _config.fixture = document.getElementById('main').innerHTML; 96 _config.ajaxSettings = $.ajaxSettings;96 _config.ajaxSettings = jQuery.ajaxSettings; 97 97 synchronize(function() { 98 98 time = new Date() - time; 99 $("<div>").html(['<p class="result">Tests completed in ',99 jQuery("<div>").html(['<p class="result">Tests completed in ', 100 100 time, ' milliseconds.<br/>', 101 101 _config.stats.bad, ' tests of ', _config.stats.all, ' failed.</p>'] 102 102 .join('')) 103 103 .appendTo("body"); 104 $("#banner").addClass(_config.stats.bad ? "fail" : "pass");104 jQuery("#banner").addClass(_config.stats.bad ? "fail" : "pass"); 105 105 }); 106 106 } … … 152 152 var li = document.createElement("li"); 153 153 li.className = _config.Test[i][0] ? "pass" : "fail"; 154 li. innerHTML = _config.Test[i][1];154 li.appendChild( document.createTextNode(_config.Test[i][1]) ); 155 155 ol.appendChild( li ); 156 156 … … 175 175 n.style.display = "none"; 176 176 }; 177 $(b).dblclick(function(event) {177 jQuery(b).dblclick(function(event) { 178 178 var target = jQuery(event.target).filter("strong").clone(); 179 179 if ( target.length ) { 180 180 target.children().remove(); 181 location.href = location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent( $.trim(target.text()));181 location.href = location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent(jQuery.trim(target.text())); 182 182 } 183 183 }); … … 205 205 */ 206 206 function reset() { 207 $("#main").html( _config.fixture );208 $.event.global = {};209 $.ajaxSettings = $.extend({}, _config.ajaxSettings);207 jQuery("#main").html( _config.fixture ); 208 jQuery.event.global = {}; 209 jQuery.ajaxSettings = jQuery.extend({}, _config.ajaxSettings); 210 210 } 211 211 212 212 /** 213 213 * Asserts true. 214 * @example ok( $("a").size() > 5, "There must be at least 5 anchors" );214 * @example ok( jQuery("a").size() > 5, "There must be at least 5 anchors" ); 215 215 */ 216 216 function ok(a, msg) {
