| 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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 params.should_update_history = false; | 996 params.should_update_history = false; |
| 997 params.gesture = NavigationGestureUser; | 997 params.gesture = NavigationGestureUser; |
| 998 params.is_post = false; | 998 params.is_post = false; |
| 999 params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(url2)); | 999 params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(url2)); |
| 1000 | 1000 |
| 1001 content::LoadCommittedDetails details; | 1001 content::LoadCommittedDetails details; |
| 1002 EXPECT_TRUE(controller().RendererDidNavigate(params, &details)); | 1002 EXPECT_TRUE(controller().RendererDidNavigate(params, &details)); |
| 1003 EXPECT_TRUE(notifications.Check1AndReset( | 1003 EXPECT_TRUE(notifications.Check1AndReset( |
| 1004 NotificationType::NAV_ENTRY_COMMITTED)); | 1004 NotificationType::NAV_ENTRY_COMMITTED)); |
| 1005 EXPECT_EQ(url1, details.previous_url); | 1005 EXPECT_EQ(url1, details.previous_url); |
| 1006 EXPECT_FALSE(details.is_auto); |
| 1006 EXPECT_FALSE(details.is_in_page); | 1007 EXPECT_FALSE(details.is_in_page); |
| 1007 EXPECT_FALSE(details.is_main_frame); | 1008 EXPECT_FALSE(details.is_main_frame); |
| 1008 | 1009 |
| 1009 // The new entry should be appended. | 1010 // The new entry should be appended. |
| 1010 EXPECT_EQ(2, controller().entry_count()); | 1011 EXPECT_EQ(2, controller().entry_count()); |
| 1011 | 1012 |
| 1012 // New entry should refer to the new page, but the old URL (entries only | 1013 // New entry should refer to the new page, but the old URL (entries only |
| 1013 // reflect the toplevel URL). | 1014 // reflect the toplevel URL). |
| 1014 EXPECT_EQ(url1, details.entry->url()); | 1015 EXPECT_EQ(url1, details.entry->url()); |
| 1015 EXPECT_EQ(params.page_id, details.entry->page_id()); | 1016 EXPECT_EQ(params.page_id, details.entry->page_id()); |
| (...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2289 TabNavigation nav(0, url0, GURL(), string16(), | 2290 TabNavigation nav(0, url0, GURL(), string16(), |
| 2290 webkit_glue::CreateHistoryStateForURL(url0), | 2291 webkit_glue::CreateHistoryStateForURL(url0), |
| 2291 PageTransition::LINK); | 2292 PageTransition::LINK); |
| 2292 session_helper_.AssertNavigationEquals(nav, | 2293 session_helper_.AssertNavigationEquals(nav, |
| 2293 windows_[0]->tabs[0]->navigations[0]); | 2294 windows_[0]->tabs[0]->navigations[0]); |
| 2294 nav.set_url(url2); | 2295 nav.set_url(url2); |
| 2295 session_helper_.AssertNavigationEquals(nav, | 2296 session_helper_.AssertNavigationEquals(nav, |
| 2296 windows_[0]->tabs[0]->navigations[1]); | 2297 windows_[0]->tabs[0]->navigations[1]); |
| 2297 } | 2298 } |
| 2298 */ | 2299 */ |
| OLD | NEW |