OLD | NEW |
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 "components/data_use_measurement/content/data_use_measurement.h" | 5 #include "components/data_use_measurement/content/data_use_measurement.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/message_loop/message_loop.h" |
11 #include "base/test/histogram_tester.h" | 12 #include "base/test/histogram_tester.h" |
12 #include "build/build_config.h" | 13 #include "build/build_config.h" |
13 #include "content/public/browser/resource_request_info.h" | 14 #include "content/public/browser/resource_request_info.h" |
14 #include "net/base/network_change_notifier.h" | 15 #include "net/base/network_change_notifier.h" |
15 #include "net/base/request_priority.h" | 16 #include "net/base/request_priority.h" |
16 #include "net/socket/socket_test_util.h" | 17 #include "net/socket/socket_test_util.h" |
17 #include "net/url_request/url_request.h" | 18 #include "net/url_request/url_request.h" |
18 #include "net/url_request/url_request_test_util.h" | 19 #include "net/url_request/url_request_test_util.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "url/gurl.h" | 21 #include "url/gurl.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 } | 158 } |
158 #endif | 159 #endif |
159 | 160 |
160 TEST_F(DataUseMeasurementTest, DataUseForwarderIsCalled) { | 161 TEST_F(DataUseMeasurementTest, DataUseForwarderIsCalled) { |
161 EXPECT_FALSE(IsDataUseForwarderCalled()); | 162 EXPECT_FALSE(IsDataUseForwarderCalled()); |
162 SendRequest(true); | 163 SendRequest(true); |
163 EXPECT_TRUE(IsDataUseForwarderCalled()); | 164 EXPECT_TRUE(IsDataUseForwarderCalled()); |
164 } | 165 } |
165 | 166 |
166 } // namespace data_use_measurement | 167 } // namespace data_use_measurement |
OLD | NEW |