EXPERIMENTAL: attempts to gather info if chrome runner crashed (#7562)

This commit is contained in:
Joffrey JAFFEUX 2019-05-16 18:00:57 +02:00 committed by GitHub
parent 77b78968c9
commit f41aa5cb98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -49,9 +49,14 @@ async function runAllTests() {
let chrome = await launchChrome();
let protocol = await CDP({ port: chrome.port });
const { Page, Runtime } = protocol;
const { Inspector, Page, Runtime } = protocol;
await Promise.all([Page.enable(), Runtime.enable()]);
await Promise.all([Inspector.enable(), Page.enable(), Runtime.enable()]);
Inspector.targetCrashed(entry => {
console.log("Chrome target crashed:");
console.log(entry);
});
Runtime.exceptionThrown(exceptionInfo => {
console.log(exceptionInfo.exceptionDetails.exception.description);