| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 onload = function() { | 5 onload = function() { |
| 6 var getURL = chrome.extension.getURL; | 6 var getURL = chrome.extension.getURL; |
| 7 var URL_REGULAR = | 7 var URL_REGULAR = |
| 8 "http://127.0.0.1:PORT/extensions/api_test/webnavigation/" + | 8 "http://127.0.0.1:PORT/extensions/api_test/webnavigation/" + |
| 9 "crossProcess/empty.html"; | 9 "crossProcess/empty.html"; |
| 10 var URL_REDIRECT = "http://www.a.com:PORT/server-redirect"; | 10 var URL_REDIRECT = "http://www.a.com:PORT/server-redirect"; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 "c-onBeforeNavigate"] ]); | 180 "c-onBeforeNavigate"] ]); |
| 181 | 181 |
| 182 chrome.tabs.update( | 182 chrome.tabs.update( |
| 183 tabId, | 183 tabId, |
| 184 { url: getURL('c.html?' + config.testServer.port) }); | 184 { url: getURL('c.html?' + config.testServer.port) }); |
| 185 }, | 185 }, |
| 186 | 186 |
| 187 // Navigates to a different site, but then commits | 187 // Navigates to a different site, but then commits |
| 188 // same-site, non-user, renderer-initiated navigation | 188 // same-site, non-user, renderer-initiated navigation |
| 189 // before the slow cross-site navigation commits. | 189 // before the slow cross-site navigation commits. |
| 190 /* |
| 191 * This test case is disabled, because it is flaky and fails fairly |
| 192 * consistently on MSan bots. See https://crbug.com/467800 |
| 193 * |
| 190 function crossProcessWithSameSiteCommit() { | 194 function crossProcessWithSameSiteCommit() { |
| 191 expect([ | 195 expect([ |
| 192 { label: "a-onBeforeNavigate", | 196 { label: "a-onBeforeNavigate", |
| 193 event: "onBeforeNavigate", | 197 event: "onBeforeNavigate", |
| 194 details: { frameId: 0, | 198 details: { frameId: 0, |
| 195 parentFrameId: -1, | 199 parentFrameId: -1, |
| 196 processId: 0, | 200 processId: 0, |
| 197 tabId: 0, | 201 tabId: 0, |
| 198 timeStamp: 0, | 202 timeStamp: 0, |
| 199 url: getURL('d.html') }}, | 203 url: getURL('d.html') }}, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 navigationOrder("b-"), | 291 navigationOrder("b-"), |
| 288 [ "a-onCompleted", "b-onBeforeNavigate", "c-onBeforeNavigate", | 292 [ "a-onCompleted", "b-onBeforeNavigate", "c-onBeforeNavigate", |
| 289 "c-onCommitted", "b-onCommitted"] ]); | 293 "c-onCommitted", "b-onCommitted"] ]); |
| 290 | 294 |
| 291 // Note: d.html expects the redirect path to follow the port | 295 // Note: d.html expects the redirect path to follow the port |
| 292 // number. | 296 // number. |
| 293 chrome.tabs.update( | 297 chrome.tabs.update( |
| 294 tabId, | 298 tabId, |
| 295 { url: getURL('d.html?' + config.testServer.port + "/test1") }); | 299 { url: getURL('d.html?' + config.testServer.port + "/test1") }); |
| 296 }, | 300 }, |
| 301 */ |
| 297 | 302 |
| 298 // Navigates cross-site, but then starts a same-site, | 303 // Navigates cross-site, but then starts a same-site, |
| 299 // renderer-initiated navigation with user gesture. | 304 // renderer-initiated navigation with user gesture. |
| 300 // The expectation is that the cross-process navigation | 305 // The expectation is that the cross-process navigation |
| 301 // will be cancelled and the API should dispatch an onErrorOccurred | 306 // will be cancelled and the API should dispatch an onErrorOccurred |
| 302 // event. | 307 // event. |
| 303 function crossProcessAbortUserGesture() { | 308 function crossProcessAbortUserGesture() { |
| 304 expect([ | 309 expect([ |
| 305 { label: "a-onBeforeNavigate", | 310 { label: "a-onBeforeNavigate", |
| 306 event: "onBeforeNavigate", | 311 event: "onBeforeNavigate", |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 // number. | 394 // number. |
| 390 chrome.tabs.update( | 395 chrome.tabs.update( |
| 391 tabId, | 396 tabId, |
| 392 { url: getURL('d.html?' + config.testServer.port + "/test2") }); | 397 { url: getURL('d.html?' + config.testServer.port + "/test2") }); |
| 393 }, | 398 }, |
| 394 | 399 |
| 395 ]); | 400 ]); |
| 396 }); | 401 }); |
| 397 }); | 402 }); |
| 398 }; | 403 }; |
| OLD | NEW |