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