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/texture_manager.h" | 5 #include "gpu/command_buffer/service/texture_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 TextureManagerTest : public testing::Test { | 19 class TextureManagerTest : public testing::Test { |
24 public: | 20 public: |
25 static const GLint kMaxTextureSize = 16; | 21 static const GLint kMaxTextureSize = 16; |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 TextureManager::TextureInfo* info = manager_.GetTextureInfo(kClient1Id); | 720 TextureManager::TextureInfo* info = manager_.GetTextureInfo(kClient1Id); |
725 ASSERT_TRUE(info != NULL); | 721 ASSERT_TRUE(info != NULL); |
726 manager.SetInfoTarget(info, GL_TEXTURE_EXTERNAL_OES); | 722 manager.SetInfoTarget(info, GL_TEXTURE_EXTERNAL_OES); |
727 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_EXTERNAL_OES), info->target()); | 723 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_EXTERNAL_OES), info->target()); |
728 EXPECT_FALSE(info->CanGenerateMipmaps(&feature_info)); | 724 EXPECT_FALSE(info->CanGenerateMipmaps(&feature_info)); |
729 manager.Destroy(false); | 725 manager.Destroy(false); |
730 } | 726 } |
731 | 727 |
732 } // namespace gles2 | 728 } // namespace gles2 |
733 } // namespace gpu | 729 } // namespace gpu |
| 730 |
| 731 |
OLD | NEW |