1 // Copyright (c) 2012 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.
6 // TODO(jochen): Remove once the reason for http://crbug.com/161897 is found.
10 "http://www.a.com:PORT/extensions/api_test/webnavigation/serverRedirect/a.html";
11 var URL_REDIRECT = "http://www.b.com:PORT/server-redirect";
12 var URL_TARGET = "http://www.b.com:PORT/";
13 chrome.tabs.create({"url": "about:blank"}, function(tab) {
15 chrome.test.getConfig(function(config) {
16 var fixPort = function(url) {
17 return url.replace(/PORT/g, config.testServer.port);
19 URL_REDIRECT = fixPort(URL_REDIRECT);
20 URL_TARGET = fixPort(URL_TARGET);
21 URL_LOAD = fixPort(URL_LOAD);
22 chrome.test.runTests([
23 // Two navigations initiated by the user while we ran out of renderer
24 // processes before. The second navigation results in a server redirect.
25 // At this point, we have two different render views attached to the
26 // web contents that are in the same process. Should not DCHECK.
27 function serverRedirectSingleProcess() {
29 { label: "a-onBeforeNavigate",
30 event: "onBeforeNavigate",
31 details: { frameId: 0,
37 { label: "a-onCommitted",
39 details: { frameId: 0,
43 transitionQualifiers: [],
44 transitionType: "typed",
46 { label: "a-onDOMContentLoaded",
47 event: "onDOMContentLoaded",
48 details: { frameId: 0,
53 { label: "a-onCompleted",
55 details: { frameId: 0,
60 { label: "b-onBeforeNavigate",
61 event: "onBeforeNavigate",
62 details: { frameId: 0,
68 { label: "b-onCommitted",
70 details: { frameId: 0,
74 transitionQualifiers: ["server_redirect"],
75 transitionType: "typed",
77 { label: "b-onDOMContentLoaded",
78 event: "onDOMContentLoaded",
79 details: { frameId: 0,
84 { label: "b-onCompleted",
86 details: { frameId: 0,
91 [ navigationOrder("a-"), navigationOrder("b-") ]);
93 // Notify the api test that we're waiting for the user.
94 chrome.test.notifyPass();