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

Side by Side Diff: ios/web/navigation/navigation_manager_impl_unittest.mm

Issue 2614443004: [ios] Moved all web mocks to ios/web/public/test/fakes. (Closed)
Patch Set: Moved test_redirect_observer back Created 3 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import "ios/web/navigation/navigation_manager_impl.h" 5 #import "ios/web/navigation/navigation_manager_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac/scoped_nsobject.h" 8 #import "base/mac/scoped_nsobject.h"
9 #import "ios/web/navigation/crw_session_controller+private_constructors.h" 9 #import "ios/web/navigation/crw_session_controller+private_constructors.h"
10 #import "ios/web/navigation/navigation_manager_delegate.h" 10 #import "ios/web/navigation/navigation_manager_delegate.h"
11 #include "ios/web/public/test/test_browser_state.h" 11 #include "ios/web/public/test/fakes/test_browser_state.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "testing/platform_test.h" 13 #include "testing/platform_test.h"
14 14
15 namespace web { 15 namespace web {
16 namespace { 16 namespace {
17 // Stub class for NavigationManagerDelegate. 17 // Stub class for NavigationManagerDelegate.
18 class TestNavigationManagerDelegate : public NavigationManagerDelegate { 18 class TestNavigationManagerDelegate : public NavigationManagerDelegate {
19 void GoToIndex(int index) override {} 19 void GoToIndex(int index) override {}
20 void LoadURLWithParams(const NavigationManager::WebLoadParams&) override {} 20 void LoadURLWithParams(const NavigationManager::WebLoadParams&) override {}
21 void OnNavigationItemsPruned(size_t pruned_item_count) override {} 21 void OnNavigationItemsPruned(size_t pruned_item_count) override {}
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 [session_controller() goToEntryAtIndex:0]; 522 [session_controller() goToEntryAtIndex:0];
523 [session_controller() setPendingEntryIndex:1]; 523 [session_controller() setPendingEntryIndex:1];
524 ASSERT_EQ(3, navigation_manager()->GetItemCount()); 524 ASSERT_EQ(3, navigation_manager()->GetItemCount());
525 ASSERT_EQ(0, navigation_manager()->GetCurrentItemIndex()); 525 ASSERT_EQ(0, navigation_manager()->GetCurrentItemIndex());
526 ASSERT_EQ(1, navigation_manager()->GetPendingItemIndex()); 526 ASSERT_EQ(1, navigation_manager()->GetPendingItemIndex());
527 EXPECT_EQ(2, navigation_manager()->GetIndexForOffset(1)); 527 EXPECT_EQ(2, navigation_manager()->GetIndexForOffset(1));
528 EXPECT_EQ(0, navigation_manager()->GetIndexForOffset(-1)); 528 EXPECT_EQ(0, navigation_manager()->GetIndexForOffset(-1));
529 } 529 }
530 530
531 } // namespace web 531 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/navigation/crw_session_controller_unittest.mm ('k') | ios/web/net/request_tracker_impl_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698