Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private async _maximizeLocalBrowserWindow (browserId: string): Promise {
await browserTools.maximize(this._getWindowDescriptor(browserId));
}
await browserTools.resize(title, currentSize.width, currentSize.height, etalonSize.width, etalonSize.height);
let resizedSize = await this.plugin.runInitScript(browserId, GET_WINDOW_DIMENSIONS_INFO_SCRIPT);
let correctionSize = subtractSizes(resizedSize, etalonSize);
await browserTools.resize(title, resizedSize.width, resizedSize.height, etalonSize.width, etalonSize.height);
resizedSize = await this.plugin.runInitScript(browserId, GET_WINDOW_DIMENSIONS_INFO_SCRIPT);
correctionSize = sumSizes(correctionSize, subtractSizes(resizedSize, etalonSize));
if (this.localBrowsersInfo[browserId])
this.localBrowsersInfo[browserId].resizeCorrections = correctionSize;
await browserTools.maximize(title);
}