Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Side by Side Diff: content/browser/frame_host/navigation_controller_impl_unittest.cc

Issue 1214073005: Remove NAVIGATION_TYPE_IN_PAGE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: didreplace Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 4925 matching lines...) Expand 10 before | Expand all | Expand 10 after
4936 4936
4937 // Navigate in page. 4937 // Navigate in page.
4938 params.url = GURL("http://foo#foo"); 4938 params.url = GURL("http://foo#foo");
4939 params.transition = ui::PAGE_TRANSITION_LINK; 4939 params.transition = ui::PAGE_TRANSITION_LINK;
4940 params.was_within_same_page = true; 4940 params.was_within_same_page = true;
4941 { 4941 {
4942 LoadCommittedDetails details; 4942 LoadCommittedDetails details;
4943 controller_impl().RendererDidNavigate(main_test_rfh(), params, &details); 4943 controller_impl().RendererDidNavigate(main_test_rfh(), params, &details);
4944 EXPECT_EQ(PAGE_TYPE_ERROR, 4944 EXPECT_EQ(PAGE_TYPE_ERROR,
4945 controller_impl().GetLastCommittedEntry()->GetPageType()); 4945 controller_impl().GetLastCommittedEntry()->GetPageType());
4946 EXPECT_EQ(NAVIGATION_TYPE_IN_PAGE, details.type); 4946 EXPECT_TRUE(details.is_in_page);
4947 } 4947 }
4948 } 4948 }
4949 4949
4950 // Tests that if a stale navigation comes back from the renderer, it is properly 4950 // Tests that if a stale navigation comes back from the renderer, it is properly
4951 // resurrected. 4951 // resurrected.
4952 TEST_F(NavigationControllerTest, StaleNavigationsResurrected) { 4952 TEST_F(NavigationControllerTest, StaleNavigationsResurrected) {
4953 NavigationControllerImpl& controller = controller_impl(); 4953 NavigationControllerImpl& controller = controller_impl();
4954 TestNotificationTracker notifications; 4954 TestNotificationTracker notifications;
4955 RegisterForAllNavNotifications(&notifications, &controller); 4955 RegisterForAllNavNotifications(&notifications, &controller);
4956 4956
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
5003 // means that occasionally a navigation conflict will end up with one entry 5003 // means that occasionally a navigation conflict will end up with one entry
5004 // bubbling to the end of the entry list, but that's the least-bad option. 5004 // bubbling to the end of the entry list, but that's the least-bad option.
5005 EXPECT_EQ(3, controller.GetEntryCount()); 5005 EXPECT_EQ(3, controller.GetEntryCount());
5006 EXPECT_EQ(2, controller.GetCurrentEntryIndex()); 5006 EXPECT_EQ(2, controller.GetCurrentEntryIndex());
5007 EXPECT_EQ(url_a, controller.GetEntryAtIndex(0)->GetURL()); 5007 EXPECT_EQ(url_a, controller.GetEntryAtIndex(0)->GetURL());
5008 EXPECT_EQ(url_c, controller.GetEntryAtIndex(1)->GetURL()); 5008 EXPECT_EQ(url_c, controller.GetEntryAtIndex(1)->GetURL());
5009 EXPECT_EQ(url_b, controller.GetEntryAtIndex(2)->GetURL()); 5009 EXPECT_EQ(url_b, controller.GetEntryAtIndex(2)->GetURL());
5010 } 5010 }
5011 5011
5012 } // namespace content 5012 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698