| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |