chore(webdriver): support priority for request interception (#12191)

This commit is contained in:
Nikolay Vitkov
2024-04-02 13:20:36 +02:00
committed by GitHub
parent 59bffce972
commit 08bc8542ea
16 changed files with 326 additions and 317 deletions

View File

@@ -10,7 +10,7 @@ Aborts a request.
```typescript
class HTTPRequest {
abstract abort(errorCode?: ErrorCode, priority?: number): Promise<void>;
abort(errorCode?: ErrorCode, priority?: number): Promise<void>;
}
```

View File

@@ -10,7 +10,7 @@ The most recent reason for aborting the request
```typescript
class HTTPRequest {
abstract abortErrorReason(): Protocol.Network.ErrorReason | null;
abortErrorReason(): Protocol.Network.ErrorReason | null;
}
```

View File

@@ -10,7 +10,7 @@ Continues request with optional request overrides.
```typescript
class HTTPRequest {
abstract continue(
continue(
overrides?: ContinueRequestOverrides,
priority?: number
): Promise<void>;

View File

@@ -10,7 +10,7 @@ The `ContinueRequestOverrides` that will be used if the interception is allowed
```typescript
class HTTPRequest {
abstract continueRequestOverrides(): ContinueRequestOverrides;
continueRequestOverrides(): ContinueRequestOverrides;
}
```

View File

@@ -10,7 +10,7 @@ Adds an async request handler to the processing queue. Deferred handlers are not
```typescript
class HTTPRequest {
abstract enqueueInterceptAction(
enqueueInterceptAction(
pendingHandler: () => void | PromiseLike<unknown>
): void;
}

View File

@@ -10,7 +10,7 @@ Awaits pending interception handlers and then decides how to fulfill the request
```typescript
class HTTPRequest {
abstract finalizeInterceptions(): Promise<void>;
finalizeInterceptions(): Promise<void>;
}
```

View File

@@ -14,7 +14,7 @@ InterceptResolutionAction is one of: `abort`, `respond`, `continue`, `disabled`,
```typescript
class HTTPRequest {
abstract interceptResolutionState(): InterceptResolutionState;
interceptResolutionState(): InterceptResolutionState;
}
```

View File

@@ -10,7 +10,7 @@ Is `true` if the intercept resolution has already been handled, `false` otherwis
```typescript
class HTTPRequest {
abstract isInterceptResolutionHandled(): boolean;
isInterceptResolutionHandled(): boolean;
}
```

View File

@@ -10,7 +10,7 @@ Fulfills a request with the given response.
```typescript
class HTTPRequest {
abstract respond(
respond(
response: Partial<ResponseForRequest>,
priority?: number
): Promise<void>;

View File

@@ -10,7 +10,7 @@ The `ResponseForRequest` that gets used if the interception is allowed to respon
```typescript
class HTTPRequest {
abstract responseForRequest(): Partial<ResponseForRequest> | null;
responseForRequest(): Partial<ResponseForRequest> | null;
}
```