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

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

Issue 5525001: Check offset argument to gpu::gles2::BufferManager::BufferInfo::SetRange is n... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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
Index: gpu/command_buffer/service/buffer_manager_unittest.cc
===================================================================
--- gpu/command_buffer/service/buffer_manager_unittest.cc (revision 67888)
+++ gpu/command_buffer/service/buffer_manager_unittest.cc (working copy)
@@ -99,6 +99,8 @@
EXPECT_TRUE(info->SetRange(sizeof(data), 0, data));
EXPECT_FALSE(info->SetRange(sizeof(data), 1, data));
EXPECT_FALSE(info->SetRange(0, sizeof(data) + 1, data));
+ EXPECT_FALSE(info->SetRange(-1, sizeof(data), data));
+ EXPECT_FALSE(info->SetRange(0, -1, data));
}
TEST_F(BufferManagerTest, GetRange) {
@@ -117,6 +119,8 @@
EXPECT_EQ(buf + 1, buf1);
EXPECT_TRUE(info->GetRange(sizeof(data), 1) == NULL);
EXPECT_TRUE(info->GetRange(0, sizeof(data) + 1) == NULL);
+ EXPECT_TRUE(info->GetRange(-1, sizeof(data)) == NULL);
+ EXPECT_TRUE(info->GetRange(-0, -1) == NULL);
}
TEST_F(BufferManagerTest, GetMaxValueForRangeUint8) {
« gpu/command_buffer/build_gles2_cmd_buffer.py ('K') | « gpu/command_buffer/service/buffer_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698