OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/ui/tab_switcher/tab_switcher_model.h" | 5 #include "ios/chrome/browser/ui/tab_switcher/tab_switcher_model.h" |
6 | 6 |
7 #include "base/mac/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h" | 10 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 EXPECT_TRUE(insertedIndexes == _expectedSessionInserted.get() || | 81 EXPECT_TRUE(insertedIndexes == _expectedSessionInserted.get() || |
82 [insertedIndexes isEqualToArray:_expectedSessionInserted.get()]); | 82 [insertedIndexes isEqualToArray:_expectedSessionInserted.get()]); |
83 _expectedSessionRemoved.reset(); | 83 _expectedSessionRemoved.reset(); |
84 _expectedSessionInserted.reset(); | 84 _expectedSessionInserted.reset(); |
85 } | 85 } |
86 | 86 |
87 - (void)distantSessionMayNeedUpdate:(std::string const&)tag { | 87 - (void)distantSessionMayNeedUpdate:(std::string const&)tag { |
88 EXPECT_EQ(1UL, _expectedTagsOfTheSessionsNeedingUpdates.erase(tag)); | 88 EXPECT_EQ(1UL, _expectedTagsOfTheSessionsNeedingUpdates.erase(tag)); |
89 } | 89 } |
90 | 90 |
91 - (void)localSessionMayNeedUpdate:(ios_internal::SessionType)type { | 91 - (void)localSessionMayNeedUpdate:(TabSwitcherSessionType)type { |
92 NOTREACHED(); | 92 NOTREACHED(); |
93 } | 93 } |
94 | 94 |
95 - (void)signInPanelChangedTo:(TabSwitcherSignInPanelsType)panelType { | 95 - (void)signInPanelChangedTo:(TabSwitcherSignInPanelsType)panelType { |
96 NOTREACHED(); | 96 NOTREACHED(); |
97 } | 97 } |
98 - (CGSize)sizeForItemAtIndex:(NSUInteger)index | 98 - (CGSize)sizeForItemAtIndex:(NSUInteger)index |
99 inSession:(ios_internal::SessionType)session { | 99 inSession:(TabSwitcherSessionType)session { |
100 return CGSizeZero; | 100 return CGSizeZero; |
101 } | 101 } |
102 @end | 102 @end |
103 | 103 |
104 namespace { | 104 namespace { |
105 | 105 |
106 class TabSwitcherModelTest : public PlatformTest { | 106 class TabSwitcherModelTest : public PlatformTest { |
107 protected: | 107 protected: |
108 void SetUp() override { delegate_.reset([[DelegateTester alloc] init]); } | 108 void SetUp() override { delegate_.reset([[DelegateTester alloc] init]); } |
109 | 109 |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 [delegate_ expectSessionsRemoved:@[ @1 ]]; | 425 [delegate_ expectSessionsRemoved:@[ @1 ]]; |
426 [delegate_ expectSessionsInserted:@[ @0 ]]; | 426 [delegate_ expectSessionsInserted:@[ @0 ]]; |
427 | 427 |
428 [TabSwitcherModel notifyDelegate:delegate_ | 428 [TabSwitcherModel notifyDelegate:delegate_ |
429 aboutChangeFrom:*old_sessions | 429 aboutChangeFrom:*old_sessions |
430 to:*new_sessions]; | 430 to:*new_sessions]; |
431 [delegate_ verify]; | 431 [delegate_ verify]; |
432 } | 432 } |
433 | 433 |
434 } // namespace | 434 } // namespace |
OLD | NEW |