Changeset 7890
- Timestamp:
- 04/01/07 02:10:53 (22 months ago)
- Files:
-
- 1 modified
-
dojo/trunk/tests/_browserRunner.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dojo/trunk/tests/_browserRunner.js
r7887 r7890 213 213 } 214 214 215 var _nameTimes = {}; 215 216 var _playSound = function(name){ 216 byId("hiddenAudio").innerHTML = '<embed src="_sounds/'+name+'.wav" autostart="true" loop="false" hidden="true" width="1" height="1"></embed>'; 217 var nt = _nameTimes[name]; 218 if((!nt)||(((new Date)-nt) > 700)){ 219 _nameTimes[name] = new Date(); 220 var tc = document.createElement("span"); 221 byId("hiddenAudio").appendChild(tc); 222 tc.innerHTML = '<embed src="_sounds/'+name+'.wav" autostart="true" loop="false" hidden="true" width="1" height="1"></embed>'; 223 } 217 224 } 218 225 … … 334 341 _addOnEvt("load", 335 342 function(){ 336 if(loaded){ return; } 343 tests._onEnd = function(){ 344 if(tests._failureCount == 0){ 345 tests.debug("WOOHOO!!"); 346 _playSound("woohoo"); 347 }else{ 348 console.debug("tests._failureCount:", tests._failureCount); 349 } 350 toggleRunning(); 351 } 337 352 if(!byId("play")){ 338 353 // make sure we've got an ammenable DOM structure … … 352 367 } 353 368 } 354 tests._onEnd = function(){355 toggleRunning();356 if(tests._failureCount == 0){357 alert("WOOHOO!!");358 tests.debug("WOOHOO!!");359 _playSound("woohoo");360 }361 }362 369 tests.run = (function(oldRun){ 363 370 return function(){