You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** The rules (if any) that match the hypothetical request. */
13879
+
matchedRules: MatchedRule[];
13880
+
}
13881
+
13882
+
/** @since Chrome 103 */
13883
+
export interface TestMatchRequestDetails {
13884
+
/** The initiator URL (if any) for the hypothetical request. */
13885
+
initiator?: string;
13886
+
/** Standard HTTP method of the hypothetical request. Defaults to "get" for HTTP requests and is ignored for non-HTTP requests. */
13887
+
method?: `${RequestMethod}`;
13888
+
/**
13889
+
* The headers provided by a hypothetical response if the request does not get blocked or redirected before it is sent. Represented as an object which maps a header name to a list of string values. If not specified, the hypothetical response would return empty response headers, which can match rules which match on the non-existence of headers. E.g. `{"content-type": ["text/html; charset=utf-8", "multipart/form-data"]}`
13890
+
* @since Chrome 129
13891
+
*/
13892
+
responseHeaders?: { [name: string]: unknown };
13893
+
/** The ID of the tab in which the hypothetical request takes place. Does not need to correspond to a real tab ID. Default is -1, meaning that the request isn't related to a tab. */
13894
+
tabId?: number;
13895
+
/** The resource type of the hypothetical request. */
13896
+
type: `${ResourceType}`;
13897
+
/** The URL of the hypothetical request. */
13898
+
url: string;
13899
+
}
13900
+
13876
13901
/** Returns the number of static rules an extension can enable before the global static rule limit is reached. */
13877
13902
export function getAvailableStaticRuleCount(callback: (count: number) => void): void;
export function setExtensionActionOptions(options: ExtensionActionOptions): Promise<void>;
13978
14003
14004
+
/**
14005
+
* Checks if any of the extension's declarativeNetRequest rules would match a hypothetical request. Note: Only available for unpacked extensions as this is only intended to be used during extension development.
14006
+
* @param request
14007
+
* @since Chrome 103
14008
+
*/
14009
+
export function testMatchOutcome(request: TestMatchRequestDetails): Promise<TestMatchOutcomeResult>;
0 commit comments