fix(android): to not call Browser.setDownloadBehavior (#6913)

This commit is contained in:
Max Schmitt 2021-06-04 12:46:53 -07:00 committed by GitHub
parent 9142d8c2dd
commit ff3ad7a3d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -311,7 +311,7 @@ export class CRBrowserContext extends BrowserContext {
async _initialize() {
assert(!Array.from(this._browser._crPages.values()).some(page => page._browserContext === this));
const promises: Promise<any>[] = [ super._initialize() ];
if (this._browser.options.name !== 'electron') {
if (this._browser.options.name !== 'electron' && this._browser.options.name !== 'clank') {
promises.push(this._browser._session.send('Browser.setDownloadBehavior', {
behavior: this._options.acceptDownloads ? 'allowAndName' : 'deny',
browserContextId: this._browserContextId,