B2G/gecko/testing/marionette/marionette-server.js
/**
   * Called when we start a session with this browser.
   *
   * In a desktop environment, if newTab is true, it will start 
   * a new 'about:blank' tab and change focus to this tab.
   *
   * This will also set the active messagemanager for this object
   *
   * @param boolean newTab
   *        If true, create new tab
   */
Called when we start a session with this browser.
In a desktop environment, if newTab is true, it will start
a new 'about:blank' tab and change focus to this tab.

This will also set the active messagemanager for this object

@param boolean newTab
If true, create new tab
Called when we start a session with this browser . In a desktop environment if newTab is true it will start a new ' about : blank ' tab and change focus to this tab . This will also set the active messagemanager for this object @param boolean newTab If true create new tab
function BO_startSession(newTab, win, callback) {
    if (appName != "Firefox") {
      callback(win, newTab);
    }
    else if (newTab) {
      this.tab = this.addTab(this.startPage);
      this.browser.selectedTab = this.tab;
      let newTabBrowser = this.browser.getBrowserForTab(this.tab);
      newTabBrowser.addEventListener("load", function onLoad() {
        newTabBrowser.removeEventListener("load", onLoad, true);
        callback(win, newTab);
      }, true);
    }
    else {
      if (this.browser != undefined && this.browser.selectedTab != undefined) {
        this.tab = this.browser.selectedTab;
      }
      callback(win, newTab);
    }
  }
function BO_startSession ( newTab , win , callback ) { if ( appName != "Firefox" ) { callback ( win , newTab ) ; } else if ( newTab ) { this . tab = this . addTab ( this . startPage ) ; this . browser . selectedTab = this . tab ; let newTabBrowser = this . browser . getBrowserForTab ( this . tab ) ; newTabBrowser . addEventListener ( "load" , function onLoad ( ) { newTabBrowser . removeEventListener ( "load" , onLoad , true ) ; callback ( win , newTab ) ; } , true ) ; } else { if ( this . browser != undefined && this . browser . selectedTab != undefined ) { this . tab = this . browser . selectedTab ; } callback ( win , newTab ) ; } }
Called when we start a session with this browser.
Called when we start a session with this browser .
//if we have a new tab, make it the selected tab // wait for tab to be loaded //set this.tab to the currently focused tab