| 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 // This file contains the tests for the CommandBufferSharedState class. | 5 // This file contains the tests for the CommandBufferSharedState class. |
| 6 | 6 |
| 7 #include "gpu/command_buffer/common/command_buffer_shared.h" | 7 #include "gpu/command_buffer/common/command_buffer_shared.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 namespace gpu { | 13 namespace gpu { |
| 14 | 14 |
| 15 class CommandBufferSharedTest : public testing::Test { | 15 class CommandBufferSharedTest : public testing::Test { |
| 16 protected: | 16 protected: |
| 17 | 17 void SetUp() override { |
| 18 virtual void SetUp() { | |
| 19 shared_state_.reset(new CommandBufferSharedState()); | 18 shared_state_.reset(new CommandBufferSharedState()); |
| 20 shared_state_->Initialize(); | 19 shared_state_->Initialize(); |
| 21 } | 20 } |
| 22 | 21 |
| 23 scoped_ptr<CommandBufferSharedState> shared_state_; | 22 scoped_ptr<CommandBufferSharedState> shared_state_; |
| 24 }; | 23 }; |
| 25 | 24 |
| 26 TEST_F(CommandBufferSharedTest, TestBasic) { | 25 TEST_F(CommandBufferSharedTest, TestBasic) { |
| 27 CommandBuffer::State state; | 26 CommandBuffer::State state; |
| 28 | 27 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 EXPECT_EQ(state.error, state.get_offset + 2); | 86 EXPECT_EQ(state.error, state.get_offset + 2); |
| 88 | 87 |
| 89 if (state.get_offset == kSize) | 88 if (state.get_offset == kSize) |
| 90 break; | 89 break; |
| 91 } | 90 } |
| 92 } | 91 } |
| 93 } | 92 } |
| 94 | 93 |
| 95 } // namespace gpu | 94 } // namespace gpu |
| 96 | 95 |
| OLD | NEW |