Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(6)

Issue 2752303002: views/mus: Install a mus-friend ContextFactory for tests. (Closed)

Created:
8 months, 1 week ago by sadrul
Modified:
8 months, 1 week ago
Reviewers:
danakj, Fady Samuel, sky
CC:
chromium-reviews, kalyank, sadrul, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

views/mus: Install a mus-friendly ContextFactory for tests. A test running with aura-mus (in aura, views, or ash) does not need a ui::ContextFactoryPrivate instance. It only needs a ui::ContextFactory. ui::InProcessContextFactory is not the right implementation to use in a mus client though, since it directly deals with cc::SurfaceManager, cc::Display etc., which are not suitable for a mus client. So provide a simpler implementation of ContextFactory instead in compositor which can be used from aura, views, and ash. Use this new ContextFactory for views_mus_unittests and mash_unittests. This fixes using ui::DrawWaiterForTest in these tests. BUG=618136 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2752303002 Cr-Commit-Position: refs/heads/master@{#457865} Committed: https://chromium.googlesource.com/chromium/src/+/19bc819e7192b19cd060a1f36c6d76ae0c9c9bf1

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : enable test #

Patch Set 4 : refactor #

Patch Set 5 : more refactor #

Patch Set 6 : . #

Total comments: 12

Patch Set 7 : . #

Patch Set 8 : . #

Total comments: 4

Patch Set 9 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -186 lines) Patch
M ash/laser/laser_pointer_controller_unittest.cc View 1 2 3 4 5 6 3 chunks +8 lines, -0 lines 0 comments Download
M ash/mus/BUILD.gn View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M ash/mus/non_client_frame_controller_unittest.cc View 1 2 3 4 5 6 4 chunks +5 lines, -65 lines 0 comments Download
M cc/test/fake_compositor_frame_sink.h View 1 2 3 4 5 6 3 chunks +4 lines, -0 lines 0 comments Download
M cc/test/fake_compositor_frame_sink.cc View 1 2 3 4 5 6 2 chunks +12 lines, -0 lines 0 comments Download
M mash/test/mash_test_suite.h View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download
M mash/test/mash_test_suite.cc View 1 2 3 4 5 6 3 chunks +4 lines, -68 lines 0 comments Download
M ui/aura/window_tree_host.cc View 1 chunk +6 lines, -5 lines 0 comments Download
M ui/compositor/BUILD.gn View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M ui/compositor/compositor_unittest.cc View 1 2 3 1 chunk +0 lines, -34 lines 0 comments Download
A ui/compositor/test/fake_context_factory.h View 1 2 3 4 5 6 7 8 1 chunk +52 lines, -0 lines 0 comments Download
A ui/compositor/test/fake_context_factory.cc View 1 2 3 4 5 6 7 8 1 chunk +53 lines, -0 lines 0 comments Download
M ui/views/mus/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/mus/views_mus_test_suite.cc View 1 2 3 4 5 6 3 chunks +9 lines, -0 lines 0 comments Download
M ui/views/test/platform_test_helper.h View 3 chunks +10 lines, -1 line 0 comments Download
M ui/views/test/platform_test_helper.cc View 3 chunks +13 lines, -0 lines 0 comments Download
M ui/views/test/scoped_views_test_helper.cc View 3 chunks +2 lines, -6 lines 0 comments Download
M ui/views/view_unittest.cc View 1 2 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 58 (43 generated)
sadrul
danakj@ for +cc DEPS from ui/aura/test/mus sky@ for all of it. Thanks!
8 months, 1 week ago (2017-03-17 03:39:08 UTC) #24
danakj
Why not use cc/test/ FakeCompositorFrameSink?
8 months, 1 week ago (2017-03-17 14:05:59 UTC) #27
danakj
On 2017/03/17 14:05:59, danakj wrote: > Why not use cc/test/ FakeCompositorFrameSink? Wait, nvm this is ...
8 months, 1 week ago (2017-03-17 14:06:30 UTC) #28
danakj
oook I understand everything now. ui/compositor/test has one for pixel tests but not a fake ...
8 months, 1 week ago (2017-03-17 14:10:57 UTC) #29
sadrul
https://codereview.chromium.org/2752303002/diff/100001/ui/aura/test/mus/test_context_factory.cc File ui/aura/test/mus/test_context_factory.cc (right): https://codereview.chromium.org/2752303002/diff/100001/ui/aura/test/mus/test_context_factory.cc#newcode19 ui/aura/test/mus/test_context_factory.cc:19: class FakeCompositorFrameSink : public cc::FakeCompositorFrameSink { On 2017/03/17 14:10:57, ...
8 months, 1 week ago (2017-03-17 15:31:11 UTC) #30
danakj
https://codereview.chromium.org/2752303002/diff/100001/ui/aura/test/mus/test_context_factory.cc File ui/aura/test/mus/test_context_factory.cc (right): https://codereview.chromium.org/2752303002/diff/100001/ui/aura/test/mus/test_context_factory.cc#newcode19 ui/aura/test/mus/test_context_factory.cc:19: class FakeCompositorFrameSink : public cc::FakeCompositorFrameSink { On 2017/03/17 15:31:11, ...
8 months, 1 week ago (2017-03-17 15:33:14 UTC) #31
Fady Samuel
https://codereview.chromium.org/2752303002/diff/100001/mash/test/mash_test_suite.cc File mash/test/mash_test_suite.cc (right): https://codereview.chromium.org/2752303002/diff/100001/mash/test/mash_test_suite.cc#newcode88 mash/test/mash_test_suite.cc:88: // Some tests in ash use the ContextFactoryPrivate (e.g. ...
8 months, 1 week ago (2017-03-17 15:37:28 UTC) #33
sky
LGTM https://codereview.chromium.org/2752303002/diff/100001/mash/test/mash_test_suite.cc File mash/test/mash_test_suite.cc (right): https://codereview.chromium.org/2752303002/diff/100001/mash/test/mash_test_suite.cc#newcode27 mash/test/mash_test_suite.cc:27: class TestContextFactoryPrivate : public ui::ContextFactoryPrivate { How come ...
8 months, 1 week ago (2017-03-17 15:48:16 UTC) #34
sadrul
https://codereview.chromium.org/2752303002/diff/100001/mash/test/mash_test_suite.cc File mash/test/mash_test_suite.cc (right): https://codereview.chromium.org/2752303002/diff/100001/mash/test/mash_test_suite.cc#newcode27 mash/test/mash_test_suite.cc:27: class TestContextFactoryPrivate : public ui::ContextFactoryPrivate { On 2017/03/17 15:48:16, ...
8 months, 1 week ago (2017-03-17 16:18:36 UTC) #35
sky
SLGTM https://codereview.chromium.org/2752303002/diff/100001/mash/test/mash_test_suite.cc File mash/test/mash_test_suite.cc (right): https://codereview.chromium.org/2752303002/diff/100001/mash/test/mash_test_suite.cc#newcode27 mash/test/mash_test_suite.cc:27: class TestContextFactoryPrivate : public ui::ContextFactoryPrivate { On 2017/03/17 ...
8 months, 1 week ago (2017-03-17 16:43:43 UTC) #39
sadrul
https://codereview.chromium.org/2752303002/diff/100001/mash/test/mash_test_suite.cc File mash/test/mash_test_suite.cc (right): https://codereview.chromium.org/2752303002/diff/100001/mash/test/mash_test_suite.cc#newcode88 mash/test/mash_test_suite.cc:88: // Some tests in ash use the ContextFactoryPrivate (e.g. ...
8 months, 1 week ago (2017-03-17 16:50:29 UTC) #45
danakj
ui/compositor and cc/ LGTM! https://codereview.chromium.org/2752303002/diff/140001/ui/compositor/test/fake_context_factory.cc File ui/compositor/test/fake_context_factory.cc (right): https://codereview.chromium.org/2752303002/diff/140001/ui/compositor/test/fake_context_factory.cc#newcode53 ui/compositor/test/fake_context_factory.cc:53: void FakeContextFactory::AddObserver(ui::ContextFactoryObserver* observer) {} (you ...
8 months, 1 week ago (2017-03-17 16:54:31 UTC) #47
sadrul
https://codereview.chromium.org/2752303002/diff/140001/ui/compositor/test/fake_context_factory.cc File ui/compositor/test/fake_context_factory.cc (right): https://codereview.chromium.org/2752303002/diff/140001/ui/compositor/test/fake_context_factory.cc#newcode53 ui/compositor/test/fake_context_factory.cc:53: void FakeContextFactory::AddObserver(ui::ContextFactoryObserver* observer) {} On 2017/03/17 16:54:31, danakj wrote: ...
8 months, 1 week ago (2017-03-17 18:59:14 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2752303002/160001
8 months, 1 week ago (2017-03-17 19:47:58 UTC) #55
commit-bot: I haz the power
8 months, 1 week ago (2017-03-17 19:58:43 UTC) #58
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/19bc819e7192b19cd060a1f36c6d...

Powered by Google App Engine
This is Rietveld efc10ee0f