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

Issue 2847513002: Break page load metrics test dependency on IPC. (Closed)

Created:
3 years, 8 months ago by Bryan McQuade
Modified:
3 years, 7 months ago
Reviewers:
lpy, Charlie Harrison
CC:
chromium-reviews, csharrison+watch_chromium.org, jkarlin, loading-reviews+metrics_chromium.org, speed-metrics-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Break page load metrics test dependency on IPC. This change breaks direct dependencies on IPC for page load metrics tests, in order to ease the transition to mojo. Previously, unit tests exercised the IPC dispatch path. This achieved slightly increased coverage but coupled unit tests to IPC. We now dispatch simulated timing events directly to callbacks, bypassing the IPC dispatch. Additionally, we break the browsertest dependency on IPC and add a MetricsWebContentsObserver::TestingObserver, which can observe state changes at the observer level, instead of watching for IPC messages. This both simplifies the logic and more directly verifies expected behavior at the appropriate level. BUG=715744 TBR=csharrison Review-Url: https://codereview.chromium.org/2847513002 Cr-Commit-Position: refs/heads/master@{#467687} Committed: https://chromium.googlesource.com/chromium/src/+/9567f9fa3fcfcaa50fc7b6a6adf66106a2eb6be5

Patch Set 1 #

Patch Set 2 : add expectation in wait method #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -129 lines) Patch
M chrome/browser/page_load_metrics/metrics_web_contents_observer.h View 5 chunks +33 lines, -4 lines 0 comments Download
M chrome/browser/page_load_metrics/metrics_web_contents_observer.cc View 5 chunks +35 lines, -1 line 0 comments Download
M chrome/browser/page_load_metrics/metrics_web_contents_observer_unittest.cc View 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.cc View 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc View 1 17 chunks +64 lines, -117 lines 1 comment Download

Messages

Total messages: 29 (17 generated)
Bryan McQuade
PTAL, thanks!
3 years, 8 months ago (2017-04-26 20:54:16 UTC) #7
Charlie Harrison
FYI I may have some latency on this review because I'm going OOO for a ...
3 years, 8 months ago (2017-04-27 00:39:59 UTC) #10
Bryan McQuade
On 2017/04/27 at 00:39:59, csharrison wrote: > FYI I may have some latency on this ...
3 years, 8 months ago (2017-04-27 00:49:55 UTC) #11
Bryan McQuade
jkarlin, PTAL, thanks!
3 years, 8 months ago (2017-04-27 00:50:41 UTC) #13
lpy
lgtm
3 years, 7 months ago (2017-04-27 06:31:52 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2847513002/20001
3 years, 7 months ago (2017-04-27 15:28:48 UTC) #17
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started once the ...
3 years, 7 months ago (2017-04-27 15:28:49 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2847513002/20001
3 years, 7 months ago (2017-04-27 15:30:36 UTC) #22
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/9567f9fa3fcfcaa50fc7b6a6adf66106a2eb6be5
3 years, 7 months ago (2017-04-27 15:36:05 UTC) #25
zmin
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/2847803002/ by zmin@chromium.org. ...
3 years, 7 months ago (2017-04-27 15:43:20 UTC) #26
Bryan McQuade
On 2017/04/27 at 15:43:20, zmin wrote: > A revert of this CL (patchset #2 id:20001) ...
3 years, 7 months ago (2017-04-27 15:53:40 UTC) #27
Charlie Harrison
3 years, 7 months ago (2017-05-01 16:23:34 UTC) #29
Message was sent while issue was closed.
belated lgtm/2

https://codereview.chromium.org/2847513002/diff/20001/chrome/browser/page_loa...
File chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc (right):

https://codereview.chromium.org/2847513002/diff/20001/chrome/browser/page_loa...
chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc:21: #include
"chrome/common/page_load_metrics/page_load_metrics_messages.h"
still needed?

Powered by Google App Engine
This is Rietveld 408576698