| 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 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1445 self_params.gesture = NavigationGestureUser; | 1445 self_params.gesture = NavigationGestureUser; |
| 1446 self_params.is_post = false; | 1446 self_params.is_post = false; |
| 1447 self_params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(url1)); | 1447 self_params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(url1)); |
| 1448 self_params.was_within_same_page = true; | 1448 self_params.was_within_same_page = true; |
| 1449 | 1449 |
| 1450 content::LoadCommittedDetails details; | 1450 content::LoadCommittedDetails details; |
| 1451 EXPECT_TRUE(controller.RendererDidNavigate(self_params, &details)); | 1451 EXPECT_TRUE(controller.RendererDidNavigate(self_params, &details)); |
| 1452 EXPECT_TRUE(notifications.Check1AndReset( | 1452 EXPECT_TRUE(notifications.Check1AndReset( |
| 1453 content::NOTIFICATION_NAV_ENTRY_COMMITTED)); | 1453 content::NOTIFICATION_NAV_ENTRY_COMMITTED)); |
| 1454 EXPECT_TRUE(details.is_in_page); | 1454 EXPECT_TRUE(details.is_in_page); |
| 1455 // TODO(tsepez): check why |did_replace_entry| is returned as false. | 1455 EXPECT_TRUE(details.did_replace_entry); |
| 1456 EXPECT_FALSE(details.did_replace_entry); | |
| 1457 EXPECT_EQ(1, controller.GetEntryCount()); | 1456 EXPECT_EQ(1, controller.GetEntryCount()); |
| 1458 | 1457 |
| 1459 // Fragment navigation to a new page_id. | 1458 // Fragment navigation to a new page_id. |
| 1460 const GURL url2("http://foo#a"); | 1459 const GURL url2("http://foo#a"); |
| 1461 ViewHostMsg_FrameNavigate_Params params; | 1460 ViewHostMsg_FrameNavigate_Params params; |
| 1462 params.page_id = 1; | 1461 params.page_id = 1; |
| 1463 params.url = url2; | 1462 params.url = url2; |
| 1464 params.transition = content::PAGE_TRANSITION_LINK; | 1463 params.transition = content::PAGE_TRANSITION_LINK; |
| 1465 params.should_update_history = false; | 1464 params.should_update_history = false; |
| 1466 params.gesture = NavigationGestureUser; | 1465 params.gesture = NavigationGestureUser; |
| (...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2861 TabNavigation nav(0, url0, GURL(), string16(), | 2860 TabNavigation nav(0, url0, GURL(), string16(), |
| 2862 webkit_glue::CreateHistoryStateForURL(url0), | 2861 webkit_glue::CreateHistoryStateForURL(url0), |
| 2863 content::PAGE_TRANSITION_LINK); | 2862 content::PAGE_TRANSITION_LINK); |
| 2864 session_helper_.AssertNavigationEquals(nav, | 2863 session_helper_.AssertNavigationEquals(nav, |
| 2865 windows_[0]->tabs[0]->navigations[0]); | 2864 windows_[0]->tabs[0]->navigations[0]); |
| 2866 nav.set_url(url2); | 2865 nav.set_url(url2); |
| 2867 session_helper_.AssertNavigationEquals(nav, | 2866 session_helper_.AssertNavigationEquals(nav, |
| 2868 windows_[0]->tabs[0]->navigations[1]); | 2867 windows_[0]->tabs[0]->navigations[1]); |
| 2869 } | 2868 } |
| 2870 */ | 2869 */ |
| OLD | NEW |