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 "base/macros.h" |
5 #include "chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_
observer.h" | 6 #include "chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_
observer.h" |
6 #include "chrome/browser/page_load_metrics/observers/page_load_metrics_observer_
test_harness.h" | 7 #include "chrome/browser/page_load_metrics/observers/page_load_metrics_observer_
test_harness.h" |
7 | 8 |
8 namespace { | 9 namespace { |
9 | 10 |
10 const char kHistogramNameFromGWSFirstTextPaint[] = | 11 const char kHistogramNameFromGWSFirstTextPaint[] = |
11 "PageLoad.Clients.FromGWS.Timing2.NavigationToFirstTextPaint"; | 12 "PageLoad.Clients.FromGWS.Timing2.NavigationToFirstTextPaint"; |
12 | 13 |
13 } // namespace | 14 } // namespace |
14 | 15 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 set_referrer(content::Referrer(GURL("https://www.anothersite.com"), | 176 set_referrer(content::Referrer(GURL("https://www.anothersite.com"), |
176 blink::WebReferrerPolicyDefault)); | 177 blink::WebReferrerPolicyDefault)); |
177 NavigateAndCommit(GURL("https://www.example.com")); | 178 NavigateAndCommit(GURL("https://www.example.com")); |
178 | 179 |
179 SimulateTimingUpdate(timing); | 180 SimulateTimingUpdate(timing); |
180 | 181 |
181 // Navigate again to force logging. | 182 // Navigate again to force logging. |
182 NavigateAndCommit(GURL("https://www.google.com")); | 183 NavigateAndCommit(GURL("https://www.google.com")); |
183 histogram_tester().ExpectTotalCount(kHistogramNameFromGWSFirstTextPaint, 0); | 184 histogram_tester().ExpectTotalCount(kHistogramNameFromGWSFirstTextPaint, 0); |
184 } | 185 } |
OLD | NEW |