OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
13 #include "gpu/command_buffer/common/cmd_buffer_common.h" | 13 #include "gpu/command_buffer/common/cmd_buffer_common.h" |
14 #include "gpu/command_buffer/service/command_buffer_service.h" | 14 #include "gpu/command_buffer/service/command_buffer_service.h" |
15 #include "gpu/command_buffer/service/transfer_buffer_manager.h" | 15 #include "gpu/command_buffer/service/transfer_buffer_manager.h" |
16 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 using base::SharedMemory; | 19 using base::SharedMemory; |
20 using testing::_; | 20 using testing::_; |
21 using testing::DoAll; | 21 using testing::DoAll; |
22 using testing::Return; | 22 using testing::Return; |
23 using testing::SetArgumentPointee; | 23 using testing::SetArgPointee; |
24 using testing::StrictMock; | 24 using testing::StrictMock; |
25 | 25 |
26 namespace gpu { | 26 namespace gpu { |
27 | 27 |
28 class CommandBufferServiceTest : public testing::Test { | 28 class CommandBufferServiceTest : public testing::Test { |
29 protected: | 29 protected: |
30 void SetUp() override { | 30 void SetUp() override { |
31 { | 31 { |
32 TransferBufferManager* manager = new TransferBufferManager(nullptr); | 32 TransferBufferManager* manager = new TransferBufferManager(nullptr); |
33 transfer_buffer_manager_ = manager; | 33 transfer_buffer_manager_ = manager; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 TEST_F(CommandBufferServiceTest, DefaultParseErrorIsNoError) { | 145 TEST_F(CommandBufferServiceTest, DefaultParseErrorIsNoError) { |
146 EXPECT_EQ(0, GetError()); | 146 EXPECT_EQ(0, GetError()); |
147 } | 147 } |
148 | 148 |
149 TEST_F(CommandBufferServiceTest, CanSetParseError) { | 149 TEST_F(CommandBufferServiceTest, CanSetParseError) { |
150 command_buffer_->SetParseError(error::kInvalidSize); | 150 command_buffer_->SetParseError(error::kInvalidSize); |
151 EXPECT_EQ(1, GetError()); | 151 EXPECT_EQ(1, GetError()); |
152 } | 152 } |
153 } // namespace gpu | 153 } // namespace gpu |
OLD | NEW |