summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/gpu_scheduler_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/command_buffer/service/gpu_scheduler_unittest.cc')
-rw-r--r--gpu/command_buffer/service/gpu_scheduler_unittest.cc27
1 files changed, 5 insertions, 22 deletions
diff --git a/gpu/command_buffer/service/gpu_scheduler_unittest.cc b/gpu/command_buffer/service/gpu_scheduler_unittest.cc
index 4fb54b4..ce4fa11 100644
--- a/gpu/command_buffer/service/gpu_scheduler_unittest.cc
+++ b/gpu/command_buffer/service/gpu_scheduler_unittest.cc
@@ -46,7 +46,7 @@ class GpuSchedulerTest : public testing::Test {
async_api_.reset(new StrictMock<AsyncAPIMock>);
- decoder_ = new gles2::MockGLES2Decoder();
+ decoder_.reset(new gles2::MockGLES2Decoder());
parser_ = new CommandParser(buffer_,
kRingBufferEntries,
@@ -55,13 +55,9 @@ class GpuSchedulerTest : public testing::Test {
0,
async_api_.get());
- scheduler_.reset(gpu::GpuScheduler::CreateForTests(command_buffer_.get(),
- decoder_,
- parser_));
-
- EXPECT_CALL(*decoder_, Destroy())
- .Times(1)
- .RetiresOnSaturation();
+ scheduler_.reset(new gpu::GpuScheduler(command_buffer_.get(),
+ decoder_.get(),
+ parser_));
}
virtual void TearDown() {
@@ -80,7 +76,7 @@ class GpuSchedulerTest : public testing::Test {
scoped_ptr<base::SharedMemory> shared_memory_;
Buffer shared_memory_buffer_;
int32* buffer_;
- gles2::MockGLES2Decoder* decoder_;
+ scoped_ptr<gles2::MockGLES2Decoder> decoder_;
CommandParser* parser_;
scoped_ptr<AsyncAPIMock> async_api_;
scoped_ptr<GpuScheduler> scheduler_;
@@ -146,19 +142,6 @@ TEST_F(GpuSchedulerTest, ProcessesTwoCommands) {
scheduler_->PutChanged();
}
-TEST_F(GpuSchedulerTest, SchedulerSetsTheGLContext) {
- EXPECT_CALL(*decoder_, MakeCurrent())
- .WillOnce(Return(true))
- .WillOnce(Return(true));
-
- CommandBuffer::State state;
- state.put_offset = 0;
- EXPECT_CALL(*command_buffer_, GetState())
- .WillRepeatedly(Return(state));
-
- scheduler_->PutChanged();
-}
-
TEST_F(GpuSchedulerTest, SetsErrorCodeOnCommandBuffer) {
CommandHeader* header = reinterpret_cast<CommandHeader*>(&buffer_[0]);
header[0].command = 7;