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

Issue 1940363002: Add two tests to ensure WebContents does not leak on prerender swap in (Closed)

Created:
4 years, 7 months ago by pasko
Modified:
4 years, 7 months ago
Reviewers:
mmenke
CC:
chromium-reviews, tburkard+watch_chromium.org, gavinp+prer_chromium.org, cbentzel+watch_chromium.org, davidben+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add two tests to ensure WebContents does not leak on prerender swap in The test with beforeunload handler is as planned: the event should be dispatched and the webcontents should be deleted. The test relies on the possibility to send out an async XHR, even though the results of it are never seen in the renderer. I noticed that in PrerenderManager::SwapInternal() with any of {unload,beforeunload} handler is set, the old_web_contents->NeedToFireBeforeUnload() returns true. The second test is to check the path when false is returned. BUG=600693 Committed: https://crrev.com/f4f74cd515b1f1fd16e9604d9a5cc9c4af1cf28d Cr-Commit-Position: refs/heads/master@{#392313}

Patch Set 1 #

Total comments: 4

Patch Set 2 : rebase #

Patch Set 3 : nits in comments addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -1 line) Patch
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 2 chunks +32 lines, -1 line 0 comments Download
A chrome/test/data/prerender/prerender_loader_with_beforeunload.html View 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (6 generated)
pasko
mmenke: PTaL
4 years, 7 months ago (2016-05-03 17:13:52 UTC) #3
mmenke
LGTM, thanks for adding these tests! https://codereview.chromium.org/1940363002/diff/1/chrome/browser/prerender/prerender_browsertest.cc File chrome/browser/prerender/prerender_browsertest.cc (right): https://codereview.chromium.org/1940363002/diff/1/chrome/browser/prerender/prerender_browsertest.cc#newcode3099 chrome/browser/prerender/prerender_browsertest.cc:3099: // WebContents would ...
4 years, 7 months ago (2016-05-04 17:54:32 UTC) #4
pasko
thank you for review, landing.. apologies for slow response, that's due to a 4 day ...
4 years, 7 months ago (2016-05-09 13:35:00 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1940363002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1940363002/40001
4 years, 7 months ago (2016-05-09 13:35:31 UTC) #8
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 7 months ago (2016-05-09 14:42:48 UTC) #10
commit-bot: I haz the power
4 years, 7 months ago (2016-05-09 14:44:09 UTC) #12
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f4f74cd515b1f1fd16e9604d9a5cc9c4af1cf28d
Cr-Commit-Position: refs/heads/master@{#392313}

Powered by Google App Engine
This is Rietveld 408576698