| 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/gl2.h> | 9 #include <GLES2/gl2.h> |
| 10 #include <GLES2/gl2ext.h> | 10 #include <GLES2/gl2ext.h> |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 const GLuint GLES2ImplementationTest::kProgramsAndShadersStartId; | 851 const GLuint GLES2ImplementationTest::kProgramsAndShadersStartId; |
| 852 const GLuint GLES2ImplementationTest::kRenderbuffersStartId; | 852 const GLuint GLES2ImplementationTest::kRenderbuffersStartId; |
| 853 const GLuint GLES2ImplementationTest::kSamplersStartId; | 853 const GLuint GLES2ImplementationTest::kSamplersStartId; |
| 854 const GLuint GLES2ImplementationTest::kTexturesStartId; | 854 const GLuint GLES2ImplementationTest::kTexturesStartId; |
| 855 const GLuint GLES2ImplementationTest::kTransformFeedbacksStartId; | 855 const GLuint GLES2ImplementationTest::kTransformFeedbacksStartId; |
| 856 const GLuint GLES2ImplementationTest::kQueriesStartId; | 856 const GLuint GLES2ImplementationTest::kQueriesStartId; |
| 857 const GLuint GLES2ImplementationTest::kVertexArraysStartId; | 857 const GLuint GLES2ImplementationTest::kVertexArraysStartId; |
| 858 #endif | 858 #endif |
| 859 | 859 |
| 860 TEST_F(GLES2ImplementationTest, Basic) { | 860 TEST_F(GLES2ImplementationTest, Basic) { |
| 861 EXPECT_TRUE(gl_->share_group() != NULL); | 861 EXPECT_TRUE(gl_->share_group()); |
| 862 } | 862 } |
| 863 | 863 |
| 864 TEST_F(GLES2ImplementationTest, GetBucketContents) { | 864 TEST_F(GLES2ImplementationTest, GetBucketContents) { |
| 865 const uint32_t kBucketId = GLES2Implementation::kResultBucketId; | 865 const uint32_t kBucketId = GLES2Implementation::kResultBucketId; |
| 866 const uint32_t kTestSize = MaxTransferBufferSize() + 32; | 866 const uint32_t kTestSize = MaxTransferBufferSize() + 32; |
| 867 | 867 |
| 868 std::unique_ptr<uint8_t[]> buf(new uint8_t[kTestSize]); | 868 std::unique_ptr<uint8_t[]> buf(new uint8_t[kTestSize]); |
| 869 uint8_t* expected_data = buf.get(); | 869 uint8_t* expected_data = buf.get(); |
| 870 for (uint32_t ii = 0; ii < kTestSize; ++ii) { | 870 for (uint32_t ii = 0; ii < kTestSize; ++ii) { |
| 871 expected_data[ii] = ii * 3; | 871 expected_data[ii] = ii * 3; |
| (...skipping 3733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4605 ContextInitOptions init_options; | 4605 ContextInitOptions init_options; |
| 4606 init_options.transfer_buffer_initialize_fail = true; | 4606 init_options.transfer_buffer_initialize_fail = true; |
| 4607 EXPECT_FALSE(Initialize(init_options)); | 4607 EXPECT_FALSE(Initialize(init_options)); |
| 4608 } | 4608 } |
| 4609 | 4609 |
| 4610 #include "base/macros.h" | 4610 #include "base/macros.h" |
| 4611 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" | 4611 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" |
| 4612 | 4612 |
| 4613 } // namespace gles2 | 4613 } // namespace gles2 |
| 4614 } // namespace gpu | 4614 } // namespace gpu |
| OLD | NEW |