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

Side by Side Diff: ios/clean/chrome/browser/ui/tools/tools_mediator_unittest.mm

Issue 2814963002: [ios clean] Use ToolsMenuConfiguration for Menu context. (Closed)
Patch Set: Update Unittest Created 3 years, 8 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
« no previous file with comments | « ios/clean/chrome/browser/ui/tools/tools_mediator.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/clean/chrome/browser/ui/tools/tools_mediator.h" 5 #import "ios/clean/chrome/browser/ui/tools/tools_mediator.h"
6 6
7 #import "ios/clean/chrome/browser/ui/tools/tools_consumer.h" 7 #import "ios/clean/chrome/browser/ui/tools/tools_consumer.h"
8 #import "ios/shared/chrome/browser/ui/tools_menu/tools_menu_configuration.h"
8 #include "testing/platform_test.h" 9 #include "testing/platform_test.h"
9 #import "third_party/ocmock/OCMock/OCMock.h" 10 #import "third_party/ocmock/OCMock/OCMock.h"
10 #include "third_party/ocmock/gtest_support.h" 11 #include "third_party/ocmock/gtest_support.h"
11 12
12 #if !defined(__has_feature) || !__has_feature(objc_arc) 13 #if !defined(__has_feature) || !__has_feature(objc_arc)
13 #error "This file requires ARC support." 14 #error "This file requires ARC support."
14 #endif 15 #endif
15 16
16 namespace { 17 namespace {
17 18
18 class ToolsMediatorTest : public PlatformTest { 19 class ToolsMediatorTest : public PlatformTest {
19 protected: 20 protected:
20 ToolsMediator* mediator_; 21 ToolsMediator* mediator_;
21 }; 22 };
22 23
23 TEST_F(ToolsMediatorTest, TestSetConsumer) { 24 TEST_F(ToolsMediatorTest, TestSetConsumer) {
24 id consumer = OCMProtocolMock(@protocol(ToolsConsumer)); 25 id consumer = OCMProtocolMock(@protocol(ToolsConsumer));
25 mediator_ = [[ToolsMediator alloc] initWithConsumer:consumer]; 26 id configuration = OCMClassMock([ToolsMenuConfiguration class]);
27 OCMStub([configuration isInTabSwitcher]).andReturn(YES);
28
29 mediator_ = [[ToolsMediator alloc] initWithConsumer:consumer
30 andConfiguration:configuration];
26 31
27 [[consumer verify] setToolsMenuItems:[OCMArg any]]; 32 [[consumer verify] setToolsMenuItems:[OCMArg any]];
33 [[consumer verify] setDisplayOverflowControls:NO];
28 } 34 }
29 35
30 } // namespace 36 } // namespace
OLDNEW
« no previous file with comments | « ios/clean/chrome/browser/ui/tools/tools_mediator.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698