| 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" |
| 5 #include "gpu/command_buffer/service/vertex_attrib_manager.h" | 10 #include "gpu/command_buffer/service/vertex_attrib_manager.h" |
| 6 | 11 |
| 7 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 8 #include "gpu/command_buffer/common/gl_mock.h" | 13 #include "gpu/command_buffer/common/gl_mock.h" |
| 9 #include "gpu/command_buffer/service/feature_info.h" | 14 #include "gpu/command_buffer/service/feature_info.h" |
| 10 #include "gpu/command_buffer/service/test_helper.h" | 15 #include "gpu/command_buffer/service/test_helper.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | |
| 12 | 16 |
| 13 using ::testing::Pointee; | 17 using ::testing::Pointee; |
| 14 using ::testing::_; | 18 using ::testing::_; |
| 15 | 19 |
| 16 namespace gpu { | 20 namespace gpu { |
| 17 namespace gles2 { | 21 namespace gles2 { |
| 18 | 22 |
| 19 class VertexAttribManagerTest : public testing::Test { | 23 class VertexAttribManagerTest : public testing::Test { |
| 20 public: | 24 public: |
| 21 static const uint32 kNumVertexAttribs = 8; | 25 static const uint32 kNumVertexAttribs = 8; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 EXPECT_TRUE(info->CanAccess(1)); | 173 EXPECT_TRUE(info->CanAccess(1)); |
| 170 manager_.SetAttribInfo(1, buffer, 4, GL_FLOAT, GL_FALSE, 0, 20, 0); | 174 manager_.SetAttribInfo(1, buffer, 4, GL_FLOAT, GL_FALSE, 0, 20, 0); |
| 171 EXPECT_TRUE(info->CanAccess(0)); | 175 EXPECT_TRUE(info->CanAccess(0)); |
| 172 EXPECT_FALSE(info->CanAccess(1)); | 176 EXPECT_FALSE(info->CanAccess(1)); |
| 173 | 177 |
| 174 buffer_manager.Destroy(false); | 178 buffer_manager.Destroy(false); |
| 175 } | 179 } |
| 176 | 180 |
| 177 } // namespace gles2 | 181 } // namespace gles2 |
| 178 } // namespace gpu | 182 } // namespace gpu |
| 179 | |
| 180 | |
| OLD | NEW |