| 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/texture_manager.h" | 10 #include "gpu/command_buffer/service/texture_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 TextureManagerTest : public testing::Test { | 23 class TextureManagerTest : public testing::Test { |
| 20 public: | 24 public: |
| 21 static const GLint kMaxTextureSize = 16; | 25 static const GLint kMaxTextureSize = 16; |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 TextureManager::TextureInfo* info = manager_.GetTextureInfo(kClient1Id); | 696 TextureManager::TextureInfo* info = manager_.GetTextureInfo(kClient1Id); |
| 693 ASSERT_TRUE(info != NULL); | 697 ASSERT_TRUE(info != NULL); |
| 694 manager.SetInfoTarget(info, GL_TEXTURE_EXTERNAL_OES); | 698 manager.SetInfoTarget(info, GL_TEXTURE_EXTERNAL_OES); |
| 695 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_EXTERNAL_OES), info->target()); | 699 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_EXTERNAL_OES), info->target()); |
| 696 EXPECT_FALSE(info->CanGenerateMipmaps(&feature_info)); | 700 EXPECT_FALSE(info->CanGenerateMipmaps(&feature_info)); |
| 697 manager.Destroy(false); | 701 manager.Destroy(false); |
| 698 } | 702 } |
| 699 | 703 |
| 700 } // namespace gles2 | 704 } // namespace gles2 |
| 701 } // namespace gpu | 705 } // namespace gpu |
| 702 | |
| 703 | |
| OLD | NEW |