| 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 // Tests for the Command Buffer Helper. | 5 // Tests for the Command Buffer Helper. |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "gpu/command_buffer/client/cmd_buffer_helper.h" | 10 #include "gpu/command_buffer/client/cmd_buffer_helper.h" |
| 11 #include "gpu/command_buffer/service/command_buffer_service.h" |
| 12 #include "gpu/command_buffer/service/gpu_scheduler.h" |
| 11 #include "gpu/command_buffer/service/mocks.h" | 13 #include "gpu/command_buffer/service/mocks.h" |
| 12 #include "gpu/command_buffer/service/command_buffer_service.h" | |
| 13 #include "gpu/command_buffer/service/transfer_buffer_manager.h" | 14 #include "gpu/command_buffer/service/transfer_buffer_manager.h" |
| 14 #include "gpu/command_buffer/service/gpu_scheduler.h" | |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 #if defined(OS_MACOSX) | 17 #if defined(OS_MACOSX) |
| 18 #include "base/mac/scoped_nsautorelease_pool.h" | 18 #include "base/mac/scoped_nsautorelease_pool.h" |
| 19 #endif | 19 #endif |
| 20 | 20 |
| 21 namespace gpu { | 21 namespace gpu { |
| 22 | 22 |
| 23 using testing::Return; | 23 using testing::Return; |
| 24 using testing::Mock; | 24 using testing::Mock; |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 | 326 |
| 327 TEST_F(CommandBufferHelperTest, IsContextLost) { | 327 TEST_F(CommandBufferHelperTest, IsContextLost) { |
| 328 EXPECT_FALSE(helper_->IsContextLost()); | 328 EXPECT_FALSE(helper_->IsContextLost()); |
| 329 command_buffer_->SetParseError(error::kGenericError); | 329 command_buffer_->SetParseError(error::kGenericError); |
| 330 EXPECT_TRUE(helper_->IsContextLost()); | 330 EXPECT_TRUE(helper_->IsContextLost()); |
| 331 } | 331 } |
| 332 | 332 |
| 333 } // namespace gpu | 333 } // namespace gpu |
| OLD | NEW |