Skip to content

Commit

Permalink
driver.wsEndpoint()
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Nov 21, 2017
1 parent 32ed80c commit 4a94927
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lighthouse-core/gather/connections/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ class Connection {
return Promise.reject(new Error('Not implemented'));
}


/**
* @return {!Promise}
*/
wsEndpoint() {
return Promise.reject(new Error('Not implemented'));
}


/**
* Call protocol methods
* @param {!string} method
Expand Down
9 changes: 9 additions & 0 deletions lighthouse-core/gather/connections/cri.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ class CriConnection extends Connection {
});
}

/**
* @override
* @return {!Promise<string>}
*/
wsEndpoint() {
return this._runJsonCommand('version').then(response => response.webSocketDebuggerUrl)
}


/**
* @override
* @param {string} message
Expand Down
4 changes: 4 additions & 0 deletions lighthouse-core/gather/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ class Driver {
return this._connection.disconnect();
}

wsEndpoint() {
return this._connection.wsEndpoint();
}

/**
* Bind listeners for protocol events
* @param {!string} eventName
Expand Down

0 comments on commit 4a94927

Please sign in to comment.