Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 511 kNewURL, content::Referrer(), content::PAGE_TRANSITION_TYPED, | 511 kNewURL, content::Referrer(), content::PAGE_TRANSITION_TYPED, |
| 512 std::string()); | 512 std::string()); |
| 513 EXPECT_EQ(0U, notifications.size()); | 513 EXPECT_EQ(0U, notifications.size()); |
| 514 EXPECT_EQ(-1, controller.GetPendingEntryIndex()); | 514 EXPECT_EQ(-1, controller.GetPendingEntryIndex()); |
| 515 EXPECT_TRUE(controller.GetPendingEntry()); | 515 EXPECT_TRUE(controller.GetPendingEntry()); |
| 516 EXPECT_EQ(-1, controller.GetLastCommittedEntryIndex()); | 516 EXPECT_EQ(-1, controller.GetLastCommittedEntryIndex()); |
| 517 EXPECT_EQ(1, delegate->navigation_state_change_count()); | 517 EXPECT_EQ(1, delegate->navigation_state_change_count()); |
| 518 | 518 |
| 519 // Now the navigation redirects. | 519 // Now the navigation redirects. |
| 520 const GURL kRedirectURL("http://bee"); | 520 const GURL kRedirectURL("http://bee"); |
| 521 test_rvh()->OnMessageReceived( | |
| 522 ViewHostMsg_DidRedirectProvisionalLoad(0, // routing_id | |
| 523 -1, // pending page_id | |
| 524 GURL(), // opener | |
| 525 kNewURL, // old url | |
| 526 kRedirectURL)); // new url | |
|
Charlie Reis
2012/05/30 22:43:31
I don't understand. Doesn't this just remove the
mmenke
2012/05/30 22:50:43
After this CL, the NavigationController will no lo
Charlie Reis
2012/05/31 16:56:27
Ok, I experimentally verified that this updated te
| |
| 527 | 521 |
| 528 // We don't want to change the NavigationEntry's url, in case it cancels. | 522 // We don't want to change the NavigationEntry's url, in case it cancels. |
| 529 // Prevents regression of http://crbug.com/77786. | 523 // Prevents regression of http://crbug.com/77786. |
| 530 EXPECT_EQ(kNewURL, controller.GetPendingEntry()->GetURL()); | 524 //EXPECT_EQ(kNewURL, controller.GetPendingEntry()->GetURL()); |
|
Charlie Reis
2012/05/30 22:43:31
Shouldn't have commented out code. But again, thi
Charlie Reis
2012/05/31 16:56:27
This is unfortunate. I'd like to keep this line i
Deprecated (see juliatuttle)
2012/05/31 18:16:24
Done.
| |
| 531 | 525 |
| 532 // It may abort before committing, if it's a download or due to a stop or | 526 // It may abort before committing, if it's a download or due to a stop or |
| 533 // a new navigation from the user. | 527 // a new navigation from the user. |
| 534 ViewHostMsg_DidFailProvisionalLoadWithError_Params params; | 528 ViewHostMsg_DidFailProvisionalLoadWithError_Params params; |
| 535 params.frame_id = 1; | 529 params.frame_id = 1; |
| 536 params.is_main_frame = true; | 530 params.is_main_frame = true; |
| 537 params.error_code = net::ERR_ABORTED; | 531 params.error_code = net::ERR_ABORTED; |
| 538 params.error_description = string16(); | 532 params.error_description = string16(); |
| 539 params.url = kRedirectURL; | 533 params.url = kRedirectURL; |
| 540 params.showing_repost_interstitial = false; | 534 params.showing_repost_interstitial = false; |
| (...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2619 TabNavigation nav(0, url0, GURL(), string16(), | 2613 TabNavigation nav(0, url0, GURL(), string16(), |
| 2620 webkit_glue::CreateHistoryStateForURL(url0), | 2614 webkit_glue::CreateHistoryStateForURL(url0), |
| 2621 content::PAGE_TRANSITION_LINK); | 2615 content::PAGE_TRANSITION_LINK); |
| 2622 session_helper_.AssertNavigationEquals(nav, | 2616 session_helper_.AssertNavigationEquals(nav, |
| 2623 windows_[0]->tabs[0]->navigations[0]); | 2617 windows_[0]->tabs[0]->navigations[0]); |
| 2624 nav.set_url(url2); | 2618 nav.set_url(url2); |
| 2625 session_helper_.AssertNavigationEquals(nav, | 2619 session_helper_.AssertNavigationEquals(nav, |
| 2626 windows_[0]->tabs[0]->navigations[1]); | 2620 windows_[0]->tabs[0]->navigations[1]); |
| 2627 } | 2621 } |
| 2628 */ | 2622 */ |
| OLD | NEW |