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

Side by Side Diff: ios/chrome/browser/signin/gaia_auth_fetcher_ios_unittest.mm

Issue 2555063002: Fix missing namespace for scoped_nsobject. (Closed)
Patch Set: Created 4 years 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 | « no previous file | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/signin/gaia_auth_fetcher_ios.h" 5 #include "ios/chrome/browser/signin/gaia_auth_fetcher_ios.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #import "base/mac/scoped_nsobject.h" 9 #import "base/mac/scoped_nsobject.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 18 matching lines...) Expand all
29 : GaiaAuthFetcherIOSBridge(fetcher, browser_state), mock_web_view_(nil) {} 29 : GaiaAuthFetcherIOSBridge(fetcher, browser_state), mock_web_view_(nil) {}
30 30
31 private: 31 private:
32 WKWebView* BuildWKWebView() override { 32 WKWebView* BuildWKWebView() override {
33 if (!mock_web_view_) { 33 if (!mock_web_view_) {
34 mock_web_view_.reset( 34 mock_web_view_.reset(
35 [[OCMockObject niceMockForClass:[WKWebView class]] retain]); 35 [[OCMockObject niceMockForClass:[WKWebView class]] retain]);
36 } 36 }
37 return mock_web_view_; 37 return mock_web_view_;
38 } 38 }
39 scoped_nsobject<id> mock_web_view_; 39 base::scoped_nsobject<id> mock_web_view_;
40 }; 40 };
41 41
42 class MockGaiaConsumer : public GaiaAuthConsumer { 42 class MockGaiaConsumer : public GaiaAuthConsumer {
43 public: 43 public:
44 MockGaiaConsumer() {} 44 MockGaiaConsumer() {}
45 ~MockGaiaConsumer() {} 45 ~MockGaiaConsumer() {}
46 46
47 MOCK_METHOD1(OnMergeSessionSuccess, void(const std::string& data)); 47 MOCK_METHOD1(OnMergeSessionSuccess, void(const std::string& data));
48 MOCK_METHOD1(OnClientLoginFailure, void(const GoogleServiceAuthError& error)); 48 MOCK_METHOD1(OnClientLoginFailure, void(const GoogleServiceAuthError& error));
49 MOCK_METHOD1(OnLogOutFailure, void(const GoogleServiceAuthError& error)); 49 MOCK_METHOD1(OnLogOutFailure, void(const GoogleServiceAuthError& error));
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 [[GetMockWKWebView() expect] setNavigationDelegate:[OCMArg isNotNil]]; 184 [[GetMockWKWebView() expect] setNavigationDelegate:[OCMArg isNotNil]];
185 [static_cast<WKWebView*>([[GetMockWKWebView() expect] andDo:^(NSInvocation*) { 185 [static_cast<WKWebView*>([[GetMockWKWebView() expect] andDo:^(NSInvocation*) {
186 GetBridge()->URLFetchSuccess("data"); 186 GetBridge()->URLFetchSuccess("data");
187 }]) loadRequest:[OCMArg any]]; 187 }]) loadRequest:[OCMArg any]];
188 188
189 gaia_auth_fetcher_->StartMergeSession("uber_token", ""); 189 gaia_auth_fetcher_->StartMergeSession("uber_token", "");
190 web::BrowserState::GetActiveStateManager(&browser_state_)->SetActive(false); 190 web::BrowserState::GetActiveStateManager(&browser_state_)->SetActive(false);
191 web::BrowserState::GetActiveStateManager(&browser_state_)->SetActive(true); 191 web::BrowserState::GetActiveStateManager(&browser_state_)->SetActive(true);
192 EXPECT_OCMOCK_VERIFY(GetMockWKWebView()); 192 EXPECT_OCMOCK_VERIFY(GetMockWKWebView());
193 } 193 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698