OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/experimental/safe_search_url_reporter.h
" | 5 #include "chrome/browser/supervised_user/experimental/safe_search_url_reporter.h
" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" | 12 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" |
13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
14 #include "net/url_request/test_url_fetcher_factory.h" | 14 #include "net/url_request/test_url_fetcher_factory.h" |
15 #include "net/url_request/url_request_test_util.h" | 15 #include "net/url_request/url_request_test_util.h" |
16 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 TEST_F(SafeSearchURLReporterTest, NetworkError) { | 106 TEST_F(SafeSearchURLReporterTest, NetworkError) { |
107 CreateRequest(0, GURL("http://google.com")); | 107 CreateRequest(0, GURL("http://google.com")); |
108 | 108 |
109 EXPECT_EQ(1U, token_service_.GetPendingRequests().size()); | 109 EXPECT_EQ(1U, token_service_.GetPendingRequests().size()); |
110 | 110 |
111 IssueAccessTokens(); | 111 IssueAccessTokens(); |
112 | 112 |
113 EXPECT_CALL(*this, OnRequestCreated(false)); | 113 EXPECT_CALL(*this, OnRequestCreated(false)); |
114 SendFailedResponse(0); | 114 SendFailedResponse(0); |
115 } | 115 } |
OLD | NEW |