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

Side by Side Diff: gpu/command_buffer/client/mapped_memory_unittest.cc

Issue 8414020: Expose the sandbox related code through the content API. I did a bit of cleanup while I was doing... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "gpu/command_buffer/client/mapped_memory.h" 5 #include "gpu/command_buffer/client/mapped_memory.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/mac/scoped_nsautorelease_pool.h"
9 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
10 #include "gpu/command_buffer/client/cmd_buffer_helper.h" 9 #include "gpu/command_buffer/client/cmd_buffer_helper.h"
11 #include "gpu/command_buffer/service/mocks.h" 10 #include "gpu/command_buffer/service/mocks.h"
12 #include "gpu/command_buffer/service/command_buffer_service.h" 11 #include "gpu/command_buffer/service/command_buffer_service.h"
13 #include "gpu/command_buffer/service/gpu_scheduler.h" 12 #include "gpu/command_buffer/service/gpu_scheduler.h"
14 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
15 14
15 #if defined(OS_MACOSX)
16 #include "base/mac/scoped_nsautorelease_pool.h"
17 #endif
18
16 namespace gpu { 19 namespace gpu {
17 20
18 using testing::Return; 21 using testing::Return;
19 using testing::Mock; 22 using testing::Mock;
20 using testing::Truly; 23 using testing::Truly;
21 using testing::Sequence; 24 using testing::Sequence;
22 using testing::DoAll; 25 using testing::DoAll;
23 using testing::Invoke; 26 using testing::Invoke;
24 using testing::_; 27 using testing::_;
25 28
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 api_mock_->set_engine(gpu_scheduler_.get()); 60 api_mock_->set_engine(gpu_scheduler_.get());
58 61
59 helper_.reset(new CommandBufferHelper(command_buffer_.get())); 62 helper_.reset(new CommandBufferHelper(command_buffer_.get()));
60 helper_->Initialize(kBufferSize); 63 helper_->Initialize(kBufferSize);
61 } 64 }
62 65
63 int32 GetToken() { 66 int32 GetToken() {
64 return command_buffer_->GetState().token; 67 return command_buffer_->GetState().token;
65 } 68 }
66 69
70 #if defined(OS_MACOSX)
67 base::mac::ScopedNSAutoreleasePool autorelease_pool_; 71 base::mac::ScopedNSAutoreleasePool autorelease_pool_;
72 #endif
68 MessageLoop message_loop_; 73 MessageLoop message_loop_;
69 scoped_ptr<AsyncAPIMock> api_mock_; 74 scoped_ptr<AsyncAPIMock> api_mock_;
70 scoped_ptr<CommandBufferService> command_buffer_; 75 scoped_ptr<CommandBufferService> command_buffer_;
71 scoped_ptr<GpuScheduler> gpu_scheduler_; 76 scoped_ptr<GpuScheduler> gpu_scheduler_;
72 CommandParser* parser_; 77 CommandParser* parser_;
73 scoped_ptr<CommandBufferHelper> helper_; 78 scoped_ptr<CommandBufferHelper> helper_;
74 }; 79 };
75 80
76 #ifndef _MSC_VER 81 #ifndef _MSC_VER
77 const unsigned int MappedMemoryTestBase::kBufferSize; 82 const unsigned int MappedMemoryTestBase::kBufferSize;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 EXPECT_EQ(id1, id2); 299 EXPECT_EQ(id1, id2);
295 EXPECT_NE(id2, id3); 300 EXPECT_NE(id2, id3);
296 EXPECT_EQ(0u, offset1); 301 EXPECT_EQ(0u, offset1);
297 EXPECT_EQ(kSize, offset2); 302 EXPECT_EQ(kSize, offset2);
298 EXPECT_EQ(0u, offset3); 303 EXPECT_EQ(0u, offset3);
299 } 304 }
300 305
301 } // namespace gpu 306 } // namespace gpu
302 307
303 308
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698