Skip to content

Commit

Permalink
Merge pull request #850 from GoogleChrome/notabid
Browse files Browse the repository at this point in the history
navigate to about:blank before driver setup
  • Loading branch information
paulirish authored Oct 28, 2016
2 parents 48a524d + 624fbdf commit 11c6647
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lighthouse-core/gather/connections/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class ExtensionConnection extends Connection {
}

getCurrentTabId() {
return this.queryCurrentTab_().then(currentTab => {
return this._queryCurrentTab().then(currentTab => {
return new Promise((resolve, reject) => {
chrome.debugger.getTargets(targets => {
const target = targets.find(target => target.tabId === currentTab.id);
Expand Down
8 changes: 5 additions & 3 deletions lighthouse-core/gather/gather-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ const path = require('path');
* Execution sequence when GatherRunner.run() is called:
*
* 1. Setup
* A. driver.connect()
* B. GatherRunner.setupDriver()
* A. navigate to about:blank
* B. driver.connect()
* C. GatherRunner.setupDriver()
* i. checkForMultipleTabsAttached
* ii. beginEmulation
* iii. cleanAndDisableBrowserCaches
Expand All @@ -46,7 +47,7 @@ const path = require('path');
* ii. all gatherer's afterPass()
*
* 3. Teardown
* A. driver.disconnect()
* A. GatherRunner.disposeDriver()
* B. collect all artifacts and return them
*/
class GatherRunner {
Expand Down Expand Up @@ -221,6 +222,7 @@ class GatherRunner {
passes = this.instantiateGatherers(passes, options.config.configDir);

return driver.connect()
.then(_ => GatherRunner.loadBlank(driver))
.then(_ => GatherRunner.setupDriver(driver, options))

// Run each pass
Expand Down

0 comments on commit 11c6647

Please sign in to comment.