| 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 GLES2Implementation. | 5 // Tests for GLES2Implementation. |
| 6 | 6 |
| 7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 8 | 8 |
| 9 #include <GLES2/gl2ext.h> | 9 #include <GLES2/gl2ext.h> |
| 10 #include "gpu/command_buffer/client/client_test_helper.h" | 10 #include "gpu/command_buffer/client/client_test_helper.h" |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 int token_; | 474 int token_; |
| 475 }; | 475 }; |
| 476 | 476 |
| 477 void GLES2ImplementationTest::SetUp() { | 477 void GLES2ImplementationTest::SetUp() { |
| 478 Initialize(false, true); | 478 Initialize(false, true); |
| 479 } | 479 } |
| 480 | 480 |
| 481 void GLES2ImplementationTest::TearDown() { | 481 void GLES2ImplementationTest::TearDown() { |
| 482 Mock::VerifyAndClear(gl_.get()); | 482 Mock::VerifyAndClear(gl_.get()); |
| 483 EXPECT_CALL(*command_buffer(), OnFlush()).Times(AnyNumber()); | 483 EXPECT_CALL(*command_buffer(), OnFlush()).Times(AnyNumber()); |
| 484 // For command buffer. |
| 485 EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) |
| 486 .Times(1) |
| 487 .RetiresOnSaturation(); |
| 484 gl_.reset(); | 488 gl_.reset(); |
| 485 } | 489 } |
| 486 | 490 |
| 487 class GLES2ImplementationStrictSharedTest : public GLES2ImplementationTest { | 491 class GLES2ImplementationStrictSharedTest : public GLES2ImplementationTest { |
| 488 protected: | 492 protected: |
| 489 virtual void SetUp() OVERRIDE; | 493 virtual void SetUp() OVERRIDE; |
| 490 }; | 494 }; |
| 491 | 495 |
| 492 void GLES2ImplementationStrictSharedTest::SetUp() { | 496 void GLES2ImplementationStrictSharedTest::SetUp() { |
| 493 Initialize(true, false); | 497 Initialize(true, false); |
| (...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2617 gl_->GetQueryObjectuivEXT(id, GL_QUERY_RESULT_EXT, &result); | 2621 gl_->GetQueryObjectuivEXT(id, GL_QUERY_RESULT_EXT, &result); |
| 2618 EXPECT_TRUE(NoCommandsWritten()); | 2622 EXPECT_TRUE(NoCommandsWritten()); |
| 2619 EXPECT_EQ(static_cast<GLuint>(GL_INVALID_ENUM), result); | 2623 EXPECT_EQ(static_cast<GLuint>(GL_INVALID_ENUM), result); |
| 2620 } | 2624 } |
| 2621 | 2625 |
| 2622 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" | 2626 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" |
| 2623 | 2627 |
| 2624 } // namespace gles2 | 2628 } // namespace gles2 |
| 2625 } // namespace gpu | 2629 } // namespace gpu |
| 2626 | 2630 |
| OLD | NEW |