Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Wait for WhichBrowser before we start the testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsLeenheer committed Nov 24, 2013
1 parent ecce78f commit 9f47a9d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
21 changes: 18 additions & 3 deletions index.html
Expand Up @@ -190,7 +190,22 @@ <h3>Help us improve HTML5 test by donating</h3>
<script>
<!--

window.addEventListener('load', function() {

function waitForWhichBrowser(cb) {
var callback = cb;

function wait() {
if (typeof WhichBrowser == 'undefined')
window.setTimeout(wait, 100)
else
callback();
}

wait();
}


waitForWhichBrowser(function() {

Browsers = new WhichBrowser({
useFeatures: true,
Expand Down Expand Up @@ -225,8 +240,8 @@ <h3>Help us improve HTML5 test by donating</h3>
}

start();
}, false);

});

function start() {
new Test(function(r) {
Expand Down
21 changes: 17 additions & 4 deletions qr.html
Expand Up @@ -53,16 +53,29 @@
<script>
<!--

window.addEventListener('load', function() {


function waitForWhichBrowser(cb) {
var callback = cb;

function wait() {
if (typeof WhichBrowser == 'undefined')
window.setTimeout(wait, 100)
else
callback();
}

wait();
}

waitForWhichBrowser(function() {

Browsers = new WhichBrowser({
useFeatures: true,
detectCamouflage: true
});

start();
}, false);

});

function start() {
new Test(function(r) {
Expand Down

0 comments on commit 9f47a9d

Please sign in to comment.