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

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

Issue 2667873002: [ios clean] Remove stop on Browser coordinator dealloc (Closed)
Patch Set: Disable Test Created 3 years, 10 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/browser_coordinator.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/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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 @implementation NonOverlayableCoordinator 43 @implementation NonOverlayableCoordinator
44 44
45 - (BOOL)canAddOverlayCoordinator:(BrowserCoordinator*)overlayCoordinator { 45 - (BOOL)canAddOverlayCoordinator:(BrowserCoordinator*)overlayCoordinator {
46 return NO; 46 return NO;
47 } 47 }
48 48
49 @end 49 @end
50 50
51 namespace { 51 namespace {
52 52
53 TEST(BrowserCoordinatorTest, TestStopOnDealloc) { 53 // HACK: This test will stay disabled, removed or changed depending on how
54 // BrowserCoordinator behaves on dealloc.
edchin 2017/02/02 22:43:20 I think it is best to remove this code entirely. Y
sczs 2017/02/02 23:25:51 I was thinking the exact same thing. But decide to
marq (ping after 24h) 2017/02/03 08:36:15 I want to get out of the mindset of disabling test
sczs 2017/02/03 18:51:23 Done.
55 TEST(DISABLED_BrowserCoordinatorTest, TestStopOnDealloc) {
54 __block BOOL called = NO; 56 __block BOOL called = NO;
55 57
56 { 58 {
57 TestCoordinator* coordinator = [[TestCoordinator alloc] init]; 59 TestCoordinator* coordinator = [[TestCoordinator alloc] init];
58 coordinator.stopHandler = ^{ 60 coordinator.stopHandler = ^{
59 called = YES; 61 called = YES;
60 }; 62 };
61 } 63 }
62 64
63 EXPECT_TRUE(called); 65 EXPECT_TRUE(called);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 [[NonOverlayableCoordinator alloc] init]; 133 [[NonOverlayableCoordinator alloc] init];
132 TestCoordinator* thirdOverlay = [[TestCoordinator alloc] init]; 134 TestCoordinator* thirdOverlay = [[TestCoordinator alloc] init];
133 135
134 EXPECT_FALSE([noOverlays canAddOverlayCoordinator:thirdOverlay]); 136 EXPECT_FALSE([noOverlays canAddOverlayCoordinator:thirdOverlay]);
135 EXPECT_FALSE(thirdOverlay.overlaying); 137 EXPECT_FALSE(thirdOverlay.overlaying);
136 [noOverlays addOverlayCoordinator:thirdOverlay]; 138 [noOverlays addOverlayCoordinator:thirdOverlay];
137 EXPECT_FALSE(thirdOverlay.overlaying); 139 EXPECT_FALSE(thirdOverlay.overlaying);
138 } 140 }
139 141
140 } // namespace 142 } // namespace
OLDNEW
« no previous file with comments | « ios/clean/chrome/browser/browser_coordinator.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698