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 "chrome/browser/page_load_metrics/observers/page_load_metrics_observer_ test_harness.h" | 5 #include "chrome/browser/page_load_metrics/observers/page_load_metrics_observer_ test_harness.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" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 void PageLoadMetricsObserverTestHarness::SimulateStartedResource( | 150 void PageLoadMetricsObserverTestHarness::SimulateStartedResource( |
151 const ExtraRequestStartInfo& info) { | 151 const ExtraRequestStartInfo& info) { |
152 observer_->OnRequestStarted(content::GlobalRequestID(), info.resource_type, | 152 observer_->OnRequestStarted(content::GlobalRequestID(), info.resource_type, |
153 base::TimeTicks::Now()); | 153 base::TimeTicks::Now()); |
154 } | 154 } |
155 | 155 |
156 void PageLoadMetricsObserverTestHarness::SimulateLoadedResource( | 156 void PageLoadMetricsObserverTestHarness::SimulateLoadedResource( |
157 const ExtraRequestCompleteInfo& info) { | 157 const ExtraRequestCompleteInfo& info) { |
158 observer_->OnRequestComplete( | 158 observer_->OnRequestComplete( |
159 info.url, info.frame_tree_node_id, content::GlobalRequestID(), | 159 info.url, info.frame_tree_node_id, content::GlobalRequestID(), |
160 content::RESOURCE_TYPE_SCRIPT, info.was_cached, | 160 info.resource_type, info.was_cached, |
Pete Williamson
2017/05/10 23:43:36
It looks like this change breaks a lot of tests wh
| |
161 info.data_reduction_proxy_data | 161 info.data_reduction_proxy_data |
162 ? info.data_reduction_proxy_data->DeepCopy() | 162 ? info.data_reduction_proxy_data->DeepCopy() |
163 : nullptr, | 163 : nullptr, |
164 info.raw_body_bytes, info.original_network_content_length, | 164 info.raw_body_bytes, info.original_network_content_length, |
165 base::TimeTicks::Now()); | 165 base::TimeTicks::Now()); |
166 } | 166 } |
167 | 167 |
168 void PageLoadMetricsObserverTestHarness::SimulateInputEvent( | 168 void PageLoadMetricsObserverTestHarness::SimulateInputEvent( |
169 const blink::WebInputEvent& event) { | 169 const blink::WebInputEvent& event) { |
170 observer_->OnInputEvent(event); | 170 observer_->OnInputEvent(event); |
(...skipping 22 matching lines...) Expand all Loading... | |
193 } | 193 } |
194 | 194 |
195 void PageLoadMetricsObserverTestHarness::NavigateWithPageTransitionAndCommit( | 195 void PageLoadMetricsObserverTestHarness::NavigateWithPageTransitionAndCommit( |
196 const GURL& url, | 196 const GURL& url, |
197 ui::PageTransition transition) { | 197 ui::PageTransition transition) { |
198 controller().LoadURL(url, content::Referrer(), transition, std::string()); | 198 controller().LoadURL(url, content::Referrer(), transition, std::string()); |
199 content::WebContentsTester::For(web_contents())->CommitPendingNavigation(); | 199 content::WebContentsTester::For(web_contents())->CommitPendingNavigation(); |
200 } | 200 } |
201 | 201 |
202 } // namespace page_load_metrics | 202 } // namespace page_load_metrics |
OLD | NEW |