Log TabMetric UKM when background tab loads
We normally log a TabMetric UKM when an existing tab is backgrounded. If a new tab is opened in the background, we should log that as well so we have an entry to correlate it with when it is later closed or foregrounded. Similarly, if a tab navigates to a new URL while in the background (e.g. via JavaScript), we should log a new TabMetric to capture that URL. To support testing this, add a version of WebContentsTester::Create that takes a CreateParams so we can specify whether a WebContents (tab) starts hidden. This enables other tests to also override CreateParams fields when necessary. Bug: 784639 Change-Id: I189af4535a238767bb257f39ee97301bac2a4171 Reviewed-on: https://chromium-review.googlesource.com/797930 Commit-Queue: Michael Giuffrida <michaelpg@chromium.org> Reviewed-by:Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#520716}
Showing
Please register or sign in to comment