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/page_load_metrics/observers/data_reduction_proxy_metric
s_observer.h" | 5 #include "chrome/browser/page_load_metrics/observers/data_reduction_proxy_metric
s_observer.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/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/metrics/field_trial.h" | 12 #include "base/metrics/field_trial.h" |
13 #include "base/optional.h" | 13 #include "base/optional.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "chrome/browser/page_load_metrics/observers/page_load_metrics_observer_
test_harness.h" | 15 #include "chrome/browser/page_load_metrics/observers/page_load_metrics_observer_
test_harness.h" |
16 #include "chrome/browser/renderer_host/chrome_navigation_data.h" | 16 #include "chrome/browser/renderer_host/chrome_navigation_data.h" |
| 17 #include "chrome/common/page_load_metrics/page_load_timing.h" |
17 #include "chrome/test/base/testing_browser_process.h" | 18 #include "chrome/test/base/testing_browser_process.h" |
18 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data
.h" | 19 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data
.h" |
19 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_ping
back_client.h" | 20 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_ping
back_client.h" |
20 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_page_
load_timing.h" | 21 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_page_
load_timing.h" |
21 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" | 22 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" |
22 #include "components/page_load_metrics/common/page_load_timing.h" | |
23 | 23 |
24 namespace data_reduction_proxy { | 24 namespace data_reduction_proxy { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 const char kDefaultTestUrl[] = "https://google.com"; | 28 const char kDefaultTestUrl[] = "https://google.com"; |
29 const char kDefaultTestUrl2[] = "https://example.com"; | 29 const char kDefaultTestUrl2[] = "https://example.com"; |
30 | 30 |
31 data_reduction_proxy::DataReductionProxyData* DataForNavigationHandle( | 31 data_reduction_proxy::DataReductionProxyData* DataForNavigationHandle( |
32 content::WebContents* web_contents, | 32 content::WebContents* web_contents, |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 ResetTest(); | 304 ResetTest(); |
305 // Verify that when the holdback experiment is enabled, no pingback is sent. | 305 // Verify that when the holdback experiment is enabled, no pingback is sent. |
306 base::FieldTrialList field_trial_list(nullptr); | 306 base::FieldTrialList field_trial_list(nullptr); |
307 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial( | 307 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial( |
308 "DataCompressionProxyHoldback", "Enabled")); | 308 "DataCompressionProxyHoldback", "Enabled")); |
309 RunTest(true, false); | 309 RunTest(true, false); |
310 EXPECT_FALSE(pingback_client_->send_pingback_called()); | 310 EXPECT_FALSE(pingback_client_->send_pingback_called()); |
311 } | 311 } |
312 | 312 |
313 } // namespace data_reduction_proxy | 313 } // namespace data_reduction_proxy |
OLD | NEW |