Commit 19f3776d authored by Francois Doray's avatar Francois Doray Committed by Commit Bot

Fix WebContents leak in MetricsWebContentsObserverTest.

Leaked WebContents prevent the destruction of aura::Env with
the upcoming aura::WindowOcclusionTracker.

Bug: 
Change-Id: I259095931f72dcb82b567c38d3620c7ee981a0c8
Reviewed-on: https://chromium-review.googlesource.com/673547
Commit-Queue: Francois Doray <fdoray@chromium.org>
Reviewed-by: default avatarBryan McQuade <bmcquade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502949}
parent 0b1c7760
......@@ -1012,9 +1012,9 @@ TEST_F(MetricsWebContentsObserverTest,
// committed RFH are ignored. There isn't a way to hold on to an old RFH (it
// gets cleaned up soon after being navigated away from) so instead we use an
// RFH from another WebContents, as a way to simulate the desired behavior.
content::WebContents* other_web_contents =
std::unique_ptr<content::WebContents> other_web_contents(
content::WebContentsTester::CreateTestWebContents(browser_context(),
nullptr);
nullptr));
observer()->OnRequestComplete(
GURL("http://www.other.com/"), net::HostPortPair(),
other_web_contents->GetMainFrame()->GetFrameTreeNodeId(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment