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

Side by Side Diff: gpu/command_buffer/service/gpu_processor_unittest.cc

Issue 560002: Fixed compile/link errors for gpu unit-tests. I had to mostly fix signed/unsi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "gpu/command_buffer/common/command_buffer_mock.h" 7 #include "gpu/command_buffer/common/command_buffer_mock.h"
8 #include "gpu/command_buffer/service/mocks.h" 8 #include "gpu/command_buffer/service/mocks.h"
9 #include "gpu/command_buffer/service/gpu_processor.h" 9 #include "gpu/command_buffer/service/gpu_processor.h"
10 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 10 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 MessageLoop::current()->RunAllPending(); 68 MessageLoop::current()->RunAllPending();
69 } 69 }
70 70
71 error::Error GetError() { 71 error::Error GetError() {
72 return command_buffer_->GetState().error; 72 return command_buffer_->GetState().error;
73 } 73 }
74 74
75 base::AtExitManager at_exit_manager; 75 base::AtExitManager at_exit_manager;
76 MessageLoop message_loop; 76 MessageLoop message_loop;
77 scoped_ptr<MockCommandBuffer> command_buffer_; 77 scoped_ptr<MockCommandBuffer> command_buffer_;
78 scoped_ptr<::base::SharedMemory> shared_memory_; 78 scoped_ptr<base::SharedMemory> shared_memory_;
79 Buffer shared_memory_buffer_; 79 Buffer shared_memory_buffer_;
80 int32* buffer_; 80 int32* buffer_;
81 gles2::MockGLES2Decoder* decoder_; 81 gles2::MockGLES2Decoder* decoder_;
82 CommandParser* parser_; 82 CommandParser* parser_;
83 scoped_ptr<AsyncAPIMock> async_api_; 83 scoped_ptr<AsyncAPIMock> async_api_;
84 scoped_refptr<GPUProcessor> processor_; 84 scoped_refptr<GPUProcessor> processor_;
85 }; 85 };
86 86
87 TEST_F(GPUProcessorTest, ProcessorDoesNothingIfRingBufferIsEmpty) { 87 TEST_F(GPUProcessorTest, ProcessorDoesNothingIfRingBufferIsEmpty) {
88 CommandBuffer::State state; 88 CommandBuffer::State state;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 EXPECT_EQ(kRingBufferSize, processor_->GetSharedMemoryBuffer(7).size); 247 EXPECT_EQ(kRingBufferSize, processor_->GetSharedMemoryBuffer(7).size);
248 } 248 }
249 249
250 TEST_F(GPUProcessorTest, SetTokenForwardsToCommandBuffer) { 250 TEST_F(GPUProcessorTest, SetTokenForwardsToCommandBuffer) {
251 EXPECT_CALL(*command_buffer_, SetToken(7)); 251 EXPECT_CALL(*command_buffer_, SetToken(7));
252 processor_->set_token(7); 252 processor_->set_token(7);
253 } 253 }
254 254
255 } // namespace gpu 255 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698