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

Side by Side Diff: ios/chrome/browser/native_app_launcher/native_app_navigation_controller_unittest.mm

Issue 2731553005: Introduced StoreKitTabHelper class (Closed)
Patch Set: line break for 80 columns 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 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/metrics/user_metrics.h" 10 #include "base/metrics/user_metrics.h"
(...skipping 29 matching lines...) Expand all
40 private: 40 private:
41 base::scoped_nsprotocol<id<NativeAppWhitelistManager>> manager_; 41 base::scoped_nsprotocol<id<NativeAppWhitelistManager>> manager_;
42 }; 42 };
43 43
44 class NativeAppNavigationControllerTest : public ChromeWebTest { 44 class NativeAppNavigationControllerTest : public ChromeWebTest {
45 protected: 45 protected:
46 void SetUp() override { 46 void SetUp() override {
47 ChromeWebTest::SetUp(); 47 ChromeWebTest::SetUp();
48 controller_.reset([[NativeAppNavigationController alloc] 48 controller_.reset([[NativeAppNavigationController alloc]
49 initWithWebState:web_state() 49 initWithWebState:web_state()
50 requestContextGetter:GetBrowserState()->GetRequestContext() 50 requestContextGetter:GetBrowserState()->GetRequestContext()]);
51 tab:nil]);
52 51
53 action_callback_ = 52 action_callback_ =
54 base::Bind(&NativeAppNavigationControllerTest::OnUserAction, 53 base::Bind(&NativeAppNavigationControllerTest::OnUserAction,
55 base::Unretained(this)); 54 base::Unretained(this));
56 base::AddActionCallback(action_callback_); 55 base::AddActionCallback(action_callback_);
57 56
58 handler_called_counter_ = 0; 57 handler_called_counter_ = 0;
59 } 58 }
60 59
61 void TearDown() override { 60 void TearDown() override {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 2); 159 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 2);
161 [fakeManager setAppScheme:kMapsAppName]; 160 [fakeManager setAppScheme:kMapsAppName];
162 [controller_ removeAppFromNotification:notificationMaps]; 161 [controller_ removeAppFromNotification:notificationMaps];
163 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 1); 162 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 1);
164 [fakeManager setAppScheme:kYoutubeAppName]; 163 [fakeManager setAppScheme:kYoutubeAppName];
165 [controller_ removeAppFromNotification:notificationYouTube]; 164 [controller_ removeAppFromNotification:notificationYouTube];
166 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 0); 165 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 0);
167 } 166 }
168 167
169 } // namespace 168 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698