Skip to content

Commit

Permalink
Merge pull request #502 from GoogleChrome/fixforheadless
Browse files Browse the repository at this point in the history
Fallback to reuse existing tab
  • Loading branch information
paulirish authored Jul 14, 2016
2 parents 4a66309 + 27d3ed8 commit 16199bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lighthouse-core/driver/drivers/cri.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class CriDriver extends Driver {
/* eslint-disable new-cap */
chromeRemoteInterface.New((err, tab) => {
if (err) {
return reject(err);
log.warn('CRI driver', 'cannot create new tab, will reuse tab.', err);
}

chromeRemoteInterface({port: port, chooseTab: tab}, chrome => {
Expand All @@ -57,6 +57,7 @@ class CriDriver extends Driver {
disconnect() {
return new Promise((resolve, reject) => {
if (!this._tab) {
this._chrome.close();
return resolve();
}

Expand Down

0 comments on commit 16199bd

Please sign in to comment.