OLD | NEW |
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 Loading... |
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 Loading... |
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 ]); |
OLD | NEW |