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

Side by Side Diff: ios/chrome/browser/payments/shipping_option_selection_coordinator_unittest.mm

Issue 2621453002: Selected shipping option in payment summary view + shipping option selection view (Closed)
Patch Set: Initial 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
(Empty)
1 // Copyright 2016 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 #include "base/test/ios/wait_util.h"
6 #import "ios/chrome/browser/payments/shipping_option_selection_coordinator.h"
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace {
10
11 // Tests that invoking start and stop on the coordinator presents and dismisses
12 // the ShippingOptionSelectionViewController, respectively.
13 TEST(ShippingOptionSelectionCoordinatorTest, StartAndStop) {
14 @autoreleasepool {
15 UIViewController* base_view_controller =
16 [[[UIViewController alloc] init] autorelease];
17 UINavigationController* navigation_controller =
18 [[[UINavigationController alloc]
19 initWithRootViewController:base_view_controller] autorelease];
20 ShippingOptionSelectionCoordinator* coordinator =
21 [[[ShippingOptionSelectionCoordinator alloc]
22 initWithBaseViewController:base_view_controller] autorelease];
23
24 EXPECT_EQ(1u, [navigation_controller.viewControllers count]);
25
26 [coordinator start];
27 // Short delay to allow animation to complete.
28 base::test::ios::SpinRunLoopWithMaxDelay(
29 base::TimeDelta::FromSecondsD(1.0));
30 EXPECT_EQ(2u, [navigation_controller.viewControllers count]);
31
32 [coordinator stop];
33 // Short delay to allow animation to complete.
34 base::test::ios::SpinRunLoopWithMaxDelay(
35 base::TimeDelta::FromSecondsD(1.0));
36 EXPECT_EQ(1u, [navigation_controller.viewControllers count]);
37 }
38 }
39 }
lpromero 2017/01/11 12:51:15 New line before and // namespace
Moe 2017/01/12 00:06:18 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698