fix(android): to not call Browser.setDownloadBehavior (#6913)
This commit is contained in:
parent
9142d8c2dd
commit
ff3ad7a3d1
|
|
@ -311,7 +311,7 @@ export class CRBrowserContext extends BrowserContext {
|
||||||
async _initialize() {
|
async _initialize() {
|
||||||
assert(!Array.from(this._browser._crPages.values()).some(page => page._browserContext === this));
|
assert(!Array.from(this._browser._crPages.values()).some(page => page._browserContext === this));
|
||||||
const promises: Promise<any>[] = [ super._initialize() ];
|
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', {
|
promises.push(this._browser._session.send('Browser.setDownloadBehavior', {
|
||||||
behavior: this._options.acceptDownloads ? 'allowAndName' : 'deny',
|
behavior: this._options.acceptDownloads ? 'allowAndName' : 'deny',
|
||||||
browserContextId: this._browserContextId,
|
browserContextId: this._browserContextId,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue