Skip to content
Browse files

Adding console.logs to see what is happening no the buildbot

  • Loading branch information...
1 parent af353ac commit 90ca90c7ac64074604fb29682714b27c92d2c1b3 @gabrielschulhof gabrielschulhof committed Sep 5, 2012
Showing with 43 additions and 9 deletions.
  1. +43 −9 tests/unit/navigation/navigation_core.js
View
52 tests/unit/navigation/navigation_core.js
@@ -447,34 +447,59 @@
asyncTest( "going back from a stale dialog history entry does not cause the base tag to be reset", function() {
- var baseHRef;
+ var baseHRef,
+ ts = new Date(), idx = 0,
+ doLog = function( msg ) {
+ var nts = new Date();
+
+ console.log( idx + ": " + ( nts.getTime() - ts.getTime() ) + ": " + msg );
+ idx++;
+ ts = nts;
+ };
expect( 1 );
$.testHelper.pageSequence([
// setup
- function() { $.testHelper.openPage( "#dialog-base-tag-test-page" ); },
+ function() {
+ console.log( "\n" );
+ doLog( "Navigating to test setup from " + location.href );
+ $.testHelper.openPage( "#dialog-base-tag-test-page" );
+ },
// go to page that launches dialog
- function() { $( "#dialog-base-tag-test-page a" ).click(); },
+ function() {
+ doLog( "AJAX navigating to page that launches the dialog from " + location.href );
+ $( "#dialog-base-tag-test-page a" ).click();
+ },
// record the base href and launch the dialog
function() {
baseHRef = $( "base" ).attr( "href" );
+ doLog( "Recording reference base href(" + baseHRef + ") and opening dialog from " + location.href );
$( "a#go-to-dialog" ).click();
},
// close the dialog - this assumes a close button link will be added to the dialog as part of the enhancement process
- function() { $( "#dialog-base-tag-test a" ).click(); },
+ function() {
+ doLog( "Closing dialog from " + location.href );
+ $( "#dialog-base-tag-test a" ).click();
+ },
function() {
// $.testHelper.pageSequence cannot be used here because no page changes occur
$.testHelper.sequence([
// Go forward to reach the now-stale dialogHashKey history entry
- function() { window.history.forward(); },
+ function() {
+ doLog( "Going forward from " + location.href );
+ window.history.forward();
+ },
// Go back
- function() { window.history.back(); },
+ function() {
+ doLog( "Going back from " + location.href );
+ window.history.back();
+ },
// Make sure the base href is unchanged from the recorded value, and back up to the start page
function() {
@@ -483,13 +508,22 @@
// Return to start page
$.testHelper.pageSequence([
// Go back to the setup page
- function() { window.history.back(); },
+ function() {
+ doLog( "Going back to setup page from " + location.href );
+ window.history.back();
+ },
// Go back to the start page
- function() { window.history.back(); },
+ function() {
+ doLog( "Going back to start page from " + location.href );
+ window.history.back();
+ },
// Conclude the test
- function() { start(); }
+ function() {
+ doLog( "Resuming test suite from " + location.href );
+ start();
+ }
]);
},
], 2000);

0 comments on commit 90ca90c

Please sign in to comment.
Something went wrong with that request. Please try again.