| 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 #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-inl.h" | 8 #include "base/stl_util-inl.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 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 params.should_update_history = false; | 1013 params.should_update_history = false; |
| 1014 params.gesture = NavigationGestureUser; | 1014 params.gesture = NavigationGestureUser; |
| 1015 params.is_post = false; | 1015 params.is_post = false; |
| 1016 params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(url2)); | 1016 params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(url2)); |
| 1017 | 1017 |
| 1018 content::LoadCommittedDetails details; | 1018 content::LoadCommittedDetails details; |
| 1019 EXPECT_TRUE(controller().RendererDidNavigate(params, &details)); | 1019 EXPECT_TRUE(controller().RendererDidNavigate(params, &details)); |
| 1020 EXPECT_TRUE(notifications.Check1AndReset( | 1020 EXPECT_TRUE(notifications.Check1AndReset( |
| 1021 NotificationType::NAV_ENTRY_COMMITTED)); | 1021 NotificationType::NAV_ENTRY_COMMITTED)); |
| 1022 EXPECT_EQ(url1, details.previous_url); | 1022 EXPECT_EQ(url1, details.previous_url); |
| 1023 EXPECT_FALSE(details.is_auto); | |
| 1024 EXPECT_FALSE(details.is_in_page); | 1023 EXPECT_FALSE(details.is_in_page); |
| 1025 EXPECT_FALSE(details.is_main_frame); | 1024 EXPECT_FALSE(details.is_main_frame); |
| 1026 | 1025 |
| 1027 // The new entry should be appended. | 1026 // The new entry should be appended. |
| 1028 EXPECT_EQ(2, controller().entry_count()); | 1027 EXPECT_EQ(2, controller().entry_count()); |
| 1029 | 1028 |
| 1030 // New entry should refer to the new page, but the old URL (entries only | 1029 // New entry should refer to the new page, but the old URL (entries only |
| 1031 // reflect the toplevel URL). | 1030 // reflect the toplevel URL). |
| 1032 EXPECT_EQ(url1, details.entry->url()); | 1031 EXPECT_EQ(url1, details.entry->url()); |
| 1033 EXPECT_EQ(params.page_id, details.entry->page_id()); | 1032 EXPECT_EQ(params.page_id, details.entry->page_id()); |
| (...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2307 TabNavigation nav(0, url0, GURL(), string16(), | 2306 TabNavigation nav(0, url0, GURL(), string16(), |
| 2308 webkit_glue::CreateHistoryStateForURL(url0), | 2307 webkit_glue::CreateHistoryStateForURL(url0), |
| 2309 PageTransition::LINK); | 2308 PageTransition::LINK); |
| 2310 session_helper_.AssertNavigationEquals(nav, | 2309 session_helper_.AssertNavigationEquals(nav, |
| 2311 windows_[0]->tabs[0]->navigations[0]); | 2310 windows_[0]->tabs[0]->navigations[0]); |
| 2312 nav.set_url(url2); | 2311 nav.set_url(url2); |
| 2313 session_helper_.AssertNavigationEquals(nav, | 2312 session_helper_.AssertNavigationEquals(nav, |
| 2314 windows_[0]->tabs[0]->navigations[1]); | 2313 windows_[0]->tabs[0]->navigations[1]); |
| 2315 } | 2314 } |
| 2316 */ | 2315 */ |
| OLD | NEW |