Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Side by Side Diff: chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.h

Issue 2893633003: [PageLoadMetrics] Don't record an ads histogram if the page hasn't committed (Closed)
Patch Set: Address comments from PS2 Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_PAGE_LOAD_METRICS_OBSERVER_TE ST_HARNESS_H_ 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_PAGE_LOAD_METRICS_OBSERVER_TE ST_HARNESS_H_
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_PAGE_LOAD_METRICS_OBSERVER_TE ST_HARNESS_H_ 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_PAGE_LOAD_METRICS_OBSERVER_TE ST_HARNESS_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/test/histogram_tester.h" 9 #include "base/test/histogram_tester.h"
10 #include "chrome/browser/page_load_metrics/metrics_web_contents_observer.h" 10 #include "chrome/browser/page_load_metrics/metrics_web_contents_observer.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void SimulateInputEvent(const blink::WebInputEvent& event); 66 void SimulateInputEvent(const blink::WebInputEvent& event);
67 67
68 // Simulates the app being backgrounded. 68 // Simulates the app being backgrounded.
69 void SimulateAppEnterBackground(); 69 void SimulateAppEnterBackground();
70 70
71 // Simulate playing a media element. 71 // Simulate playing a media element.
72 void SimulateMediaPlayed(); 72 void SimulateMediaPlayed();
73 73
74 const base::HistogramTester& histogram_tester() const; 74 const base::HistogramTester& histogram_tester() const;
75 75
76 MetricsWebContentsObserver* observer() const;
77
76 // Gets the PageLoadExtraInfo for the committed_load_ in observer_. 78 // Gets the PageLoadExtraInfo for the committed_load_ in observer_.
77 const PageLoadExtraInfo GetPageLoadExtraInfoForCommittedLoad(); 79 const PageLoadExtraInfo GetPageLoadExtraInfoForCommittedLoad();
78 80
79 private: 81 private:
80 base::HistogramTester histogram_tester_; 82 base::HistogramTester histogram_tester_;
81 MetricsWebContentsObserver* observer_; 83 MetricsWebContentsObserver* observer_;
82 84
83 DISALLOW_COPY_AND_ASSIGN(PageLoadMetricsObserverTestHarness); 85 DISALLOW_COPY_AND_ASSIGN(PageLoadMetricsObserverTestHarness);
84 }; 86 };
85 87
86 } // namespace page_load_metrics 88 } // namespace page_load_metrics
87 89
88 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_PAGE_LOAD_METRICS_OBSERVER _TEST_HARNESS_H_ 90 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_PAGE_LOAD_METRICS_OBSERVER _TEST_HARNESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698