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

Side by Side Diff: ios/clean/chrome/browser/browser_coordinator_unittest.mm

Issue 2734333003: Child coordinators notify their parent upon -start and -stop. (Closed)
Patch Set: Fix tests build (they were on the "all" target) Created 3 years, 9 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
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/browser_coordinator+internal.h" 5 #import "ios/clean/chrome/browser/browser_coordinator+internal.h"
6 #import "ios/clean/chrome/browser/browser_coordinator.h" 6 #import "ios/clean/chrome/browser/browser_coordinator.h"
7 7
8 #import "ios/shared/chrome/browser/coordinator_context/coordinator_context.h" 8 #import "ios/shared/chrome/browser/coordinator_context/coordinator_context.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/gtest_mac.h" 10 #include "testing/gtest_mac.h"
(...skipping 13 matching lines...) Expand all
24 24
25 - (instancetype)init { 25 - (instancetype)init {
26 if (!(self = [super init])) 26 if (!(self = [super init]))
27 return nil; 27 return nil;
28 28
29 _viewController = [[UIViewController alloc] init]; 29 _viewController = [[UIViewController alloc] init];
30 return self; 30 return self;
31 } 31 }
32 32
33 - (void)stop { 33 - (void)stop {
34 [super stop];
34 if (self.stopHandler) 35 if (self.stopHandler)
35 self.stopHandler(); 36 self.stopHandler();
36 } 37 }
37 38
38 @end 39 @end
39 40
40 @interface NonOverlayableCoordinator : TestCoordinator 41 @interface NonOverlayableCoordinator : TestCoordinator
41 @end 42 @end
42 43
43 @implementation NonOverlayableCoordinator 44 @implementation NonOverlayableCoordinator
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 [[NonOverlayableCoordinator alloc] init]; 132 [[NonOverlayableCoordinator alloc] init];
132 TestCoordinator* thirdOverlay = [[TestCoordinator alloc] init]; 133 TestCoordinator* thirdOverlay = [[TestCoordinator alloc] init];
133 134
134 EXPECT_FALSE([noOverlays canAddOverlayCoordinator:thirdOverlay]); 135 EXPECT_FALSE([noOverlays canAddOverlayCoordinator:thirdOverlay]);
135 EXPECT_FALSE(thirdOverlay.overlaying); 136 EXPECT_FALSE(thirdOverlay.overlaying);
136 [noOverlays addOverlayCoordinator:thirdOverlay]; 137 [noOverlays addOverlayCoordinator:thirdOverlay];
137 EXPECT_FALSE(thirdOverlay.overlaying); 138 EXPECT_FALSE(thirdOverlay.overlaying);
138 } 139 }
139 140
140 } // namespace 141 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698