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

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

Issue 568583002: Introduce WebRequestEventRouterDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hide tab_id and window_id from extensions. Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function getURLHttpXHR() { 5 function getURLHttpXHR() {
6 return getServerURL('extensions/api_test/webrequest/xhr/a.html'); 6 return getServerURL('extensions/api_test/webrequest/xhr/a.html');
7 } 7 }
8 function getURLHttpXHRJavaScript() { 8 function getURLHttpXHRJavaScript() {
9 return getServerURL('extensions/api_test/webrequest/xhr/a.js'); 9 return getServerURL('extensions/api_test/webrequest/xhr/a.js');
10 } 10 }
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 }, 205 },
206 ], 206 ],
207 [ // event order 207 [ // event order
208 ["a-onBeforeRequest", "a-onResponseStarted", 208 ["a-onBeforeRequest", "a-onResponseStarted",
209 "b-onBeforeRequest", "b-onResponseStarted"], 209 "b-onBeforeRequest", "b-onResponseStarted"],
210 ["a-onResponseStarted", "a-onCompleted"], 210 ["a-onResponseStarted", "a-onCompleted"],
211 ["b-onResponseStarted", "b-onCompleted"] ], 211 ["b-onResponseStarted", "b-onCompleted"] ],
212 { // filters 212 { // filters
213 urls: [getURL("complexLoad/*")], 213 urls: [getURL("complexLoad/*")],
214 types: ["main_frame", "image"], 214 types: ["main_frame", "image"],
215 tabId: tabId 215 extraRequestParams: {
216 tabId: tabId,
217 }
216 }); 218 });
217 chrome.tabs.create({ url: getURL("simpleLoad/a.html") }, 219 chrome.tabs.create({ url: getURL("simpleLoad/a.html") },
218 function(newTab) { 220 function(newTab) {
219 chrome.tabs.remove(newTab.id); 221 chrome.tabs.remove(newTab.id);
220 navigateAndWait(getURL("complexLoad/a.html")); 222 navigateAndWait(getURL("complexLoad/a.html"));
221 }); 223 });
222 }, 224 },
223 225
224 // Navigates to a page to generates an XHR. 226 // Navigates to a page to generates an XHR.
225 function xhrLoad() { 227 function xhrLoad() {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 } 385 }
384 ], 386 ],
385 [ // event order 387 [ // event order
386 ["onBeforeRequest-1", "onBeforeSendHeaders-1", "onSendHeaders-1", 388 ["onBeforeRequest-1", "onBeforeSendHeaders-1", "onSendHeaders-1",
387 "onHeadersReceived-1", "onResponseStarted-1", "onCompleted-1", 389 "onHeadersReceived-1", "onResponseStarted-1", "onCompleted-1",
388 "onBeforeRequest-2", "onBeforeSendHeaders-2", "onSendHeaders-2", 390 "onBeforeRequest-2", "onBeforeSendHeaders-2", "onSendHeaders-2",
389 "onHeadersReceived-2", "onResponseStarted-2", "onCompleted-2"] ]); 391 "onHeadersReceived-2", "onResponseStarted-2", "onCompleted-2"] ]);
390 navigateAndWait(getURLHttpXHR()); 392 navigateAndWait(getURLHttpXHR());
391 }, 393 },
392 ]); 394 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698