| 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.h" |
| 10 #include "gpu/command_buffer/client/cmd_buffer_helper.h" | 10 #include "gpu/command_buffer/client/cmd_buffer_helper.h" |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 | 345 |
| 346 TEST_F(CommandBufferHelperTest, Noop) { | 346 TEST_F(CommandBufferHelperTest, Noop) { |
| 347 for (int ii = 1; ii < 4; ++ii) { | 347 for (int ii = 1; ii < 4; ++ii) { |
| 348 CommandBufferOffset put_before = get_helper_put(); | 348 CommandBufferOffset put_before = get_helper_put(); |
| 349 helper_->Noop(ii); | 349 helper_->Noop(ii); |
| 350 CommandBufferOffset put_after = get_helper_put(); | 350 CommandBufferOffset put_after = get_helper_put(); |
| 351 EXPECT_EQ(ii, put_after - put_before); | 351 EXPECT_EQ(ii, put_after - put_before); |
| 352 } | 352 } |
| 353 } | 353 } |
| 354 | 354 |
| 355 TEST_F(CommandBufferHelperTest, IsContextLost) { |
| 356 EXPECT_FALSE(helper_->IsContextLost()); |
| 357 command_buffer_->SetParseError(error::kGenericError); |
| 358 EXPECT_TRUE(helper_->IsContextLost()); |
| 359 } |
| 360 |
| 355 } // namespace gpu | 361 } // namespace gpu |
| OLD | NEW |