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

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

Issue 331293005: Revert of gpu: Add base class for gpu service tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/mailbox_manager_unittest.cc
diff --git a/gpu/command_buffer/service/mailbox_manager_unittest.cc b/gpu/command_buffer/service/mailbox_manager_unittest.cc
index 8e57faa96c0fe836e7d473528e635fd5febdc982..13005e6c35e2da210bc8ba7b2ad596be1373c637 100644
--- a/gpu/command_buffer/service/mailbox_manager_unittest.cc
+++ b/gpu/command_buffer/service/mailbox_manager_unittest.cc
@@ -5,7 +5,6 @@
#include "gpu/command_buffer/service/mailbox_manager.h"
#include "gpu/command_buffer/service/feature_info.h"
-#include "gpu/command_buffer/service/gpu_service_test.h"
#include "gpu/command_buffer/service/mailbox_synchronizer.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -18,30 +17,16 @@
using namespace ::testing;
-class MailboxManagerTest : public GpuServiceTest {
+class MailboxManagerTest : public testing::Test {
public:
- MailboxManagerTest() : initialized_synchronizer_(false) {}
+ MailboxManagerTest() {}
virtual ~MailboxManagerTest() {}
protected:
virtual void SetUp() {
- GpuServiceTest::SetUp();
+ testing::Test::SetUp();
feature_info_ = new FeatureInfo;
manager_ = new MailboxManager;
- }
-
- virtual void SetUpWithSynchronizer() {
- GpuServiceTest::SetUp();
- MailboxSynchronizer::Initialize();
- initialized_synchronizer_ = true;
- feature_info_ = new FeatureInfo;
- manager_ = new MailboxManager;
- }
-
- virtual void TearDown() {
- if (initialized_synchronizer_)
- MailboxSynchronizer::Terminate();
- GpuServiceTest::TearDown();
}
Texture* CreateTexture() {
@@ -88,7 +73,6 @@
scoped_refptr<MailboxManager> manager_;
private:
- bool initialized_synchronizer_;
scoped_refptr<FeatureInfo> feature_info_;
DISALLOW_COPY_AND_ASSIGN(MailboxManagerTest);
@@ -201,8 +185,11 @@
protected:
virtual void SetUp() {
- MailboxManagerTest::SetUpWithSynchronizer();
+ MailboxSynchronizer::Initialize();
+ MailboxManagerTest::SetUp();
manager2_ = new MailboxManager;
+ gl_.reset(new ::testing::StrictMock< ::gfx::MockGLInterface>());
+ ::gfx::MockGLInterface::SetGLInterface(gl_.get());
context_ = new gfx::GLContextStub();
surface_ = new gfx::GLSurfaceStub();
context_->MakeCurrent(surface_);
@@ -265,10 +252,14 @@
}
virtual void TearDown() {
+ MailboxManagerTest::TearDown();
+ MailboxSynchronizer::Terminate();
context_->ReleaseCurrent(NULL);
- MailboxManagerTest::TearDown();
- }
-
+ ::gfx::MockGLInterface::SetGLInterface(NULL);
+ gl_.reset();
+ }
+
+ scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_;
scoped_refptr<MailboxManager> manager2_;
scoped_refptr<gfx::GLContext> context_;
scoped_refptr<gfx::GLSurface> surface_;
« no previous file with comments | « gpu/command_buffer/service/gpu_tracer_unittest.cc ('k') | gpu/command_buffer/service/memory_program_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698