| 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_;
|
|
|