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

Unified Diff: gpu/command_buffer/client/cmd_buffer_helper_test.cc

Issue 558054: Renamed ParseError -> Error, parse_error -> error, kParseNoError -> kNoError,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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/client/cmd_buffer_helper.cc ('k') | gpu/command_buffer/client/fenced_allocator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/cmd_buffer_helper_test.cc
===================================================================
--- gpu/command_buffer/client/cmd_buffer_helper_test.cc (revision 37750)
+++ gpu/command_buffer/client/cmd_buffer_helper_test.cc (working copy)
@@ -36,7 +36,7 @@
// ignore noops in the mock - we don't want to inspect the internals of the
// helper.
EXPECT_CALL(*api_mock_, DoCommand(0, _, _))
- .WillRepeatedly(Return(parse_error::kParseNoError));
+ .WillRepeatedly(Return(error::kNoError));
command_buffer_.reset(new CommandBufferService);
command_buffer_->Initialize(kNumCommandEntries);
@@ -68,7 +68,7 @@
// Adds a command to the buffer through the helper, while adding it as an
// expected call on the API mock.
- void AddCommandWithExpect(parse_error::ParseError _return,
+ void AddCommandWithExpect(error::Error _return,
unsigned int command,
int arg_count,
CommandBufferEntry *args) {
@@ -119,7 +119,7 @@
return command_buffer_->GetState().put_offset;
}
- parse_error::ParseError GetError() {
+ error::Error GetError() {
return command_buffer_->GetState().error;
}
@@ -140,21 +140,21 @@
// Check initial state of the engine - it should have been configured by the
// helper.
EXPECT_TRUE(parser_ != NULL);
- EXPECT_EQ(parse_error::kParseNoError, GetError());
+ EXPECT_EQ(error::kNoError, GetError());
EXPECT_EQ(0, GetGetOffset());
// Add 3 commands through the helper
- AddCommandWithExpect(parse_error::kParseNoError, 1, 0, NULL);
+ AddCommandWithExpect(error::kNoError, 1, 0, NULL);
CommandBufferEntry args1[2];
args1[0].value_uint32 = 3;
args1[1].value_float = 4.f;
- AddCommandWithExpect(parse_error::kParseNoError, 2, 2, args1);
+ AddCommandWithExpect(error::kNoError, 2, 2, args1);
CommandBufferEntry args2[2];
args2[0].value_uint32 = 5;
args2[1].value_float = 6.f;
- AddCommandWithExpect(parse_error::kParseNoError, 3, 2, args2);
+ AddCommandWithExpect(error::kNoError, 3, 2, args2);
helper_->Flush();
// Check that the engine has work to do now.
@@ -169,7 +169,7 @@
Mock::VerifyAndClearExpectations(api_mock_.get());
// Check the error status.
- EXPECT_EQ(parse_error::kParseNoError, GetError());
+ EXPECT_EQ(error::kNoError, GetError());
}
// Checks that commands in the buffer are properly executed when wrapping the
@@ -181,7 +181,7 @@
args1[1].value_float = 4.f;
for (unsigned int i = 0; i < 5; ++i) {
- AddCommandWithExpect(parse_error::kParseNoError, i + 1, 2, args1);
+ AddCommandWithExpect(error::kNoError, i + 1, 2, args1);
}
helper_->Finish();
@@ -189,7 +189,7 @@
Mock::VerifyAndClearExpectations(api_mock_.get());
// Check the error status.
- EXPECT_EQ(parse_error::kParseNoError, GetError());
+ EXPECT_EQ(error::kNoError, GetError());
}
// Checks that asking for available entries work, and that the parser
@@ -200,10 +200,10 @@
args[1].value_float = 4.f;
// Add 2 commands through the helper - 8 entries
- AddCommandWithExpect(parse_error::kParseNoError, 1, 0, NULL);
- AddCommandWithExpect(parse_error::kParseNoError, 2, 0, NULL);
- AddCommandWithExpect(parse_error::kParseNoError, 3, 2, args);
- AddCommandWithExpect(parse_error::kParseNoError, 4, 2, args);
+ AddCommandWithExpect(error::kNoError, 1, 0, NULL);
+ AddCommandWithExpect(error::kNoError, 2, 0, NULL);
+ AddCommandWithExpect(error::kNoError, 3, 2, args);
+ AddCommandWithExpect(error::kNoError, 4, 2, args);
// Ask for 5 entries.
helper_->WaitForAvailableEntries(5);
@@ -212,7 +212,7 @@
CheckFreeSpace(put, 5);
// Add more commands.
- AddCommandWithExpect(parse_error::kParseNoError, 5, 2, args);
+ AddCommandWithExpect(error::kNoError, 5, 2, args);
// Wait until everything is done done.
helper_->Finish();
@@ -221,7 +221,7 @@
Mock::VerifyAndClearExpectations(api_mock_.get());
// Check the error status.
- EXPECT_EQ(parse_error::kParseNoError, GetError());
+ EXPECT_EQ(error::kNoError, GetError());
}
// Checks that the InsertToken/WaitForToken work.
@@ -231,16 +231,16 @@
args[1].value_float = 4.f;
// Add a first command.
- AddCommandWithExpect(parse_error::kParseNoError, 3, 2, args);
+ AddCommandWithExpect(error::kNoError, 3, 2, args);
// keep track of the buffer position.
CommandBufferOffset command1_put = get_helper_put();
int32 token = helper_->InsertToken();
EXPECT_CALL(*api_mock_.get(), DoCommand(cmd::kSetToken, 1, _))
.WillOnce(DoAll(Invoke(api_mock_.get(), &AsyncAPIMock::SetToken),
- Return(parse_error::kParseNoError)));
+ Return(error::kNoError)));
// Add another command.
- AddCommandWithExpect(parse_error::kParseNoError, 4, 2, args);
+ AddCommandWithExpect(error::kNoError, 4, 2, args);
helper_->WaitForToken(token);
// check that the get pointer is beyond the first command.
EXPECT_LE(command1_put, GetGetOffset());
@@ -250,7 +250,7 @@
Mock::VerifyAndClearExpectations(api_mock_.get());
// Check the error status.
- EXPECT_EQ(parse_error::kParseNoError, GetError());
+ EXPECT_EQ(error::kNoError, GetError());
}
} // namespace gpu
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper.cc ('k') | gpu/command_buffer/client/fenced_allocator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698