| 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:(SessionType)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 inSession:(SessionType)session { |
| 99 inSession:(ios_internal::SessionType)session { | |
| 100 return CGSizeZero; | 99 return CGSizeZero; |
| 101 } | 100 } |
| 102 @end | 101 @end |
| 103 | 102 |
| 104 namespace { | 103 namespace { |
| 105 | 104 |
| 106 class TabSwitcherModelTest : public PlatformTest { | 105 class TabSwitcherModelTest : public PlatformTest { |
| 107 protected: | 106 protected: |
| 108 void SetUp() override { delegate_.reset([[DelegateTester alloc] init]); } | 107 void SetUp() override { delegate_.reset([[DelegateTester alloc] init]); } |
| 109 | 108 |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 [delegate_ expectSessionsRemoved:@[ @1 ]]; | 424 [delegate_ expectSessionsRemoved:@[ @1 ]]; |
| 426 [delegate_ expectSessionsInserted:@[ @0 ]]; | 425 [delegate_ expectSessionsInserted:@[ @0 ]]; |
| 427 | 426 |
| 428 [TabSwitcherModel notifyDelegate:delegate_ | 427 [TabSwitcherModel notifyDelegate:delegate_ |
| 429 aboutChangeFrom:*old_sessions | 428 aboutChangeFrom:*old_sessions |
| 430 to:*new_sessions]; | 429 to:*new_sessions]; |
| 431 [delegate_ verify]; | 430 [delegate_ verify]; |
| 432 } | 431 } |
| 433 | 432 |
| 434 } // namespace | 433 } // namespace |
| OLD | NEW |