diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-18 02:30:53 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-18 02:30:53 +0000 |
commit | 4f4f3f6bdb8ac5461298923757970e071230c810 (patch) | |
tree | 1dc264dbf4a8c8b6c70d5198c5adb3938f073e38 /chrome/test | |
parent | c29240a21de2e855328792ae5b755c026cfc80eb (diff) | |
download | chromium_src-4f4f3f6bdb8ac5461298923757970e071230c810.zip chromium_src-4f4f3f6bdb8ac5461298923757970e071230c810.tar.gz chromium_src-4f4f3f6bdb8ac5461298923757970e071230c810.tar.bz2 |
Revert 105914 - Removed the ability to disable accelerated compositing for UI tests. There is no need to disable accelerated compositing on any platform. Mac bots are always accelerated. Mesa works fine on others.
BUG=95782
Broke Linux TSAN.
Review URL: http://codereview.chromium.org/7996010
TBR=alokp@chromium.org
Review URL: http://codereview.chromium.org/8330008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106005 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/gpu/webgl_conformance_tests.cc | 3 | ||||
-rw-r--r-- | chrome/test/perf/frame_rate/frame_rate_tests.cc | 4 | ||||
-rw-r--r-- | chrome/test/ui/ui_test.cc | 30 | ||||
-rw-r--r-- | chrome/test/ui/ui_test.h | 6 |
4 files changed, 41 insertions, 2 deletions
diff --git a/chrome/test/gpu/webgl_conformance_tests.cc b/chrome/test/gpu/webgl_conformance_tests.cc index dd6411e..8822151 100644 --- a/chrome/test/gpu/webgl_conformance_tests.cc +++ b/chrome/test/gpu/webgl_conformance_tests.cc @@ -31,6 +31,9 @@ class WebGLConformanceTests : public UITest { } void SetUp() { + // Force the use of GPU hardware. + force_use_osmesa_ = false; + // Ensure that a GPU bot is never blacklisted. launch_arguments_.AppendSwitch(switches::kIgnoreGpuBlacklist); UITest::SetUp(); diff --git a/chrome/test/perf/frame_rate/frame_rate_tests.cc b/chrome/test/perf/frame_rate/frame_rate_tests.cc index f91537d..72477c0 100644 --- a/chrome/test/perf/frame_rate/frame_rate_tests.cc +++ b/chrome/test/perf/frame_rate/frame_rate_tests.cc @@ -23,6 +23,10 @@ class FrameRateTest : public UIPerfTest { FrameRateTest() { show_window_ = true; dom_automation_enabled_ = true; + // Since this is a performance test, try to use the host machine's GPU + // instead of falling back to software-rendering. + force_use_osmesa_ = false; + disable_accelerated_compositing_ = false; } virtual FilePath GetDataPath(const std::string& name) { diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 832207a..f463598 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -50,6 +50,7 @@ #include "googleurl/src/gurl.h" #include "net/base/net_util.h" #include "ui/gfx/gl/gl_implementation.h" +#include "ui/gfx/gl/gl_switches.h" #if defined(OS_WIN) #include "base/win/windows_version.h" @@ -88,7 +89,9 @@ UITestBase::UITestBase() clear_profile_(true), include_testing_id_(true), enable_file_cookies_(true), - profile_type_(UITestBase::DEFAULT_THEME) { + profile_type_(UITestBase::DEFAULT_THEME), + force_use_osmesa_(true), + disable_accelerated_compositing_(true) { PathService::Get(chrome::DIR_APP, &browser_directory_); PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_); } @@ -103,7 +106,9 @@ UITestBase::UITestBase(MessageLoop::Type msg_loop_type) clear_profile_(true), include_testing_id_(true), enable_file_cookies_(true), - profile_type_(UITestBase::DEFAULT_THEME) { + profile_type_(UITestBase::DEFAULT_THEME), + force_use_osmesa_(true), + disable_accelerated_compositing_(true) { PathService::Get(chrome::DIR_APP, &browser_directory_); PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_); } @@ -513,6 +518,27 @@ void UITest::SetUp() { test_info->name()); } + // UI tests force the use of OSMesa by default because of various bad + // interactions between the GPU infrastructure, how our bots are configured, + // and existing performance expectations. The goal to slowly remove these + // special cases, as covered by: + // http://code.google.com/p/chromium/issues/detail?id=95782 + // + // Note also that this disabling is done in UITest to avoid affecting + // pyautolib, which runs tests that do not work with OSMesa. + if (force_use_osmesa_) { + launch_arguments_.AppendSwitchASCII(switches::kUseGL, + gfx::kGLImplementationOSMesaName); + } + + // Disable acclerated compositing for tests unless they directly opt-in. The + // rationale for this is identical to the use of OSMesa: bad interactions + // between tests and the accelerated compositing system. The goal is to slowly + // remove this flag, as covered by: + // http://code.google.com/p/chromium/issues/detail?id=95782 + if (disable_accelerated_compositing_) + launch_arguments_.AppendSwitch(switches::kDisableAcceleratedCompositing); + UITestBase::SetUp(); PlatformTest::SetUp(); } diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h index a0f4ec6..6e4a4a2 100644 --- a/chrome/test/ui/ui_test.h +++ b/chrome/test/ui/ui_test.h @@ -356,6 +356,12 @@ class UITestBase { // PID file for websocket server. FilePath websocket_pid_file_; + // Whether to force use of mesa for GL rendering. + bool force_use_osmesa_; + + // Whether to disable accelerated compositing for this test. + bool disable_accelerated_compositing_; + private: // Time the test was started (so we can check for new crash dumps) base::Time test_start_time_; |