Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3488)

Unified Diff: chrome/test/data/extensions/api_test/webrequest/test_blocking.js

Issue 2738643002: Implement error page commit policy in PlzNavigate. (Closed)
Patch Set: Add comment. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_handle_impl_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c861930acc8f4c1a397cd82218f53562433f23f4 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,43 @@ 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.
+ // TODO(nasko): This test was reordered in order to accommodate an
+ // unrelated failure (https://crbug.com/700514). Once that failure is fixed,
+ // the reordering should be reverted.
+ 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() {
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_handle_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698