diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-04 21:52:17 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-04 21:52:17 +0000 |
commit | f14a8a45135c1dd9d39a2ccb871bad9fc07e2c44 (patch) | |
tree | 6ec023a5b5733b49b4187d8a5209c5dfee1794d1 | |
parent | 0dec72af4120aa512b877ec0ee01708b29611b48 (diff) | |
download | chromium_src-f14a8a45135c1dd9d39a2ccb871bad9fc07e2c44.zip chromium_src-f14a8a45135c1dd9d39a2ccb871bad9fc07e2c44.tar.gz chromium_src-f14a8a45135c1dd9d39a2ccb871bad9fc07e2c44.tar.bz2 |
Remove |disable_drawing| flag from GLSurface::InitializeOneOffForTests.
This flag is always passed as true now that all test suites opt in for
it, so we can remove it.
R=sievers, sky, joi
BUG=270918
Review URL: https://codereview.chromium.org/176843008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254837 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ash/test/test_suite.cc | 2 | ||||
-rw-r--r-- | cc/test/cc_test_suite.cc | 2 | ||||
-rw-r--r-- | chrome/test/base/chrome_test_suite.cc | 2 | ||||
-rw-r--r-- | components/test/run_all_unittests.cc | 2 | ||||
-rw-r--r-- | content/test/content_test_suite.cc | 2 | ||||
-rw-r--r-- | ui/app_list/test/run_all_unittests.cc | 2 | ||||
-rw-r--r-- | ui/aura/test/run_all_unittests.cc | 2 | ||||
-rw-r--r-- | ui/compositor/test/test_suite.cc | 2 | ||||
-rw-r--r-- | ui/gl/gl_surface.cc | 6 | ||||
-rw-r--r-- | ui/gl/gl_surface.h | 3 | ||||
-rw-r--r-- | ui/keyboard/test/run_all_unittests.cc | 2 | ||||
-rw-r--r-- | ui/message_center/test/run_all_unittests.cc | 2 | ||||
-rw-r--r-- | ui/views/run_all_unittests.cc | 2 |
13 files changed, 14 insertions, 17 deletions
diff --git a/ash/test/test_suite.cc b/ash/test/test_suite.cc index 00a73c7..2e971eb 100644 --- a/ash/test/test_suite.cc +++ b/ash/test/test_suite.cc @@ -30,7 +30,7 @@ AuraShellTestSuite::AuraShellTestSuite(int argc, char** argv) void AuraShellTestSuite::Initialize() { base::TestSuite::Initialize(); - gfx::GLSurface::InitializeOneOffForTests(true); + gfx::GLSurface::InitializeOneOffForTests(); #if defined(OS_WIN) if (base::win::GetVersion() >= base::win::VERSION_WIN8 && diff --git a/cc/test/cc_test_suite.cc b/cc/test/cc_test_suite.cc index 66e5258..abe61cb 100644 --- a/cc/test/cc_test_suite.cc +++ b/cc/test/cc_test_suite.cc @@ -18,7 +18,7 @@ CCTestSuite::~CCTestSuite() {} void CCTestSuite::Initialize() { base::TestSuite::Initialize(); - gfx::GLSurface::InitializeOneOffForTests(true); + gfx::GLSurface::InitializeOneOffForTests(); CCPaths::RegisterPathProvider(); message_loop_.reset(new base::MessageLoop); diff --git a/chrome/test/base/chrome_test_suite.cc b/chrome/test/base/chrome_test_suite.cc index ffa98e3..e8c425d 100644 --- a/chrome/test/base/chrome_test_suite.cc +++ b/chrome/test/base/chrome_test_suite.cc @@ -192,7 +192,7 @@ void ChromeTestSuite::Initialize() { // For browser tests, a full chrome instance is initialized which will set up // GLSurface itself. For unit tests, we need to set this up for them. if (!IsBrowserTestSuite()) - gfx::GLSurface::InitializeOneOffForTests(true); + gfx::GLSurface::InitializeOneOffForTests(); #endif #if defined(OS_MACOSX) && !defined(OS_IOS) diff --git a/components/test/run_all_unittests.cc b/components/test/run_all_unittests.cc index 5405bac6..ee48eed 100644 --- a/components/test/run_all_unittests.cc +++ b/components/test/run_all_unittests.cc @@ -40,7 +40,7 @@ class ComponentsTestSuite : public base::TestSuite { virtual void Initialize() OVERRIDE { base::TestSuite::Initialize(); #if !defined(OS_IOS) - gfx::GLSurface::InitializeOneOffForTests(true); + gfx::GLSurface::InitializeOneOffForTests(); #endif #if defined(OS_ANDROID) // Register JNI bindings for android. diff --git a/content/test/content_test_suite.cc b/content/test/content_test_suite.cc index 4e43dd8..336d02c 100644 --- a/content/test/content_test_suite.cc +++ b/content/test/content_test_suite.cc @@ -74,7 +74,7 @@ void ContentTestSuite::Initialize() { // When running in a child process for Mac sandbox tests, the sandbox exists // to initialize GL, so don't do it here. if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestChildProcess)) - gfx::GLSurface::InitializeOneOffForTests(true); + gfx::GLSurface::InitializeOneOffForTests(); #endif testing::TestEventListeners& listeners = testing::UnitTest::GetInstance()->listeners(); diff --git a/ui/app_list/test/run_all_unittests.cc b/ui/app_list/test/run_all_unittests.cc index c10b376..48dd5a8 100644 --- a/ui/app_list/test/run_all_unittests.cc +++ b/ui/app_list/test/run_all_unittests.cc @@ -24,7 +24,7 @@ class AppListTestSuite : public base::TestSuite { protected: virtual void Initialize() OVERRIDE { #if !defined(OS_MACOSX) - gfx::GLSurface::InitializeOneOffForTests(true); + gfx::GLSurface::InitializeOneOffForTests(); #endif base::TestSuite::Initialize(); ui::RegisterPathProvider(); diff --git a/ui/aura/test/run_all_unittests.cc b/ui/aura/test/run_all_unittests.cc index f749392..48ea16e 100644 --- a/ui/aura/test/run_all_unittests.cc +++ b/ui/aura/test/run_all_unittests.cc @@ -9,7 +9,7 @@ int main(int argc, char** argv) { base::TestSuite test_suite(argc, argv); - gfx::GLSurface::InitializeOneOffForTests(true); + gfx::GLSurface::InitializeOneOffForTests(); return base::LaunchUnitTests( argc, diff --git a/ui/compositor/test/test_suite.cc b/ui/compositor/test/test_suite.cc index 5d93f65..d98f52d 100644 --- a/ui/compositor/test/test_suite.cc +++ b/ui/compositor/test/test_suite.cc @@ -25,7 +25,7 @@ CompositorTestSuite::~CompositorTestSuite() {} void CompositorTestSuite::Initialize() { base::TestSuite::Initialize(); - gfx::GLSurface::InitializeOneOffForTests(true); + gfx::GLSurface::InitializeOneOffForTests(); gfx::RegisterPathProvider(); diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc index ae324b1..5d35b33 100644 --- a/ui/gl/gl_surface.cc +++ b/ui/gl/gl_surface.cc @@ -95,7 +95,7 @@ bool GLSurface::InitializeOneOffImplementation(GLImplementation impl, } // static -void GLSurface::InitializeOneOffForTests(bool disable_drawing) { +void GLSurface::InitializeOneOffForTests() { DCHECK_EQ(kGLImplementationNone, GetGLImplementation()); #if defined(USE_X11) @@ -127,9 +127,7 @@ void GLSurface::InitializeOneOffForTests(bool disable_drawing) { bool fallback_to_osmesa = false; bool gpu_service_logging = false; - bool disable_gl_drawing = disable_drawing; - // TODO(danakj): Unit tests do not produce pixel output by default. - // bool disable_gl_drawing = true; + bool disable_gl_drawing = true; CHECK(InitializeOneOffImplementation( impl, fallback_to_osmesa, gpu_service_logging, disable_gl_drawing)); diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h index e8ef8dd..f7a02f0 100644 --- a/ui/gl/gl_surface.h +++ b/ui/gl/gl_surface.h @@ -75,8 +75,7 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { // Unit tests should call these instead of InitializeOneOff() to set up // GL bindings appropriate for tests. - // TODO(danakj): Once all callers pass true, remove the argument. - static void InitializeOneOffForTests(bool disable_drawing = false); + static void InitializeOneOffForTests(); static void InitializeOneOffWithMockBindingsForTests(); static void InitializeDynamicMockBindingsForTests(GLContext* context); diff --git a/ui/keyboard/test/run_all_unittests.cc b/ui/keyboard/test/run_all_unittests.cc index 9cd5d77..d5e5bc0 100644 --- a/ui/keyboard/test/run_all_unittests.cc +++ b/ui/keyboard/test/run_all_unittests.cc @@ -21,7 +21,7 @@ class KeyboardTestSuite : public base::TestSuite { protected: virtual void Initialize() OVERRIDE { base::TestSuite::Initialize(); - gfx::GLSurface::InitializeOneOffForTests(true); + gfx::GLSurface::InitializeOneOffForTests(); ui::RegisterPathProvider(); base::FilePath pak_dir; diff --git a/ui/message_center/test/run_all_unittests.cc b/ui/message_center/test/run_all_unittests.cc index 64e408b..1688dd7 100644 --- a/ui/message_center/test/run_all_unittests.cc +++ b/ui/message_center/test/run_all_unittests.cc @@ -24,7 +24,7 @@ class MessageCenterTestSuite : public base::TestSuite { protected: virtual void Initialize() OVERRIDE { #if !defined(OS_MACOSX) - gfx::GLSurface::InitializeOneOffForTests(true); + gfx::GLSurface::InitializeOneOffForTests(); #endif base::TestSuite::Initialize(); ui::RegisterPathProvider(); diff --git a/ui/views/run_all_unittests.cc b/ui/views/run_all_unittests.cc index bcf832d..63b1fd5 100644 --- a/ui/views/run_all_unittests.cc +++ b/ui/views/run_all_unittests.cc @@ -19,7 +19,7 @@ class ViewTestSuite : public base::TestSuite { protected: virtual void Initialize() OVERRIDE { base::TestSuite::Initialize(); - gfx::GLSurface::InitializeOneOffForTests(true); + gfx::GLSurface::InitializeOneOffForTests(); ui::RegisterPathProvider(); base::FilePath pak_dir; |