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

Unified Diff: gpu/command_buffer/service/vertex_array_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
Index: gpu/command_buffer/service/vertex_array_manager_unittest.cc
diff --git a/gpu/command_buffer/service/vertex_array_manager_unittest.cc b/gpu/command_buffer/service/vertex_array_manager_unittest.cc
index 617a5f60aff67beedf0bb3ac8015e1f748e83c85..aa2df355f70925e728f032d8c989751f12a18cd1 100644
--- a/gpu/command_buffer/service/vertex_array_manager_unittest.cc
+++ b/gpu/command_buffer/service/vertex_array_manager_unittest.cc
@@ -7,6 +7,7 @@
#include "base/memory/scoped_ptr.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"
@@ -17,7 +18,7 @@ using ::testing::_;
namespace gpu {
namespace gles2 {
-class VertexArrayManagerTest : public testing::Test {
+class VertexArrayManagerTest : public GpuServiceTest {
public:
static const uint32 kNumVertexAttribs = 8;
@@ -29,21 +30,16 @@ class VertexArrayManagerTest : public testing::Test {
protected:
virtual void SetUp() {
- gl_.reset(new ::testing::StrictMock< ::gfx::MockGLInterface>());
- ::gfx::MockGLInterface::SetGLInterface(gl_.get());
-
- manager_ = new VertexArrayManager();
+ GpuServiceTest::SetUp();
+ manager_.reset(new VertexArrayManager());
}
virtual void TearDown() {
- delete manager_;
- ::gfx::MockGLInterface::SetGLInterface(NULL);
- gl_.reset();
+ manager_.reset();
+ GpuServiceTest::TearDown();
}
- // Use StrictMock to make 100% sure we know how GL will be called.
- scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_;
- VertexArrayManager* manager_;
+ scoped_ptr<VertexArrayManager> manager_;
};
// GCC requires these declarations, but MSVC requires they not be present
« no previous file with comments | « gpu/command_buffer/service/texture_manager_unittest.cc ('k') | gpu/command_buffer/service/vertex_attrib_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698