Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: gpu/command_buffer/service/memory_program_cache_unittest.cc

Issue 332303002: gpu: Add base class for gpu service tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update gpu/build.GN Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/memory_program_cache_unittest.cc
diff --git a/gpu/command_buffer/service/memory_program_cache_unittest.cc b/gpu/command_buffer/service/memory_program_cache_unittest.cc
index 2db0df5346ba2d8ea694dfe0433d05738767b345..6973e67afe433c7c44a77fbd8ff4f27235562a51 100644
--- a/gpu/command_buffer/service/memory_program_cache_unittest.cc
+++ b/gpu/command_buffer/service/memory_program_cache_unittest.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "gpu/command_buffer/common/gles2_cmd_format.h"
#include "gpu/command_buffer/service/gl_utils.h"
+#include "gpu/command_buffer/service/gpu_service_test.h"
#include "gpu/command_buffer/service/shader_manager.h"
#include "gpu/command_buffer/service/shader_translator.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -65,7 +66,7 @@ class ProgramBinaryEmulator {
const char* binary_;
};
-class MemoryProgramCacheTest : public testing::Test {
+class MemoryProgramCacheTest : public GpuServiceTest {
public:
static const size_t kCacheSizeBytes = 1024;
static const GLuint kVertexShaderClientId = 90;
@@ -92,8 +93,7 @@ class MemoryProgramCacheTest : public testing::Test {
protected:
virtual void SetUp() {
- gl_.reset(new ::testing::StrictMock<gfx::MockGLInterface>());
- ::gfx::MockGLInterface::SetGLInterface(gl_.get());
+ GpuServiceTest::SetUp();
vertex_shader_ = shader_manager_.CreateShader(kVertexShaderClientId,
kVertexShaderServiceId,
@@ -137,11 +137,6 @@ class MemoryProgramCacheTest : public testing::Test {
fragment_shader_->SetStatus(true, NULL, NULL);
}
- virtual void TearDown() {
- ::gfx::MockGLInterface::SetGLInterface(NULL);
- gl_.reset();
- }
-
void SetExpectationsForSaveLinkedProgram(
const GLint program_id,
ProgramBinaryEmulator* emulator) const {
@@ -181,8 +176,6 @@ class MemoryProgramCacheTest : public testing::Test {
.WillOnce(SetArgPointee<2>(GL_FALSE));
}
- // Use StrictMock to make 100% sure we know how GL will be called.
- scoped_ptr< ::testing::StrictMock<gfx::MockGLInterface> > gl_;
scoped_ptr<MemoryProgramCache> cache_;
ShaderManager shader_manager_;
Shader* vertex_shader_;
« no previous file with comments | « gpu/command_buffer/service/mailbox_manager_unittest.cc ('k') | gpu/command_buffer/service/program_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698