| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Include gtest.h out of order because <X11/X.h> #define's Bool & None, which | |
| 6 // gtest uses as struct names (inside a namespace). This means that | |
| 7 // #include'ing gtest after anything that pulls in X.h fails to compile. | |
| 8 // This is http://code.google.com/p/googletest/issues/detail?id=371 | |
| 9 #include "testing/gtest/include/gtest/gtest.h" | |
| 10 #include "gpu/command_buffer/service/vertex_attrib_manager.h" | 5 #include "gpu/command_buffer/service/vertex_attrib_manager.h" |
| 11 | 6 |
| 12 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 13 #include "gpu/command_buffer/common/gl_mock.h" | 8 #include "gpu/command_buffer/common/gl_mock.h" |
| 14 #include "gpu/command_buffer/service/feature_info.h" | 9 #include "gpu/command_buffer/service/feature_info.h" |
| 15 #include "gpu/command_buffer/service/test_helper.h" | 10 #include "gpu/command_buffer/service/test_helper.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 12 |
| 17 using ::testing::Pointee; | 13 using ::testing::Pointee; |
| 18 using ::testing::_; | 14 using ::testing::_; |
| 19 | 15 |
| 20 namespace gpu { | 16 namespace gpu { |
| 21 namespace gles2 { | 17 namespace gles2 { |
| 22 | 18 |
| 23 class VertexAttribManagerTest : public testing::Test { | 19 class VertexAttribManagerTest : public testing::Test { |
| 24 public: | 20 public: |
| 25 static const uint32 kNumVertexAttribs = 8; | 21 static const uint32 kNumVertexAttribs = 8; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 EXPECT_TRUE(info->CanAccess(1)); | 169 EXPECT_TRUE(info->CanAccess(1)); |
| 174 manager_.SetAttribInfo(1, buffer, 4, GL_FLOAT, GL_FALSE, 0, 20, 0); | 170 manager_.SetAttribInfo(1, buffer, 4, GL_FLOAT, GL_FALSE, 0, 20, 0); |
| 175 EXPECT_TRUE(info->CanAccess(0)); | 171 EXPECT_TRUE(info->CanAccess(0)); |
| 176 EXPECT_FALSE(info->CanAccess(1)); | 172 EXPECT_FALSE(info->CanAccess(1)); |
| 177 | 173 |
| 178 buffer_manager.Destroy(false); | 174 buffer_manager.Destroy(false); |
| 179 } | 175 } |
| 180 | 176 |
| 181 } // namespace gles2 | 177 } // namespace gles2 |
| 182 } // namespace gpu | 178 } // namespace gpu |
| 179 |
| 180 |
| OLD | NEW |