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

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

Issue 555129: Add commands Jump, Call and Return... (Closed) Base URL: svn://svn.chromium.org/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/common/cmd_buffer_common.h » ('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 37239)
+++ gpu/command_buffer/client/cmd_buffer_helper_test.cc (working copy)
@@ -35,7 +35,7 @@
api_mock_.reset(new AsyncAPIMock);
// ignore noops in the mock - we don't want to inspect the internals of the
// helper.
- EXPECT_CALL(*api_mock_, DoCommand(0, 0, _))
+ EXPECT_CALL(*api_mock_, DoCommand(0, _, _))
.WillRepeatedly(Return(parse_error::kParseNoError));
command_buffer_.reset(new CommandBufferService);
@@ -70,9 +70,18 @@
// expected call on the API mock.
void AddCommandWithExpect(parse_error::ParseError _return,
unsigned int command,
- unsigned int arg_count,
+ int arg_count,
CommandBufferEntry *args) {
- helper_->AddCommand(command, arg_count, args);
+ CommandHeader header;
+ header.size = arg_count + 1;
+ header.command = command;
+ CommandBufferEntry* cmds = helper_->GetSpace(arg_count + 1);
+ CommandBufferOffset put = 0;
+ cmds[put++].value_header = header;
+ for (int ii = 0; ii < arg_count; ++ii) {
+ cmds[put++] = args[ii];
+ }
+
EXPECT_CALL(*api_mock_, DoCommand(command, arg_count,
Truly(AsyncAPIMock::IsArgs(arg_count, args))))
.InSequence(sequence_)
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper.cc ('k') | gpu/command_buffer/common/cmd_buffer_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698