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

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

Issue 3828009: Move scoped_nsdisable_screen_update from base to app/mac... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/mac/scoped_nsautorelease_pool.h"
5 #include "base/message_loop.h" 6 #include "base/message_loop.h"
6 #include "base/scoped_nsautorelease_pool.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/context_group.h" 8 #include "gpu/command_buffer/service/context_group.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"
11 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h" 11 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h"
12 #include "gpu/command_buffer/service/mocks.h" 12 #include "gpu/command_buffer/service/mocks.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 15
16 using testing::_; 16 using testing::_;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 virtual void TearDown() { 70 virtual void TearDown() {
71 // Ensure that any unexpected tasks posted by the GPU processor are executed 71 // Ensure that any unexpected tasks posted by the GPU processor are executed
72 // in order to fail the test. 72 // in order to fail the test.
73 MessageLoop::current()->RunAllPending(); 73 MessageLoop::current()->RunAllPending();
74 } 74 }
75 75
76 error::Error GetError() { 76 error::Error GetError() {
77 return command_buffer_->GetState().error; 77 return command_buffer_->GetState().error;
78 } 78 }
79 79
80 base::ScopedNSAutoreleasePool autorelease_pool_; 80 base::mac::ScopedNSAutoreleasePool autorelease_pool_;
81 MessageLoop message_loop; 81 MessageLoop message_loop;
82 scoped_ptr<MockCommandBuffer> command_buffer_; 82 scoped_ptr<MockCommandBuffer> command_buffer_;
83 scoped_ptr<base::SharedMemory> shared_memory_; 83 scoped_ptr<base::SharedMemory> shared_memory_;
84 Buffer shared_memory_buffer_; 84 Buffer shared_memory_buffer_;
85 int32* buffer_; 85 int32* buffer_;
86 gles2::ContextGroup group_; 86 gles2::ContextGroup group_;
87 gles2::MockGLES2Decoder* decoder_; 87 gles2::MockGLES2Decoder* decoder_;
88 CommandParser* parser_; 88 CommandParser* parser_;
89 scoped_ptr<AsyncAPIMock> async_api_; 89 scoped_ptr<AsyncAPIMock> async_api_;
90 scoped_ptr<GPUProcessor> processor_; 90 scoped_ptr<GPUProcessor> processor_;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 EXPECT_EQ(kRingBufferSize, processor_->GetSharedMemoryBuffer(7).size); 254 EXPECT_EQ(kRingBufferSize, processor_->GetSharedMemoryBuffer(7).size);
255 } 255 }
256 256
257 TEST_F(GPUProcessorTest, SetTokenForwardsToCommandBuffer) { 257 TEST_F(GPUProcessorTest, SetTokenForwardsToCommandBuffer) {
258 EXPECT_CALL(*command_buffer_, SetToken(7)); 258 EXPECT_CALL(*command_buffer_, SetToken(7));
259 processor_->set_token(7); 259 processor_->set_token(7);
260 } 260 }
261 261
262 } // namespace gpu 262 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/command_buffer_service_unittest.cc ('k') | remoting/host/simple_host_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698