Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Unified Diff: gpu/command_buffer/service/texture_manager_unittest.cc

Issue 3150026: Fixes for the default texture.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/texture_manager.cc ('k') | gpu/gpu.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_manager_unittest.cc
===================================================================
--- gpu/command_buffer/service/texture_manager_unittest.cc (revision 57082)
+++ gpu/command_buffer/service/texture_manager_unittest.cc (working copy)
@@ -7,8 +7,10 @@
#include "app/gfx/gl/gl_mock.h"
#include "gpu/GLES2/gles2_command_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "gpu/command_buffer/service/test_helper.h"
using ::testing::Pointee;
+using ::testing::_;
namespace gpu {
namespace gles2 {
@@ -20,6 +22,12 @@
static const GLint kMax2dLevels = 5;
static const GLint kMaxCubeMapLevels = 4;
+ static const GLuint kServiceBlackTexture2dId = 701;
+ static const GLuint kServiceBlackTextureCubemapId = 702;
+ static const GLuint kServiceDefaultTexture2dId = 703;
+ static const GLuint kServiceDefaultTextureCubemapId = 704;
+
+
TextureManagerTest()
: manager_(false, false, false, kMaxTextureSize, kMaxCubeMapTextureSize) {
}
@@ -32,6 +40,9 @@
virtual void SetUp() {
gl_.reset(new ::testing::StrictMock< ::gfx::MockGLInterface>());
::gfx::GLInterface::SetGLInterface(gl_.get());
+
+ TestHelper::SetupTextureManagerInitExpectations(gl_.get());
+ manager_.Initialize();
}
virtual void TearDown() {
@@ -50,6 +61,10 @@
const GLint TextureManagerTest::kMaxCubeMapTextureSize;
const GLint TextureManagerTest::kMax2dLevels;
const GLint TextureManagerTest::kMaxCubeMapLevels;
+const GLuint TextureManagerTest::kServiceBlackTexture2dId;
+const GLuint TextureManagerTest::kServiceBlackTextureCubemapId;
+const GLuint TextureManagerTest::kServiceDefaultTexture2dId;
+const GLuint TextureManagerTest::kServiceDefaultTextureCubemapId;
#endif
TEST_F(TextureManagerTest, Basic) {
@@ -87,6 +102,9 @@
EXPECT_CALL(*gl_, DeleteTextures(1, ::testing::Pointee(kService1Id)))
.Times(1)
.RetiresOnSaturation();
+ EXPECT_CALL(*gl_, DeleteTextures(4, _))
+ .Times(1)
+ .RetiresOnSaturation();
manager_.Destroy(true);
// Check that resources got freed.
info1 = manager_.GetTextureInfo(kClient1Id);
« no previous file with comments | « gpu/command_buffer/service/texture_manager.cc ('k') | gpu/gpu.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698