| OLD | NEW |
| 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 #include <memory> | 5 #include <memory> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 } | 126 } |
| 127 | 127 |
| 128 TEST_F(NativeAppNavigationControllerTest, | 128 TEST_F(NativeAppNavigationControllerTest, |
| 129 TestRemovingAppFromListAfterInstallation) { | 129 TestRemovingAppFromListAfterInstallation) { |
| 130 NSString* const kMapsAppName = @"Maps"; | 130 NSString* const kMapsAppName = @"Maps"; |
| 131 NSString* const kMapsAppId = @"1"; | 131 NSString* const kMapsAppId = @"1"; |
| 132 NSString* const kYoutubeAppName = @"Youtube"; | 132 NSString* const kYoutubeAppName = @"Youtube"; |
| 133 NSString* const kYoutubeAppId = @"2"; | 133 NSString* const kYoutubeAppId = @"2"; |
| 134 | 134 |
| 135 base::scoped_nsobject<InstallationNotifier> installationNotifier( | 135 base::scoped_nsobject<InstallationNotifier> installationNotifier( |
| 136 [InstallationNotifier alloc]); | 136 [[InstallationNotifier alloc] init]); |
| 137 | 137 |
| 138 FakeNativeAppWhitelistManager* fakeManager = | 138 FakeNativeAppWhitelistManager* fakeManager = |
| 139 [[[FakeNativeAppWhitelistManager alloc] init] autorelease]; | 139 [[[FakeNativeAppWhitelistManager alloc] init] autorelease]; |
| 140 IOSChromeScopedTestingChromeBrowserProvider provider( | 140 IOSChromeScopedTestingChromeBrowserProvider provider( |
| 141 base::MakeUnique<FakeChromeBrowserProvider>(fakeManager)); | 141 base::MakeUnique<FakeChromeBrowserProvider>(fakeManager)); |
| 142 | 142 |
| 143 base::scoped_nsobject<FakeNativeAppMetadata> metadataMaps( | 143 base::scoped_nsobject<FakeNativeAppMetadata> metadataMaps( |
| 144 [[FakeNativeAppMetadata alloc] init]); | 144 [[FakeNativeAppMetadata alloc] init]); |
| 145 [metadataMaps setAppName:kMapsAppName]; | 145 [metadataMaps setAppName:kMapsAppName]; |
| 146 [metadataMaps setAppId:kMapsAppId]; | 146 [metadataMaps setAppId:kMapsAppId]; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 168 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 2); | 168 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 2); |
| 169 [fakeManager setAppScheme:kMapsAppName]; | 169 [fakeManager setAppScheme:kMapsAppName]; |
| 170 [controller_ removeAppFromNotification:notificationMaps]; | 170 [controller_ removeAppFromNotification:notificationMaps]; |
| 171 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 1); | 171 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 1); |
| 172 [fakeManager setAppScheme:kYoutubeAppName]; | 172 [fakeManager setAppScheme:kYoutubeAppName]; |
| 173 [controller_ removeAppFromNotification:notificationYouTube]; | 173 [controller_ removeAppFromNotification:notificationYouTube]; |
| 174 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 0); | 174 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 0); |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // namespace | 177 } // namespace |
| OLD | NEW |