uninstall
This commit is contained in:
parent
e580a4cca2
commit
fdad74906e
|
|
@ -462,6 +462,7 @@ export class BrowserContext extends ChannelOwner<channels.BrowserContextChannel>
|
||||||
this._disposeHarRouters();
|
this._disposeHarRouters();
|
||||||
this.tracing._resetStackCounter();
|
this.tracing._resetStackCounter();
|
||||||
this.emit(Events.BrowserContext.Close, this);
|
this.emit(Events.BrowserContext.Close, this);
|
||||||
|
this._mockingProxies.forEach(p => p.uninstall(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
async [Symbol.asyncDispose]() {
|
async [Symbol.asyncDispose]() {
|
||||||
|
|
|
||||||
|
|
@ -41,11 +41,16 @@ export class MockingProxy extends ChannelOwner<channels.MockingProxyChannel> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
installOn(context: BrowserContext): void {
|
install(context: BrowserContext): void {
|
||||||
context._mockingProxies.add(this);
|
context._mockingProxies.add(this);
|
||||||
this._contexts.add(context);
|
this._contexts.add(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uninstall(context: BrowserContext): void {
|
||||||
|
context._mockingProxies.delete(this);
|
||||||
|
this._contexts.delete(context);
|
||||||
|
}
|
||||||
|
|
||||||
async setInterceptionPatterns(params: channels.MockingProxySetInterceptionPatternsParams) {
|
async setInterceptionPatterns(params: channels.MockingProxySetInterceptionPatternsParams) {
|
||||||
await this._channel.setInterceptionPatterns(params);
|
await this._channel.setInterceptionPatterns(params);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue