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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation_unittest.cc

Issue 282513003: gpu: Assert that FencedAllocator is empty in destructor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed 64 bit only test Created 6 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Tests for GLES2Implementation. 5 // Tests for GLES2Implementation.
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 3257 matching lines...) Expand 10 before | Expand all | Expand 10 after
3268 EXPECT_EQ(GL_INVALID_OPERATION, CheckError()); 3268 EXPECT_EQ(GL_INVALID_OPERATION, CheckError());
3269 EXPECT_STREQ(kOffsetOverflowMessage, GetLastError().c_str()); 3269 EXPECT_STREQ(kOffsetOverflowMessage, GetLastError().c_str());
3270 3270
3271 // BufferSubData: size 3271 // BufferSubData: size
3272 EXPECT_EQ(GL_NO_ERROR, CheckError()); 3272 EXPECT_EQ(GL_NO_ERROR, CheckError());
3273 gl_->BufferSubData(GL_ARRAY_BUFFER, 0, size, buf); 3273 gl_->BufferSubData(GL_ARRAY_BUFFER, 0, size, buf);
3274 EXPECT_EQ(GL_INVALID_OPERATION, CheckError()); 3274 EXPECT_EQ(GL_INVALID_OPERATION, CheckError());
3275 EXPECT_STREQ(kSizeOverflowMessage, GetLastError().c_str()); 3275 EXPECT_STREQ(kSizeOverflowMessage, GetLastError().c_str());
3276 3276
3277 // Call MapBufferSubDataCHROMIUM() should succeed with legal paramaters. 3277 // Call MapBufferSubDataCHROMIUM() should succeed with legal paramaters.
3278 EXPECT_TRUE(NULL != gl_->MapBufferSubDataCHROMIUM( 3278 void* mem =
3279 GL_ARRAY_BUFFER, 0, 1, GL_WRITE_ONLY)); 3279 gl_->MapBufferSubDataCHROMIUM(GL_ARRAY_BUFFER, 0, 1, GL_WRITE_ONLY);
3280 EXPECT_TRUE(NULL != mem);
3280 EXPECT_EQ(GL_NO_ERROR, CheckError()); 3281 EXPECT_EQ(GL_NO_ERROR, CheckError());
3282 gl_->UnmapBufferSubDataCHROMIUM(mem);
3281 3283
3282 // MapBufferSubDataCHROMIUM: offset 3284 // MapBufferSubDataCHROMIUM: offset
3283 EXPECT_TRUE(NULL == gl_->MapBufferSubDataCHROMIUM( 3285 EXPECT_TRUE(NULL == gl_->MapBufferSubDataCHROMIUM(
3284 GL_ARRAY_BUFFER, offset, 1, GL_WRITE_ONLY)); 3286 GL_ARRAY_BUFFER, offset, 1, GL_WRITE_ONLY));
3285 EXPECT_EQ(GL_INVALID_OPERATION, CheckError()); 3287 EXPECT_EQ(GL_INVALID_OPERATION, CheckError());
3286 EXPECT_STREQ(kOffsetOverflowMessage, GetLastError().c_str()); 3288 EXPECT_STREQ(kOffsetOverflowMessage, GetLastError().c_str());
3287 3289
3288 // MapBufferSubDataCHROMIUM: size 3290 // MapBufferSubDataCHROMIUM: size
3289 EXPECT_EQ(GL_NO_ERROR, CheckError()); 3291 EXPECT_EQ(GL_NO_ERROR, CheckError());
3290 EXPECT_TRUE(NULL == gl_->MapBufferSubDataCHROMIUM( 3292 EXPECT_TRUE(NULL == gl_->MapBufferSubDataCHROMIUM(
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
3373 ContextInitOptions init_options; 3375 ContextInitOptions init_options;
3374 init_options.bind_generates_resource_client = true; 3376 init_options.bind_generates_resource_client = true;
3375 init_options.bind_generates_resource_service = false; 3377 init_options.bind_generates_resource_service = false;
3376 EXPECT_FALSE(Initialize(init_options)); 3378 EXPECT_FALSE(Initialize(init_options));
3377 } 3379 }
3378 3380
3379 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" 3381 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h"
3380 3382
3381 } // namespace gles2 3383 } // namespace gles2
3382 } // namespace gpu 3384 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/fenced_allocator.cc ('k') | gpu/command_buffer/client/mapped_memory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698