Skip to content

Commit

Permalink
slight improvement to test functions
Browse files Browse the repository at this point in the history
  • Loading branch information
John Hann committed Jan 30, 2012
1 parent a26f4a5 commit 475bf3d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/cycle-correction-hybrid.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,18 @@

function success () {
clearTimeout(timeout);
var doc = document;
doc.body.appendChild(doc.createTextNode('SUCCESS: cycle corrected'));
write('SUCCESS: cycle corrected');
}

function fail (ex) {
clearTimeout(timeout);
var doc = document;
doc.body.appendChild(doc.createTextNode('FAILED: ' + (ex ? ex.message : 'timed out')));
write('FAILED: ' + (ex ? ex.message : 'timed out'));
}

function write (msg) {
curl('domReady!', function () {
document.body.appendChild(document.createElement('div')).innerHTML = msg;
});
}

</script>
Expand Down

0 comments on commit 475bf3d

Please sign in to comment.