| OLD | NEW |
| 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 "chrome/browser/supervised_user/child_accounts/family_info_fetcher.h" | 5 #include "chrome/browser/supervised_user/child_accounts/family_info_fetcher.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/json/json_writer.h" | 13 #include "base/json/json_writer.h" |
| 14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
| 15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" | 17 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" |
| 18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
| 19 #include "net/url_request/test_url_fetcher_factory.h" | 19 #include "net/url_request/test_url_fetcher_factory.h" |
| 20 #include "net/url_request/url_request_test_util.h" | 20 #include "net/url_request/url_request_test_util.h" |
| 21 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
| 22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
| 23 | 23 |
| 24 const char kAccountId[] = "user@gmail.com"; | 24 const char kAccountId[] = "user@gmail.com"; |
| 25 const char kDifferentAccountId[] = "some_other_user@gmail.com"; | 25 const char kDifferentAccountId[] = "some_other_user@gmail.com"; |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |