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

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

Issue 422233006: Add fake headers to URLRequestRedirectJobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/webrequest/test_declarative1.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 var pass = chrome.test.callbackPass; 5 var pass = chrome.test.callbackPass;
6 6
7 // Constants as functions, not to be called until after runTests. 7 // Constants as functions, not to be called until after runTests.
8 function getURLEchoUserAgent() { 8 function getURLEchoUserAgent() {
9 return getServerURL('echoheader?User-Agent'); 9 return getServerURL('echoheader?User-Agent');
10 } 10 }
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 url: getURL("complexLoad/a.html"), 273 url: getURL("complexLoad/a.html"),
274 frameUrl: getURL("complexLoad/a.html") 274 frameUrl: getURL("complexLoad/a.html")
275 }, 275 },
276 retval: {redirectUrl: getURL("simpleLoad/a.html")} 276 retval: {redirectUrl: getURL("simpleLoad/a.html")}
277 }, 277 },
278 { label: "onBeforeRedirect", 278 { label: "onBeforeRedirect",
279 event: "onBeforeRedirect", 279 event: "onBeforeRedirect",
280 details: { 280 details: {
281 url: getURL("complexLoad/a.html"), 281 url: getURL("complexLoad/a.html"),
282 redirectUrl: getURL("simpleLoad/a.html"), 282 redirectUrl: getURL("simpleLoad/a.html"),
283 statusLine: "",
284 statusCode: -1,
285 fromCache: false, 283 fromCache: false,
284 statusLine: "HTTP/1.1 307 Internal Redirect",
285 statusCode: 307,
286 } 286 }
287 }, 287 },
288 { label: "onBeforeRequest-2", 288 { label: "onBeforeRequest-2",
289 event: "onBeforeRequest", 289 event: "onBeforeRequest",
290 details: { 290 details: {
291 url: getURL("simpleLoad/a.html"), 291 url: getURL("simpleLoad/a.html"),
292 frameUrl: getURL("simpleLoad/a.html"), 292 frameUrl: getURL("simpleLoad/a.html"),
293 }, 293 },
294 }, 294 },
295 { label: "onResponseStarted", 295 { label: "onResponseStarted",
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 // Check the page content for our modified User-Agent string. 987 // Check the page content for our modified User-Agent string.
988 navigateAndWait(getURL("simpleLoad/a.html"), function() { 988 navigateAndWait(getURL("simpleLoad/a.html"), function() {
989 var req = new XMLHttpRequest(); 989 var req = new XMLHttpRequest();
990 var asynchronous = true; 990 var asynchronous = true;
991 req.open("GET", getURLHttpXHRData(), asynchronous); 991 req.open("GET", getURLHttpXHRData(), asynchronous);
992 req.send(null); 992 req.send(null);
993 navigateAndWait(getURL("complexLoad/b.jpg")); 993 navigateAndWait(getURL("complexLoad/b.jpg"));
994 }); 994 });
995 }, 995 },
996 ]); 996 ]);
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/webrequest/test_declarative1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698