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

Side by Side Diff: chrome/test/data/extensions/api_test/webrequest/test_newTab.js

Issue 8775046: Convert another batch of extension tests to manifest_version 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 runTests([
6 // Navigates to a page with a link with target=_blank. Then simulates a click
7 // on that link and verifies that the new tab has a correct tab ID assigned.
8 function () {
9 expect(
10 [ // events
11 { label: "a-onBeforeRequest",
12 event: "onBeforeRequest",
13 details: {
14 url: getURL("newTab/a.html"),
15 frameUrl: getURL("newTab/a.html")
16 }
17 },
18 { label: "a-onResponseStarted",
19 event: "onResponseStarted",
20 details: {
21 url: getURL("newTab/a.html"),
22 statusCode: 200,
23 fromCache: false,
24 statusLine: "HTTP/1.1 200 OK",
25 // Request to chrome-extension:// url has no IP.
26 }
27 },
28 { label: "a-onCompleted",
29 event: "onCompleted",
30 details: {
31 url: getURL("newTab/a.html"),
32 statusCode: 200,
33 fromCache: false,
34 statusLine: "HTTP/1.1 200 OK",
35 // Request to chrome-extension:// url has no IP.
36 }
37 },
38 { label: "b-onBeforeRequest",
39 event: "onBeforeRequest",
40 details: {
41 url: getURL("newTab/b.html"),
42 frameUrl: getURL("newTab/b.html"),
43 tabId: 1,
44 }
45 },
46 { label: "b-onResponseStarted",
47 event: "onResponseStarted",
48 details: {
49 url: getURL("newTab/b.html"),
50 statusCode: 200,
51 fromCache: false,
52 statusLine: "HTTP/1.1 200 OK",
53 // Request to chrome-extension:// url has no IP.
54 tabId: 1,
55 }
56 },
57 { label: "b-onCompleted",
58 event: "onCompleted",
59 details: {
60 url: getURL("newTab/b.html"),
61 statusCode: 200,
62 fromCache: false,
63 statusLine: "HTTP/1.1 200 OK",
64 // Request to chrome-extension:// url has no IP.
65 tabId: 1,
66 }
67 },
68 ],
69 [ // event order
70 ["a-onBeforeRequest", "a-onResponseStarted", "a-onCompleted",
71 "b-onBeforeRequest", "b-onResponseStarted", "b-onCompleted"] ]);
72 // Notify the api test that we're waiting for the user.
73 chrome.test.notifyPass();
74 },
75 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698