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

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

Issue 2731553005: Introduced StoreKitTabHelper class (Closed)
Patch Set: fixed variable naming 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 27 matching lines...) Expand all
38 } 38 }
39 39
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(
49 initWithWebState:web_state() 49 [[NativeAppNavigationController alloc] initWithWebState:web_state()]);
50 requestContextGetter:GetBrowserState()->GetRequestContext()
51 tab:nil]);
52 50
53 action_callback_ = 51 action_callback_ =
54 base::Bind(&NativeAppNavigationControllerTest::OnUserAction, 52 base::Bind(&NativeAppNavigationControllerTest::OnUserAction,
55 base::Unretained(this)); 53 base::Unretained(this));
56 base::AddActionCallback(action_callback_); 54 base::AddActionCallback(action_callback_);
57 55
58 handler_called_counter_ = 0; 56 handler_called_counter_ = 0;
59 } 57 }
60 58
61 void TearDown() override { 59 void TearDown() override {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 2); 158 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 2);
161 [fakeManager setAppScheme:kMapsAppName]; 159 [fakeManager setAppScheme:kMapsAppName];
162 [controller_ removeAppFromNotification:notificationMaps]; 160 [controller_ removeAppFromNotification:notificationMaps];
163 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 1); 161 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 1);
164 [fakeManager setAppScheme:kYoutubeAppName]; 162 [fakeManager setAppScheme:kYoutubeAppName];
165 [controller_ removeAppFromNotification:notificationYouTube]; 163 [controller_ removeAppFromNotification:notificationYouTube];
166 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 0); 164 DCHECK([[controller_ appsPossiblyBeingInstalled] count] == 0);
167 } 165 }
168 166
169 } // namespace 167 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698