summaryrefslogtreecommitdiffstats
path: root/ui/views/run_all_unittests.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-07 14:08:44 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-07 14:08:44 +0000
commitd65d6fe3c667835a8a0ddc0b917519115321d605 (patch)
treeb0090c9cbf784c825eb554fcb869dd0bc363a9dd /ui/views/run_all_unittests.cc
parent520d01a2c42f41e8003bc409f4bf0dba0b45f835 (diff)
downloadchromium_src-d65d6fe3c667835a8a0ddc0b917519115321d605.zip
chromium_src-d65d6fe3c667835a8a0ddc0b917519115321d605.tar.gz
chromium_src-d65d6fe3c667835a8a0ddc0b917519115321d605.tar.bz2
Clean up compositor initialization/destruction.
Moved from https://codereview.chromium.org/21052007/ Currently the ContextFactory is outliving the compositor thread in tests, which is bad since the contexts in there can be bound to the compositor thread. Then we end up reusing those contexts and bad things happen. This enforces ordering for initializing and destroying the compositor as follows: Initialize ContextFactory ..Compositor::Initialize ....Create Compositor instances ....Delete Compositor instances ..Compositor::Terminate The Compositor::Terminate call also destroys the ContextFactory. The ContextFactory can be initialized in one of two ways: 1. ImageTransportFactory::Initialize will set up the ContextFactory. This is used by things that invoke all of content/browser/. 2. Compositor::InitializeContextFactoryForTests() must be explicitly called by any unit tests that create a compositor. Since some tests want a real GL context and some don't, this does away with the misnomer of initializing the Compositor once for the entire test suite, and then re-initializing somewhere in the middle of the test suite. Instead, each test must Initialize/Terminate the compositor with the ContextFactory type of its choice. Incidently, this test enables 20 tests on aura or win_aura that were previously being skipped. TBR=piman@chromium.org BUG=258625, 266565 Review URL: https://codereview.chromium.org/22293003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216179 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/run_all_unittests.cc')
-rw-r--r--ui/views/run_all_unittests.cc3
1 files changed, 0 insertions, 3 deletions
diff --git a/ui/views/run_all_unittests.cc b/ui/views/run_all_unittests.cc
index cd73011..6c425d7 100644
--- a/ui/views/run_all_unittests.cc
+++ b/ui/views/run_all_unittests.cc
@@ -7,7 +7,6 @@
#include "base/test/test_suite.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
-#include "ui/compositor/compositor_setup.h"
#include "ui/views/view.h"
class ViewTestSuite : public base::TestSuite {
@@ -19,8 +18,6 @@ class ViewTestSuite : public base::TestSuite {
base::TestSuite::Initialize();
ui::RegisterPathProvider();
ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
-
- ui::SetupTestCompositor();
}
private: