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

Issue 45963003: Move test-only ContextFactory implementations out of production targets (Closed)

Created:
7 years, 1 month ago by jamesr
Modified:
7 years, 1 month ago
Reviewers:
danakj, sky, piman
CC:
chromium-reviews, extensions-reviews_chromium.org, sadrul, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, Ian Vollick, ben+aura_chromium.org, jam, penghuang+watch_chromium.org, piman+watch_chromium.org, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, kalyank, danakj+watch_chromium.org, James Su, cc-bugs_chromium.org, ben+ash_chromium.org, miu+watch_chromium.org
Visibility:
Public.

Description

Move test-only ContextFactory implementations out of production targets This moves (Test|Default)ContextFactory and associated setup out of the production compositor target into the test-only compositor_test_support library. This removes the need for us to link in fake/mock classes into the prod build and cleans up several pieces of confusing static state. Code that wants to use one of the test ContextFactory implementations now has to call either ui::InitializeContextFactoryForTests() or, if it's depending on content and using aura, content::ImageTransportFactory::InitializeForUnitTests() and pass in a ContextFactory implementation. Content-based tests get the latter for free through content::BrowserTestBase. R=piman,sky Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=231867

Patch Set 1 #

Patch Set 2 : fix chromeos=1 #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : rebased, address piman's feedback #

Patch Set 5 : Fix link on non-aura #

Patch Set 6 : ash_unittests #

Patch Set 7 : initialization fixes #

Patch Set 8 : fix interactive_ui_tests on linux_aura and linking on win component #

Patch Set 9 : fix moar windows #

Patch Set 10 : fix moar windows #

Total comments: 2

Patch Set 11 : revert bad ui/base changes #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+424 lines, -342 lines) Patch
M ash/test/ash_test_helper.cc View 1 2 3 4 5 3 chunks +5 lines, -0 lines 0 comments Download
M ash/test/test_shell_delegate.cc View 1 2 3 4 5 2 chunks +0 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/tab_capture/tab_capture_performancetest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/notifications/desktop_notifications_unittest.cc View 1 2 3 4 5 6 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/test/base/view_event_test_base.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -8 lines 0 comments Download
M content/browser/aura/image_transport_factory.h View 2 chunks +5 lines, -3 lines 0 comments Download
M content/browser/aura/image_transport_factory.cc View 2 chunks +12 lines, -35 lines 0 comments Download
M content/browser/aura/no_transport_image_transport_factory.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/aura/no_transport_image_transport_factory.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/aura/software_output_device_ozone_unittest.cc View 3 chunks +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M content/content_tests.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M content/public/test/browser_test_base.cc View 1 2 3 4 2 chunks +19 lines, -2 lines 0 comments Download
M ui/aura/aura.gyp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/bench/bench_main.cc View 2 chunks +2 lines, -1 line 0 comments Download
M ui/aura/demo/demo_main.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ui/aura/test/aura_test_helper.cc View 3 chunks +4 lines, -1 line 0 comments Download
M ui/compositor/compositor.h View 1 2 3 3 chunks +0 lines, -71 lines 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 5 5 chunks +0 lines, -193 lines 0 comments Download
M ui/compositor/compositor.gyp View 2 chunks +9 lines, -1 line 0 comments Download
M ui/compositor/layer_unittest.cc View 1 2 3 5 chunks +5 lines, -2 lines 0 comments Download
M ui/compositor/reflector.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -3 lines 1 comment Download
A ui/compositor/test/context_factories_for_test.h View 1 chunk +16 lines, -0 lines 0 comments Download
A ui/compositor/test/context_factories_for_test.cc View 1 2 3 4 5 1 chunk +58 lines, -0 lines 0 comments Download
A ui/compositor/test/default_context_factory.h View 1 2 3 4 5 6 7 1 chunk +53 lines, -0 lines 0 comments Download
A ui/compositor/test/default_context_factory.cc View 1 chunk +100 lines, -0 lines 0 comments Download
A ui/compositor/test/test_context_factory.h View 1 chunk +45 lines, -0 lines 0 comments Download
A ui/compositor/test/test_context_factory.cc View 1 chunk +65 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
jamesr
7 years, 1 month ago (2013-10-25 23:15:28 UTC) #1
piman
LGTM, thanks! https://codereview.chromium.org/45963003/diff/80001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (right): https://codereview.chromium.org/45963003/diff/80001/ui/compositor/compositor.cc#newcode351 ui/compositor/compositor.cc:351: if (g_context_factory) nit: no need for the ...
7 years, 1 month ago (2013-10-26 00:38:35 UTC) #2
sky
LGTM
7 years, 1 month ago (2013-10-28 15:15:41 UTC) #3
jamesr
The trybots have revealed a number of issues with tests. I think I've addressed them, ...
7 years, 1 month ago (2013-10-29 23:59:46 UTC) #4
sky
SLGTM
7 years, 1 month ago (2013-10-30 00:06:55 UTC) #5
jamesr
https://codereview.chromium.org/45963003/diff/500001/ui/base/ime/input_method_linux_x11.h File ui/base/ime/input_method_linux_x11.h (left): https://codereview.chromium.org/45963003/diff/500001/ui/base/ime/input_method_linux_x11.h#oldcode51 ui/base/ime/input_method_linux_x11.h:51: TextInputClient* focused) OVERRIDE; whoops, not intentional. i'll remove before ...
7 years, 1 month ago (2013-10-30 00:30:39 UTC) #6
piman
LGTM except for one thing (that looks unrelated to this patch). https://codereview.chromium.org/45963003/diff/560001/ui/compositor/reflector.h File ui/compositor/reflector.h (left): ...
7 years, 1 month ago (2013-10-30 04:47:10 UTC) #7
jamesr
This is actually required. Subclasses are exported, but the base class had no symbols to ...
7 years, 1 month ago (2013-10-30 05:52:19 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/45963003/560001
7 years, 1 month ago (2013-10-30 05:54:07 UTC) #9
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=215555
7 years, 1 month ago (2013-10-30 08:59:33 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/45963003/560001
7 years, 1 month ago (2013-10-30 16:08:12 UTC) #11
commit-bot: I haz the power
7 years, 1 month ago (2013-10-30 17:33:15 UTC) #12
Message was sent while issue was closed.
Change committed as 231867

Powered by Google App Engine
This is Rietveld 408576698