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

Side by Side Diff: chrome/browser/supervised_user/child_accounts/family_info_fetcher_unittest.cc

Issue 1245103005: Componentize more signin code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/thread_task_runner_handle.h" 11 #include "base/thread_task_runner_handle.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h"
14 #include "chrome/browser/supervised_user/child_accounts/family_info_fetcher.h" 13 #include "chrome/browser/supervised_user/child_accounts/family_info_fetcher.h"
14 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h"
15 #include "net/url_request/test_url_fetcher_factory.h" 15 #include "net/url_request/test_url_fetcher_factory.h"
16 #include "net/url_request/url_request_test_util.h" 16 #include "net/url_request/url_request_test_util.h"
17 #include "testing/gmock/include/gmock/gmock.h" 17 #include "testing/gmock/include/gmock/gmock.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 const char kAccountId[] = "user@gmail.com"; 20 const char kAccountId[] = "user@gmail.com";
21 const char kDifferentAccountId[] = "some_other_user@gmail.com"; 21 const char kDifferentAccountId[] = "some_other_user@gmail.com";
22 const int kFamilyInfoFetcherURLFetcherID = 0; 22 const int kFamilyInfoFetcherURLFetcherID = 0;
23 23
24 bool operator==(const FamilyInfoFetcher::FamilyProfile& family1, 24 bool operator==(const FamilyInfoFetcher::FamilyProfile& family1,
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 IssueRefreshToken(); 312 IssueRefreshToken();
313 313
314 fetcher_.StartGetFamilyProfile(); 314 fetcher_.StartGetFamilyProfile();
315 315
316 IssueAccessToken(); 316 IssueAccessToken();
317 317
318 // Failed API call should result in a network error. 318 // Failed API call should result in a network error.
319 EXPECT_CALL(*this, OnFailure(FamilyInfoFetcher::NETWORK_ERROR)); 319 EXPECT_CALL(*this, OnFailure(FamilyInfoFetcher::NETWORK_ERROR));
320 SendFailedResponse(); 320 SendFailedResponse();
321 } 321 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698