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

Issue 1415123002: Avoid image resource leaks in frame-related unit tests. (Closed)

Created:
5 years, 2 months ago by sof
Modified:
5 years, 2 months ago
Reviewers:
haraken, Nico, dcheng
CC:
blink-reviews, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid image resource leaks in frame-related unit tests. When ImageLoader issues a (successful) load, it will keep its associated element alive until the load has finished, so as to guarantee that the load will complete without DOM mutations destructing the element. This keep-alive reference is at odds with tidy shutdowns from unit tests that issue image resource loads in particular, as they will not have completed upon shutdown if the load hasn't otherwise been triggered. By default they won't be, eaving the associated element and its ImageLoader referred-to resources as reportedly leaking. To avoid such leaks, insist that image resources are eagerly loaded from the network by WebViewHelpers, if needs be. Which means that all such external resources are mocked & accounted for. R=haraken, thakis BUG=526423 Committed: https://crrev.com/fc199ea30c9558abb49215948fd6aa3936764c7c Cr-Commit-Position: refs/heads/master@{#355318}

Patch Set 1 #

Patch Set 2 : remove redundant #include #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -6 lines) Patch
M third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/TouchActionTest.cpp View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebPageSerializerTest.cpp View 5 chunks +26 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (4 generated)
sof
please take a look. This takes care of the remaining LeakSanitizer-reported leaks. The downside being ...
5 years, 2 months ago (2015-10-21 09:25:51 UTC) #2
haraken
LGTM
5 years, 2 months ago (2015-10-21 13:49:20 UTC) #3
Nico
lgtm, thanks!
5 years, 2 months ago (2015-10-21 16:28:00 UTC) #5
dcheng
lgtm Devs will see errors at unit test run time if they forget to mock ...
5 years, 2 months ago (2015-10-21 16:39:18 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1415123002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1415123002/20001
5 years, 2 months ago (2015-10-21 16:39:46 UTC) #9
sof
On 2015/10/21 16:39:18, dcheng wrote: > lgtm > > Devs will see errors at unit ...
5 years, 2 months ago (2015-10-21 17:12:44 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 2 months ago (2015-10-21 17:16:51 UTC) #11
commit-bot: I haz the power
5 years, 2 months ago (2015-10-21 17:17:49 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/fc199ea30c9558abb49215948fd6aa3936764c7c
Cr-Commit-Position: refs/heads/master@{#355318}

Powered by Google App Engine
This is Rietveld 408576698