Skip to content

Commit

Permalink
revert unrelated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Apr 9, 2020
1 parent 1f8e959 commit bfaa3dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type ViewportConfig = CaptureConfig['viewport'];
type BrowserConfig = CaptureConfig['browser']['chromium'];

interface LaunchArgs {
userDataDir: string;
userDataDir: BrowserConfig['userDataDir'];
viewport: ViewportConfig;
disableSandbox: BrowserConfig['disableSandbox'];
proxy: BrowserConfig['proxy'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,29 +56,27 @@ export class HeadlessChromiumDriverFactory {

type = BROWSER_TYPE;

async test(logger: Logger) {
test(logger: Logger) {
const chromiumArgs = args({
userDataDir: this.userDataDir,
viewport: { width: 800, height: 600 },
disableSandbox: this.browserConfig.disableSandbox,
proxy: this.browserConfig.proxy,
});

try {
return await puppeteerLaunch({
userDataDir: this.userDataDir,
executablePath: this.binaryPath,
ignoreHTTPSErrors: true,
args: chromiumArgs,
} as LaunchOptions);
} catch (error) {
return puppeteerLaunch({
userDataDir: this.userDataDir,
executablePath: this.binaryPath,
ignoreHTTPSErrors: true,
args: chromiumArgs,
} as LaunchOptions).catch((error: Error) => {
logger.error(
`The Reporting plugin encountered issues launching Chromium in a self-test. You may have trouble generating reports.`
);
logger.error(error);
logger.warning(`See Chromium's log output at "${getChromeLogLocation(this.binaryPath)}"`);
return null;
}
});
}

/*
Expand Down

0 comments on commit bfaa3dd

Please sign in to comment.