diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-27 14:29:00 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-27 14:29:00 +0000 |
commit | 87cc42c43796278f65ffe854386522ad8fede0ec (patch) | |
tree | a70cfa816bc2ddbf3bcb7cfb5af879e0ac874cd3 /gpu | |
parent | 616d494697cd87234a27666cb4cf20dd33f96c34 (diff) | |
download | chromium_src-87cc42c43796278f65ffe854386522ad8fede0ec.zip chromium_src-87cc42c43796278f65ffe854386522ad8fede0ec.tar.gz chromium_src-87cc42c43796278f65ffe854386522ad8fede0ec.tar.bz2 |
Disable GLLoseContextTest.ShareGroup on platforms that exit on context lost.
This currently causes these tests to exit when run on Windows.
Review URL: https://chromiumcodereview.appspot.com/17903003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208914 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/tests/gl_lose_context_chromium_unittests.cc | 6 | ||||
-rw-r--r-- | gpu/command_buffer/tests/gl_manager.cc | 5 | ||||
-rw-r--r-- | gpu/command_buffer/tests/gl_manager.h | 3 |
3 files changed, 14 insertions, 0 deletions
diff --git a/gpu/command_buffer/tests/gl_lose_context_chromium_unittests.cc b/gpu/command_buffer/tests/gl_lose_context_chromium_unittests.cc index 00ebc85..2d878e4 100644 --- a/gpu/command_buffer/tests/gl_lose_context_chromium_unittests.cc +++ b/gpu/command_buffer/tests/gl_lose_context_chromium_unittests.cc @@ -7,6 +7,7 @@ #include <GLES2/gl2extchromium.h> #include "base/logging.h" +#include "gpu/command_buffer/service/feature_info.h" #include "gpu/command_buffer/tests/gl_manager.h" #include "gpu/command_buffer/tests/gl_test_utils.h" #include "testing/gmock/include/gmock/gmock.h" @@ -39,6 +40,11 @@ class GLLoseContextTest : public testing::Test { // Test that glLoseContextCHROMIUM loses context in the same // share group but not other. TEST_F(GLLoseContextTest, ShareGroup) { + // If losing the context will cause the process to exit, do not perform this + // test as it will cause all subsequent tests to not run. + if (gl1a_.workarounds().exit_on_context_lost) + return; + gl1a_.MakeCurrent(); glLoseContextCHROMIUM( GL_GUILTY_CONTEXT_RESET_EXT, GL_INNOCENT_CONTEXT_RESET_EXT); diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc index 9089579..e78328b 100644 --- a/gpu/command_buffer/tests/gl_manager.cc +++ b/gpu/command_buffer/tests/gl_manager.cc @@ -15,6 +15,7 @@ #include "gpu/command_buffer/service/command_buffer_service.h" #include "gpu/command_buffer/service/context_group.h" #include "gpu/command_buffer/service/gl_context_virtual.h" +#include "gpu/command_buffer/service/gles2_cmd_decoder.h" #include "gpu/command_buffer/service/gpu_scheduler.h" #include "gpu/command_buffer/service/image_manager.h" #include "gpu/command_buffer/service/mailbox_manager.h" @@ -253,6 +254,10 @@ void GLManager::Destroy() { } } +const gpu::gles2::FeatureInfo::Workarounds& GLManager::workarounds() const { + return decoder_->GetContextGroup()->feature_info()->workarounds(); +} + void GLManager::PumpCommands() { decoder_->MakeCurrent(); gpu_scheduler_->PutChanged(); diff --git a/gpu/command_buffer/tests/gl_manager.h b/gpu/command_buffer/tests/gl_manager.h index 7b96b84..a53aa40 100644 --- a/gpu/command_buffer/tests/gl_manager.h +++ b/gpu/command_buffer/tests/gl_manager.h @@ -7,6 +7,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" +#include "gpu/command_buffer/service/feature_info.h" #include "ui/gfx/size.h" namespace gfx { @@ -87,6 +88,8 @@ class GLManager { return context_.get(); } + const gpu::gles2::FeatureInfo::Workarounds& workarounds() const; + private: void PumpCommands(); bool GetBufferChanged(int32 transfer_buffer_id); |