Chromium Code Reviews| Index: chrome/test/data/extensions/api_test/webrequest/test_blocking.js |
| diff --git a/chrome/test/data/extensions/api_test/webrequest/test_blocking.js b/chrome/test/data/extensions/api_test/webrequest/test_blocking.js |
| index 3cd5d9bbf4a9344b615ba40d06d94539cc803646..cae1db83724b3fe6a0670a04c2b6db34b48bec0a 100644 |
| --- a/chrome/test/data/extensions/api_test/webrequest/test_blocking.js |
| +++ b/chrome/test/data/extensions/api_test/webrequest/test_blocking.js |
| @@ -36,40 +36,6 @@ runTests([ |
| // Navigates to a page with subresources, with a blocking handler that |
| // cancels the page request. The page will not load, and we should not |
| // see the subresources. |
| - function complexLoadCancelled() { |
| - expect( |
| - [ // events |
| - { label: "onBeforeRequest", |
| - event: "onBeforeRequest", |
| - details: { |
| - type: "main_frame", |
| - url: getURL("complexLoad/b.html"), |
| - frameUrl: getURL("complexLoad/b.html") |
| - }, |
| - retval: {cancel: true} |
| - }, |
| - // Cancelling is considered an error. |
| - { label: "onErrorOccurred", |
| - event: "onErrorOccurred", |
| - details: { |
| - url: getURL("complexLoad/b.html"), |
| - fromCache: false, |
| - error: "net::ERR_BLOCKED_BY_CLIENT" |
| - // Request to chrome-extension:// url has no IP. |
| - } |
| - }, |
| - ], |
| - [ // event order |
| - ["onBeforeRequest", "onErrorOccurred"] |
| - ], |
| - {urls: ["<all_urls>"]}, // filter |
| - ["blocking"]); |
| - navigateAndWait(getURL("complexLoad/b.html")); |
| - }, |
| - |
| - // Navigates to a page with subresources, with a blocking handler that |
| - // cancels the page request. The page will not load, and we should not |
| - // see the subresources. |
| function simpleLoadCancelledOnReceiveHeaders() { |
| expect( |
| [ // events |
| @@ -125,6 +91,40 @@ runTests([ |
| navigateAndWait(getURLHttpSimpleLoad()); |
| }, |
| + // Navigates to a page with subresources, with a blocking handler that |
| + // cancels the page request. The page will not load, and we should not |
| + // see the subresources. |
|
Devlin
2017/03/16 18:38:14
add something like:
TODO(nasko): This test was reo
nasko
2017/03/16 18:47:49
Done.
|
| + function complexLoadCancelled() { |
| + expect( |
| + [ // events |
| + { label: "onBeforeRequest", |
| + event: "onBeforeRequest", |
| + details: { |
| + type: "main_frame", |
| + url: getURL("complexLoad/b.html"), |
| + frameUrl: getURL("complexLoad/b.html") |
| + }, |
| + retval: {cancel: true} |
| + }, |
| + // Cancelling is considered an error. |
| + { label: "onErrorOccurred", |
| + event: "onErrorOccurred", |
| + details: { |
| + url: getURL("complexLoad/b.html"), |
| + fromCache: false, |
| + error: "net::ERR_BLOCKED_BY_CLIENT" |
| + // Request to chrome-extension:// url has no IP. |
| + } |
| + }, |
| + ], |
| + [ // event order |
| + ["onBeforeRequest", "onErrorOccurred"] |
| + ], |
| + {urls: ["<all_urls>"]}, // filter |
| + ["blocking"]); |
| + navigateAndWait(getURL("complexLoad/b.html")); |
| + }, |
| + |
| // Navigates to a page and provides invalid header information. The request |
| // should continue as if the headers were not changed. |
| function simpleLoadIgnoreOnBeforeSendHeadersInvalidHeaders() { |