Skip to content

Commit

Permalink
chore: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightning00Blade committed Jul 17, 2024
1 parent ce21100 commit e224cdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
6 changes: 0 additions & 6 deletions src/bidiMapper/modules/network/NetworkProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ export class NetworkProcessor {
Network.InterceptPhase.BeforeRequestSent,
]);

// TODO: Set / expand.
// ; Step 9. cookies
try {
await request.continueRequest(params);
} catch (error) {
Expand All @@ -111,8 +109,6 @@ export class NetworkProcessor {
Network.InterceptPhase.ResponseStarted,
]);

// TODO: Set / expand.
// ; Step 10. cookies
try {
await request.continueResponse(params);
} catch (error) {
Expand Down Expand Up @@ -162,8 +158,6 @@ export class NetworkProcessor {
NetworkProcessor.validateHeaders(params.headers);
}

// TODO: Set / expand.
// ; Step 10. cookies
const request = this.#getBlockedRequestOrFail(params.request, [
Network.InterceptPhase.BeforeRequestSent,
Network.InterceptPhase.ResponseStarted,
Expand Down
13 changes: 5 additions & 8 deletions src/bidiMapper/modules/network/NetworkRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class NetworkRequest {
return Boolean(this.#request.info);
}

isDataUrl(): boolean {
#isDataUrl(): boolean {
return this.url.startsWith('data:');
}

Expand Down Expand Up @@ -219,7 +219,7 @@ export class NetworkRequest {
}

get #bodySize() {
let bodySize: number = 0;
let bodySize = 0;
if (typeof this.#requestOverrides?.bodySize === 'number') {
bodySize = this.#requestOverrides.bodySize;
} else {
Expand Down Expand Up @@ -353,7 +353,7 @@ export class NetworkRequest {
// Flush redirects
options.wasRedirected ||
options.hasFailed ||
this.isDataUrl() ||
this.#isDataUrl() ||
Boolean(this.#request.extraInfo) ||
// Requests from cache don't have extra info
this.#servedFromCache ||
Expand All @@ -363,7 +363,7 @@ export class NetworkRequest {

const noInterceptionExpected =
// We can't intercept data urls from CDP
this.isDataUrl() ||
this.#isDataUrl() ||
// Cached requests never hit the network
this.#servedFromCache;

Expand All @@ -380,8 +380,7 @@ export class NetworkRequest {
(requestInterceptionExpected
? requestInterceptionCompleted
: requestExtraInfoCompleted)
) {
this.#emitEvent(this.#getBeforeRequestEvent.bind(this));
) {ODO.bind(this));
}

const responseExtraInfoCompleted =
Expand Down Expand Up @@ -695,8 +694,6 @@ export class NetworkRequest {
return await this.#continueRequest();
}

// TODO: Step 6
// https://w3c.github.io/webdriver-bidi/#command-network-continueResponse
const overrideHeaders = this.#getOverrideHeader(
overrides.headers,
overrides.cookies
Expand Down

0 comments on commit e224cdd

Please sign in to comment.