summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-23 13:28:16 +0000
committerbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-23 13:28:16 +0000
commit4894438bb73e0a3c22fec3f36204b1f97b8cb104 (patch)
tree7198dcfb7d931648b77ed64ab8de663223b57d4f /chrome/test
parentd347fa255cdc8b7b0893485285d97492ab1a5d07 (diff)
downloadchromium_src-4894438bb73e0a3c22fec3f36204b1f97b8cb104.zip
chromium_src-4894438bb73e0a3c22fec3f36204b1f97b8cb104.tar.gz
chromium_src-4894438bb73e0a3c22fec3f36204b1f97b8cb104.tar.bz2
Implemented chrome.experimental.webRequest.onCompleted
BUG=60101 TEST=run browser_tests Review URL: http://codereview.chromium.org/6883119 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82793 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/data/extensions/api_test/webrequest/events/test.html72
1 files changed, 67 insertions, 5 deletions
diff --git a/chrome/test/data/extensions/api_test/webrequest/events/test.html b/chrome/test/data/extensions/api_test/webrequest/events/test.html
index 3270cc4..12ec1a3 100644
--- a/chrome/test/data/extensions/api_test/webrequest/events/test.html
+++ b/chrome/test/data/extensions/api_test/webrequest/events/test.html
@@ -219,9 +219,16 @@ runTests([
statusCode: 200
}
},
+ { label: "a-onCompleted",
+ event: "onCompleted",
+ details: {
+ url: getURL("simpleLoad/a.html"),
+ statusCode: 200
+ }
+ },
],
[ // event order
- ["a-onBeforeRequest", "a-onResponseStarted"] ]);
+ ["a-onBeforeRequest", "a-onResponseStarted", "a-onCompleted"] ]);
navigateAndWait(getURL("simpleLoad/a.html"));
},
@@ -280,11 +287,18 @@ runTests([
statusCode: 200
}
},
+ { label: "onCompleted",
+ event: "onCompleted",
+ details: {
+ url: URL_HTTP_SIMPLE_LOAD,
+ statusCode: 200
+ }
+ }
],
[ // event order
["onBeforeRequest", "onBeforeSendHeaders-1", "onRequestSent-1",
"onBeforeRedirect", "onBeforeSendHeaders-2", "onRequestSent-2",
- "onResponseStarted"] ]);
+ "onResponseStarted", "onCompleted"] ]);
navigateAndWait(URL_HTTP_SIMPLE_LOAD_REDIRECT);
},
@@ -342,11 +356,35 @@ runTests([
statusCode: 200
}
},
+ { label: "a.html-onCompleted",
+ event: "onCompleted",
+ details: {
+ url: getURL("complexLoad/a.html"),
+ statusCode: 200
+ }
+ },
+ { label: "b.html-onCompleted",
+ event: "onCompleted",
+ details: {
+ url: getURL("complexLoad/b.html"),
+ statusCode: 200
+ }
+ },
+ { label: "b.jpg-onCompleted",
+ event: "onCompleted",
+ details: {
+ url: getURL("complexLoad/b.jpg"),
+ statusCode: 200
+ }
+ },
],
[ // event order
["a.html-onBeforeRequest", "a.html-onResponseStarted",
"b.html-onBeforeRequest", "b.html-onResponseStarted",
- "b.jpg-onBeforeRequest", "b.jpg-onResponseStarted" ] ]
+ "b.jpg-onBeforeRequest", "b.jpg-onResponseStarted" ],
+ ["a.html-onResponseStarted", "a.html-onCompleted"],
+ ["b.html-onResponseStarted", "b.html-onCompleted"],
+ ["b.jpg-onResponseStarted", "b.jpg-onCompleted"] ]
);
navigateAndWait(getURL("complexLoad/a.html"));
},
@@ -410,9 +448,17 @@ runTests([
statusCode: 200
}
},
+ { label: "onCompleted",
+ event: "onCompleted",
+ details: {
+ url: getURL("simpleLoad/a.html"),
+ statusCode: 200
+ }
+ },
],
[ // event order
- ["onBeforeRequest-1", "onBeforeRequest-2", "onResponseStarted"]
+ ["onBeforeRequest-1", "onBeforeRequest-2", "onResponseStarted",
+ "onCompleted"]
],
{}, // filter
true // blocking
@@ -457,10 +503,26 @@ runTests([
statusCode: 200
}
},
+ { label: "a-onCompleted",
+ event: "onCompleted",
+ details: {
+ url: getURL("complexLoad/a.html"),
+ statusCode: 200
+ }
+ },
+ { label: "b-onCompleted",
+ event: "onCompleted",
+ details: {
+ url: getURL("complexLoad/b.jpg"),
+ statusCode: 200
+ }
+ },
],
[ // event order
["a-onBeforeRequest", "a-onResponseStarted",
- "b-onBeforeRequest", "b-onResponseStarted"] ],
+ "b-onBeforeRequest", "b-onResponseStarted"],
+ ["a-onResponseStarted", "a-onCompleted"],
+ ["b-onResponseStarted", "b-onCompleted"] ],
{ // filters
urls: [getURL("complexLoad/*")],
types: ["main_frame", "image"],