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

Unified Diff: gpu/command_buffer/service/vertex_attrib_manager_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
« no previous file with comments | « gpu/command_buffer/service/vertex_array_manager_unittest.cc ('k') | gpu/gpu.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/vertex_attrib_manager_unittest.cc
diff --git a/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc b/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc
index 27d1ee42c3ab9442d7f5c67325e3545d3aefaf45..e7fd690547423e53da5eb990f2c8224845838bdd 100644
--- a/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc
+++ b/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc
@@ -8,6 +8,7 @@
#include "gpu/command_buffer/service/buffer_manager.h"
#include "gpu/command_buffer/service/error_state_mock.h"
#include "gpu/command_buffer/service/feature_info.h"
+#include "gpu/command_buffer/service/gpu_service_test.h"
#include "gpu/command_buffer/service/test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gl/gl_mock.h"
@@ -18,7 +19,7 @@ using ::testing::_;
namespace gpu {
namespace gles2 {
-class VertexAttribManagerTest : public testing::Test {
+class VertexAttribManagerTest : public GpuServiceTest {
public:
static const uint32 kNumVertexAttribs = 8;
@@ -30,8 +31,7 @@ class VertexAttribManagerTest : public testing::Test {
protected:
virtual void SetUp() {
- gl_.reset(new ::testing::StrictMock< ::gfx::MockGLInterface>());
- ::gfx::MockGLInterface::SetGLInterface(gl_.get());
+ GpuServiceTest::SetUp();
for (uint32 ii = 0; ii < kNumVertexAttribs; ++ii) {
EXPECT_CALL(*gl_, VertexAttrib4f(ii, 0.0f, 0.0f, 0.0f, 1.0f))
@@ -43,14 +43,6 @@ class VertexAttribManagerTest : public testing::Test {
manager_->Initialize(kNumVertexAttribs, true);
}
- virtual void TearDown() {
- manager_ = NULL;
- ::gfx::MockGLInterface::SetGLInterface(NULL);
- gl_.reset();
- }
-
- // Use StrictMock to make 100% sure we know how GL will be called.
- scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_;
scoped_refptr<VertexAttribManager> manager_;
};
« no previous file with comments | « gpu/command_buffer/service/vertex_array_manager_unittest.cc ('k') | gpu/gpu.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698