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

Unified Diff: trunk/src/gpu/command_buffer/service/context_group_unittest.cc

Issue 346573002: Revert 278059 "gpu: Add base class for gpu service tests" (Closed) Base URL: svn://svn.chromium.org/chrome/
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: trunk/src/gpu/command_buffer/service/context_group_unittest.cc
===================================================================
--- trunk/src/gpu/command_buffer/service/context_group_unittest.cc (revision 278063)
+++ trunk/src/gpu/command_buffer/service/context_group_unittest.cc (working copy)
@@ -6,12 +6,12 @@
#include "base/memory/scoped_ptr.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h"
-#include "gpu/command_buffer/service/gpu_service_test.h"
#include "gpu/command_buffer/service/test_helper.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gl/gl_mock.h"
+using ::gfx::MockGLInterface;
using ::testing::_;
using ::testing::DoAll;
using ::testing::HasSubstr;
@@ -23,11 +23,12 @@
using ::testing::SetArrayArgument;
using ::testing::SetArgumentPointee;
using ::testing::StrEq;
+using ::testing::StrictMock;
namespace gpu {
namespace gles2 {
-class ContextGroupTest : public GpuServiceTest {
+class ContextGroupTest : public testing::Test {
public:
static const bool kBindGeneratesResource = false;
@@ -35,12 +36,19 @@
protected:
virtual void SetUp() {
- GpuServiceTest::SetUp();
+ gl_.reset(new ::testing::StrictMock< ::gfx::MockGLInterface>());
+ ::gfx::MockGLInterface::SetGLInterface(gl_.get());
decoder_.reset(new MockGLES2Decoder());
group_ = scoped_refptr<ContextGroup>(
new ContextGroup(NULL, NULL, NULL, NULL, NULL, kBindGeneratesResource));
}
+ virtual void TearDown() {
+ ::gfx::MockGLInterface::SetGLInterface(NULL);
+ gl_.reset();
+ }
+
+ scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_;
scoped_ptr<MockGLES2Decoder> decoder_;
scoped_refptr<ContextGroup> group_;
};

Powered by Google App Engine
This is Rietveld 408576698