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

Side by Side Diff: ios/chrome/app/main_controller_unittest.mm

Issue 2930363003: Revert "[ios] Ensure proper shutdown of Chrome on iOS." (Closed)
Patch Set: Created 3 years, 6 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/chrome/app/main_controller.mm ('k') | ios/chrome/browser/ui/browser_view_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 <Foundation/Foundation.h> 5 #import <Foundation/Foundation.h>
6 6
7 #include "base/threading/thread.h" 7 #include "base/threading/thread.h"
8 #import "ios/chrome/app/application_delegate/app_state.h" 8 #import "ios/chrome/app/application_delegate/app_state.h"
9 #import "ios/chrome/app/application_delegate/url_opener.h" 9 #import "ios/chrome/app/application_delegate/url_opener.h"
10 #include "ios/chrome/app/main_controller_private.h" 10 #include "ios/chrome/app/main_controller_private.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // returns nothing. 49 // returns nothing.
50 typedef void (^HandleLaunchOptions)(id self, 50 typedef void (^HandleLaunchOptions)(id self,
51 NSDictionary* options, 51 NSDictionary* options,
52 BOOL applicationActive, 52 BOOL applicationActive,
53 id<TabOpening> tabOpener, 53 id<TabOpening> tabOpener,
54 id<StartupInformation> startupInformation, 54 id<StartupInformation> startupInformation,
55 AppState* appState); 55 AppState* appState);
56 56
57 class TabOpenerTest : public PlatformTest { 57 class TabOpenerTest : public PlatformTest {
58 protected: 58 protected:
59 void TearDown() override {
60 [main_controller_ stopChromeMain];
61 PlatformTest::TearDown();
62 }
63
64 BOOL swizzleHasBeenCalled() { return swizzle_block_executed_; } 59 BOOL swizzleHasBeenCalled() { return swizzle_block_executed_; }
65 60
66 void swizzleHandleLaunchOptions( 61 void swizzleHandleLaunchOptions(
67 NSDictionary* expectedLaunchOptions, 62 NSDictionary* expectedLaunchOptions,
68 id<StartupInformation> expectedStartupInformation, 63 id<StartupInformation> expectedStartupInformation,
69 AppState* expectedAppState) { 64 AppState* expectedAppState) {
70 swizzle_block_executed_ = NO; 65 swizzle_block_executed_ = NO;
71 swizzle_block_ = 66 swizzle_block_ =
72 [^(id self, NSDictionary* options, BOOL applicationActive, 67 [^(id self, NSDictionary* options, BOOL applicationActive,
73 id<TabOpening> tabOpener, id<StartupInformation> startupInformation, 68 id<TabOpening> tabOpener, id<StartupInformation> startupInformation,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 137
143 // Action. 138 // Action.
144 [tabOpener openTabFromLaunchOptions:nil 139 [tabOpener openTabFromLaunchOptions:nil
145 startupInformation:startupInformationMock 140 startupInformation:startupInformationMock
146 appState:appStateMock]; 141 appState:appStateMock];
147 142
148 // Test. 143 // Test.
149 EXPECT_FALSE(swizzleHasBeenCalled()); 144 EXPECT_FALSE(swizzleHasBeenCalled());
150 } 145 }
151 } // namespace 146 } // namespace
OLDNEW
« no previous file with comments | « ios/chrome/app/main_controller.mm ('k') | ios/chrome/browser/ui/browser_view_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698