ui: No more TestCompositor. Use NullDraw contexts in unit tests.
This CL removes the concept of the TestCompositor entirely, removing
the TestContextFactory and the --disable-test-compositor flag.
Now unit tests that use the compositor will use an in process context
with OSMesa bindings, and the draw methods stubbed out (ie NullDraw
GL bindings). This change allows the NullDraw bindings to be disabled
for individual tests that require pixel output by instantiating a
scoped gfx::DisableNullDrawGLBindings object.
The command line flag is replaced by --enable-pixel-output-in-tests
which forces all tests to produce pixel output for debugging purposes.
This flag already existed for browser tests and has been extended to
all tests that use ui::Compositor.
The |allow_test_contexts| flag has been inverted to
|enable_pixel_output|.
The AuraTestHelper no longer sets up the ContextFactory. Some users of
the test helper want to use ImageTransportFactory, which also sets up
a ContextFactory, meaning we end up setting up 2 ContextFactories
currently for those tests. The DCHECK() added to
ContextFactory::SetInstance() caught this. So I've moved the
ContextFactory setup from AuraTestHelper to each of its owners.
Depends on:
https://codereview.chromium.org/135213003/
R=piman,ben
BUG=
270918