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/shader_manager.h" | 10 #include "gpu/command_buffer/service/shader_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/mocks.h" | 14 #include "gpu/command_buffer/service/mocks.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | |
11 | 15 |
12 using ::testing::Return; | 16 using ::testing::Return; |
13 using ::testing::ReturnRef; | 17 using ::testing::ReturnRef; |
14 | 18 |
15 namespace gpu { | 19 namespace gpu { |
16 namespace gles2 { | 20 namespace gles2 { |
17 | 21 |
18 class ShaderManagerTest : public testing::Test { | 22 class ShaderManagerTest : public testing::Test { |
19 public: | 23 public: |
20 ShaderManagerTest() { | 24 ShaderManagerTest() { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 EXPECT_FALSE(info1->InUse()); | 239 EXPECT_FALSE(info1->InUse()); |
236 info2 = manager_.GetShaderInfo(kClient1Id); | 240 info2 = manager_.GetShaderInfo(kClient1Id); |
237 EXPECT_EQ(info1, info2); | 241 EXPECT_EQ(info1, info2); |
238 manager_.MarkAsDeleted(info1); // this should delete the shader. | 242 manager_.MarkAsDeleted(info1); // this should delete the shader. |
239 info2 = manager_.GetShaderInfo(kClient1Id); | 243 info2 = manager_.GetShaderInfo(kClient1Id); |
240 EXPECT_TRUE(info2 == NULL); | 244 EXPECT_TRUE(info2 == NULL); |
241 } | 245 } |
242 | 246 |
243 } // namespace gles2 | 247 } // namespace gles2 |
244 } // namespace gpu | 248 } // namespace gpu |
245 | |
246 | |
OLD | NEW |