Skip to content

Commit

Permalink
Merge branch 't/12966' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Feb 25, 2015
2 parents b4b3a83 + aea6589 commit 2f0db49
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions tests/_benderjs/ckeditor/static/extensions.js
Expand Up @@ -425,12 +425,20 @@
}
};

var unlock, deferredTests;
var unlockDeferment, deferredTests;

// Defers Bender's startup.
function defer() {
if ( !unlock ) {
unlock = bender.defer();
if ( !unlockDeferment ) {
unlockDeferment = bender.defer();
}
}

// Unlock the created Bender deferment.
function unlock() {
if ( unlockDeferment ) {
unlockDeferment();
unlockDeferment = null;
}
}

Expand All @@ -441,7 +449,7 @@
var restart = false;

bender.test = function( tests ) {
if ( unlock && !restart ) {
if ( unlockDeferment && !restart ) {
deferredTests = tests;
} else {
startRunner( tests );
Expand All @@ -454,6 +462,8 @@
// startRunner was executed but there were no tests available yet.
if ( !tests ) {
restart = true;
// Unlock Bender startup.
unlock();
return;
}

Expand Down Expand Up @@ -486,9 +496,7 @@
orgTest( tests );

// Unlock Bender startup.
if ( unlock ) {
unlock();
}
unlock();

// async:init stage 1: set up bender.editor.
function setUpEditor() {
Expand Down

0 comments on commit 2f0db49

Please sign in to comment.