Skip to content

Commit

Permalink
Revert "Revert "cleanup""
Browse files Browse the repository at this point in the history
This reverts commit bfebf14.
  • Loading branch information
slavaleleka committed Feb 22, 2024
1 parent bfebf14 commit f9b8795
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export type GetBlockingResponseParams = {
rule: NetworkRule | null,
referrerUrl: string,
requestUrl: string,
requestType: RequestType,
contentType: ContentType,
};

Expand Down Expand Up @@ -88,7 +87,6 @@ export class RequestBlockingApi {
public static getBlockingResponse(data: GetBlockingResponseParams): WebRequest.BlockingResponse | void {
const {
rule,
requestType,
tabId,
eventId,
requestUrl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ export class WebRequestApi {
eventId,
requestUrl,
referrerUrl,
requestType,
contentType,
tabId,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ jest.mock('@lib/mv2/background/api');
*
* @param ruleText Rule text.
* @param requestUrl Request url.
* @param requestType Request type.
* @param contentType Content type.
*
* @returns Data for getBlockingResponse() method.
*/
const getGetBlockingResponseParamsData = (
ruleText: string,
requestUrl: string,
requestType: RequestType,
contentType: ContentType,
): GetBlockingResponseParams => {
return {
Expand All @@ -33,7 +31,6 @@ const getGetBlockingResponseParamsData = (
rule: new NetworkRule(ruleText, 0),
referrerUrl: '',
requestUrl,
requestType,
contentType,
};
};
Expand Down Expand Up @@ -105,7 +102,6 @@ describe('Request Blocking Api - getBlockingResponse', () => {
const data = getGetBlockingResponseParamsData(
'||example.com^$popup',
'http://example.com',
RequestType.Document,
ContentType.Document,
);
const response = RequestBlockingApi.getBlockingResponse(data);
Expand All @@ -116,7 +112,6 @@ describe('Request Blocking Api - getBlockingResponse', () => {
const data = getGetBlockingResponseParamsData(
'||example.com^$all',
'http://example.com',
RequestType.Document,
ContentType.Document,
);
const response = RequestBlockingApi.getBlockingResponse(data);
Expand All @@ -129,7 +124,6 @@ describe('Request Blocking Api - getBlockingResponse', () => {
const data = getGetBlockingResponseParamsData(
'||example.com^$popup,document',
'http://example.com',
RequestType.Document,
ContentType.Document,
);
const response = RequestBlockingApi.getBlockingResponse(data);
Expand All @@ -141,7 +135,6 @@ describe('Request Blocking Api - getBlockingResponse', () => {
const data = getGetBlockingResponseParamsData(
'||example.com^$popup',
'http://example.com/image.png',
RequestType.Image,
ContentType.Image,
);
const response = RequestBlockingApi.getBlockingResponse(data);
Expand All @@ -152,7 +145,6 @@ describe('Request Blocking Api - getBlockingResponse', () => {
const data = getGetBlockingResponseParamsData(
'|http*://$popup',
'http://example.com/image.png',
RequestType.Image,
ContentType.Image,
);
const response = RequestBlockingApi.getBlockingResponse(data);
Expand All @@ -163,7 +155,6 @@ describe('Request Blocking Api - getBlockingResponse', () => {
const data = getGetBlockingResponseParamsData(
'||example.com^',
'http://example.com',
RequestType.Document,
ContentType.Document,
);
const response = RequestBlockingApi.getBlockingResponse(data);
Expand All @@ -174,7 +165,6 @@ describe('Request Blocking Api - getBlockingResponse', () => {
const data = getGetBlockingResponseParamsData(
'||example.com/script.js',
'http://example.com/script.js',
RequestType.Script,
ContentType.Script,
);
const response = RequestBlockingApi.getBlockingResponse(data);
Expand Down Expand Up @@ -203,7 +193,6 @@ describe('Request Blocking Api - getBlockingResponse', () => {
const data = getGetBlockingResponseParamsData(
'||example.com^$popup',
'http://example.com',
RequestType.Document,
ContentType.Document,
);
const response = RequestBlockingApi.getBlockingResponse(data);
Expand All @@ -214,7 +203,6 @@ describe('Request Blocking Api - getBlockingResponse', () => {
const data = getGetBlockingResponseParamsData(
'||example.com^$all',
'http://example.com',
RequestType.Document,
ContentType.Document,
);
const response = RequestBlockingApi.getBlockingResponse(data);
Expand All @@ -225,7 +213,6 @@ describe('Request Blocking Api - getBlockingResponse', () => {
const data = getGetBlockingResponseParamsData(
'||example.com^$popup,document',
'http://example.com',
RequestType.Document,
ContentType.Document,
);
const response = RequestBlockingApi.getBlockingResponse(data);
Expand All @@ -236,7 +223,6 @@ describe('Request Blocking Api - getBlockingResponse', () => {
const data = getGetBlockingResponseParamsData(
'||example.com^$popup',
'http://example.com/image.png',
RequestType.Image,
ContentType.Image,
);
const response = RequestBlockingApi.getBlockingResponse(data);
Expand All @@ -247,7 +233,6 @@ describe('Request Blocking Api - getBlockingResponse', () => {
const data = getGetBlockingResponseParamsData(
'|http*://$popup',
'http://example.com/image.png',
RequestType.Image,
ContentType.Image,
);
const response = RequestBlockingApi.getBlockingResponse(data);
Expand All @@ -258,7 +243,6 @@ describe('Request Blocking Api - getBlockingResponse', () => {
const data = getGetBlockingResponseParamsData(
'||example.com^',
'http://example.com',
RequestType.Document,
ContentType.Document,
);
const response = RequestBlockingApi.getBlockingResponse(data);
Expand All @@ -269,7 +253,6 @@ describe('Request Blocking Api - getBlockingResponse', () => {
const data = getGetBlockingResponseParamsData(
'||example.com/script.js',
'http://example.com/script.js',
RequestType.Script,
ContentType.Script,
);
const response = RequestBlockingApi.getBlockingResponse(data);
Expand Down

0 comments on commit f9b8795

Please sign in to comment.