Skip to content

Commit

Permalink
Update to latest qunit-composite
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaefferer committed Apr 22, 2012
1 parent c22fb56 commit 7ec8c7f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/unit/qunit-composite.js
Expand Up @@ -7,19 +7,18 @@ QUnit.extend( QUnit, {
});

for ( var i = 0; i < suites.length; i++ ) {
(function( suite ) {
asyncTest( suite, function() {
QUnit.runSuite( suite );
});
}( suites[i] ) );
QUnit.runSuite( suites[i] );
}

QUnit.done(function() {
this.iframe.style.display = "none";
});
},

runSuite: function( suite ) {
this.iframe.setAttribute( "src", suite );
asyncTest( suite, function() {
QUnit.iframe.setAttribute( "src", suite );
});
},

initIframe: function() {
Expand Down Expand Up @@ -75,20 +74,21 @@ QUnit.testStart(function( data ) {
});

QUnit.testDone(function() {
var current = QUnit.id( this.config.current.id ),
var i,
current = QUnit.id( this.config.current.id ),
children = current.children,
src = this.iframe.src;

// undo the auto-expansion of failed tests
for ( var i = 0; i < children.length; i++ ) {
for ( i = 0; i < children.length; i++ ) {
if ( children[i].nodeName === "OL" ) {
children[i].style.display = "none";
}
}

QUnit.addEvent(current, "dblclick", function( e ) {
var target = e && e.target ? e.target : window.event.srcElement;
if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) {
if ( target.nodeName.toLowerCase() === "span" || target.nodeName.toLowerCase() === "b" ) {
target = target.parentNode;
}
if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
Expand Down

0 comments on commit 7ec8c7f

Please sign in to comment.