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

Side by Side Diff: ios/clean/chrome/browser/ui/root/root_container_view_controller_unittest.mm

Issue 2800313002: [ios] RootCoordinator and view controller. (Closed)
Patch Set: Unittests, showcase, and clean up. 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "ios/clean/chrome/browser/ui/root/root_container_view_controller.h"
6
7 #import "ios/clean/chrome/browser/ui/animators/zoom_transition_delegate.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9 #import "third_party/ocmock/OCMock/OCMock.h"
10
11 #if !defined(__has_feature) || !__has_feature(objc_arc)
12 #error "This file requires ARC support."
13 #endif
14
15 namespace {
16
17 // Tests that RootContainerViewController conforms to ZoomTransitionDelegate.
18 TEST(RootContainerViewControllerTest, TestConformsToZoomTransitionDelegate) {
19 EXPECT_TRUE([RootContainerViewController
20 conformsToProtocol:@protocol(ZoomTransitionDelegate)]);
21 }
22
23 // Tests that calls to |rectForZoomWithKey| are forwarded to the
24 // contentViewController.
25 TEST(RootContainerViewControllerTest, TestForwardingMethod) {
26 id contentViewController = OCMProtocolMock(@protocol(ZoomTransitionDelegate));
27 RootContainerViewController* viewController =
28 [[RootContainerViewController alloc] init];
29 viewController.contentViewController = contentViewController;
30 [viewController rectForZoomWithKey:nil inView:nil];
31 [[contentViewController verify] rectForZoomWithKey:[OCMArg any]
32 inView:[OCMArg any]];
33 }
34
lpromero 2017/04/12 08:58:49 Could you add a test for the switching of contentV
edchin 2017/04/13 07:39:15 Done.
35 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698