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

Issue 2079623002: Create only one ContextFactory in content unit tests (Closed)

Created:
4 years, 6 months ago by enne (OOO)
Modified:
4 years, 6 months ago
Reviewers:
no sievers, piman
CC:
chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin-cc_chromium.org, jam, jbauman+watch_chromium.org, kalyank, nasko+codewatch_chromium.org, nona+watch_chromium.org, piman+watch_chromium.org, shuchen+watch_chromium.org, sievers+watch_chromium.org, James Su, yusukes+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Create only one ContextFactory in content unit tests ImageTransportFactory::InitializeForUnitTests gets called in the setup of many tests. However, ui::InitializeContextFactoryForTests via RenderViewHostTestHarness::SetUp was also being called indirectly in many unit tests as well. This would result in two context factories, one set on ui::aura::Env and the other being the ImageTransportFactory instance. Fix this problem by consolidating these two in content unittests. This fix is in the service of fixing racy RenderWidgetHostViewChildFrame tests that were using fake surface namespace ids that were never registered. That bug is fixed by registering that id with the (single) global SurfaceManager on the context factory. BUG=616976 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/d31c7828f22b988a63718fd9dd8735c7220aba57 Cr-Commit-Position: refs/heads/master@{#400814}

Patch Set 1 #

Patch Set 2 : Fix mac unit tests #

Patch Set 3 : Fix android too #

Patch Set 4 : Add CONTENT_EXPORT #

Total comments: 2

Patch Set 5 : Add dcheck #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -37 lines) Patch
M content/browser/compositor/surface_utils.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/navigator_impl_unittest.cc View 1 chunk +0 lines, -8 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager_unittest.cc View 2 chunks +0 lines, -10 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 2 chunks +0 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_unittest.mm View 1 2 chunks +0 lines, -5 lines 0 comments Download
M content/public/test/test_renderer_host.cc View 2 3 3 chunks +12 lines, -3 lines 0 comments Download
M content/test/test_render_view_host.h View 2 chunks +2 lines, -1 line 0 comments Download
M content/test/test_render_view_host.cc View 1 2 3 4 4 chunks +17 lines, -6 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
enne (OOO)
ImageTransportFactory vs ContextFactory strikes again T_T
4 years, 6 months ago (2016-06-16 23:12:10 UTC) #3
enne (OOO)
+piman as alternate content reviewer
4 years, 6 months ago (2016-06-20 20:14:26 UTC) #5
piman
https://codereview.chromium.org/2079623002/diff/60001/content/test/test_render_view_host.cc File content/test/test_render_view_host.cc (right): https://codereview.chromium.org/2079623002/diff/60001/content/test/test_render_view_host.cc#newcode216 content/test/test_render_view_host.cc:216: // ImageTransportFactory. nit: add DCHECK(surface_id_allocator_);
4 years, 6 months ago (2016-06-20 20:40:28 UTC) #6
piman
lgtm
4 years, 6 months ago (2016-06-20 20:40:35 UTC) #7
enne (OOO)
https://codereview.chromium.org/2079623002/diff/60001/content/test/test_render_view_host.cc File content/test/test_render_view_host.cc (right): https://codereview.chromium.org/2079623002/diff/60001/content/test/test_render_view_host.cc#newcode216 content/test/test_render_view_host.cc:216: // ImageTransportFactory. On 2016/06/20 at 20:40:27, piman wrote: > ...
4 years, 6 months ago (2016-06-20 20:58:41 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2079623002/80001
4 years, 6 months ago (2016-06-20 20:59:49 UTC) #11
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 6 months ago (2016-06-20 22:38:31 UTC) #12
commit-bot: I haz the power
4 years, 6 months ago (2016-06-20 22:41:36 UTC) #14
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/d31c7828f22b988a63718fd9dd8735c7220aba57
Cr-Commit-Position: refs/heads/master@{#400814}

Powered by Google App Engine
This is Rietveld 408576698