function testNavigateBackUsesHistory(
      previousRoute, currentRoute, expectedNavigatePreviousResult) {
    settings.navigateTo(previousRoute);
    settings.navigateTo(currentRoute);

    return whenPopState(function() {
             settings.navigateToPreviousRoute();
           })
        .then(function() {
          assertEquals(
              expectedNavigatePreviousResult, settings.getCurrentRoute());
        });
  }
/**
   * Tests a specific navigation situation.
   * @param {!settings.Route} previousRoute
   * @param {!settings.Route} currentRoute
   * @param {!settings.Route} expectedNavigatePreviousResult
   * @return {!Promise}
   */
Tests a specific navigation situation.
Tests a specific navigation situation .
function testNavigateBackUsesHistory(
      previousRoute, currentRoute, expectedNavigatePreviousResult) {
    settings.navigateTo(previousRoute);
    settings.navigateTo(currentRoute);
    return whenPopState(function() {
             settings.navigateToPreviousRoute();
           })
        .then(function() {
          assertEquals(
              expectedNavigatePreviousResult, settings.getCurrentRoute());
        });
  }
function testNavigateBackUsesHistory ( previousRoute , currentRoute , expectedNavigatePreviousResult ) { settings . navigateTo ( previousRoute ) ; settings . navigateTo ( currentRoute ) ; return whenPopState ( function ( ) { settings . navigateToPreviousRoute ( ) ; } ) . then ( function ( ) { assertEquals ( expectedNavigatePreviousResult , settings . getCurrentRoute ( ) ) ; } ) ; }
Tests a specific navigation situation.
Tests a specific navigation situation .