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

Unified Diff: chrome/test/data/extensions/api_test/webrequest/test_newTab.html

Issue 8404046: When creating a tab contents for a browser in the RVHDelegateHelper, create a wrapper immediately. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 2 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 | « chrome/test/data/extensions/api_test/webrequest/newTab/b.html ('k') | no next file » | 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_newTab.html
diff --git a/chrome/test/data/extensions/api_test/webrequest/test_newTab.html b/chrome/test/data/extensions/api_test/webrequest/test_newTab.html
new file mode 100644
index 0000000000000000000000000000000000000000..b81337464150f307f1e2ea66751b0d0af67c5668
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/webrequest/test_newTab.html
@@ -0,0 +1,75 @@
+<script src="framework.js">
+</script>
+<script>
+runTests([
+ // Navigates to a page with a link with target=_blank. Then simulates a click
+ // on that link and verifies that the new tab has a correct tab ID assigned.
+ function () {
+ expect(
+ [ // events
+ { label: "a-onBeforeRequest",
+ event: "onBeforeRequest",
+ details: {
+ url: getURL("newTab/a.html"),
+ frameUrl: getURL("newTab/a.html")
+ }
+ },
+ { label: "a-onResponseStarted",
+ event: "onResponseStarted",
+ details: {
+ url: getURL("newTab/a.html"),
+ statusCode: 200,
+ fromCache: false,
+ statusLine: "HTTP/1.1 200 OK",
+ // Request to chrome-extension:// url has no IP.
+ }
+ },
+ { label: "a-onCompleted",
+ event: "onCompleted",
+ details: {
+ url: getURL("newTab/a.html"),
+ statusCode: 200,
+ fromCache: false,
+ statusLine: "HTTP/1.1 200 OK",
+ // Request to chrome-extension:// url has no IP.
+ }
+ },
+ { label: "b-onBeforeRequest",
+ event: "onBeforeRequest",
+ details: {
+ url: getURL("newTab/b.html"),
+ frameUrl: getURL("newTab/b.html"),
+ tabId: 1,
+ }
+ },
+ { label: "b-onResponseStarted",
+ event: "onResponseStarted",
+ details: {
+ url: getURL("newTab/b.html"),
+ statusCode: 200,
+ fromCache: false,
+ statusLine: "HTTP/1.1 200 OK",
+ // Request to chrome-extension:// url has no IP.
+ tabId: 1,
+ }
+ },
+ { label: "b-onCompleted",
+ event: "onCompleted",
+ details: {
+ url: getURL("newTab/b.html"),
+ statusCode: 200,
+ fromCache: false,
+ statusLine: "HTTP/1.1 200 OK",
+ // Request to chrome-extension:// url has no IP.
+ tabId: 1,
+ }
+ },
+ ],
+ [ // event order
+ ["a-onBeforeRequest", "a-onResponseStarted", "a-onCompleted",
+ "b-onBeforeRequest", "b-onResponseStarted", "b-onCompleted"] ]);
+ // Notify the api test that we're waiting for the user.
+ chrome.test.notifyPass();
+ },
+]);
+</script>
« no previous file with comments | « chrome/test/data/extensions/api_test/webrequest/newTab/b.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698