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

Side by Side Diff: command_buffer/client/cross/cmd_buffer_helper_test.cc

Issue 332036: move all O3D specific command buffer stuff to command_buffer::o3d... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | command_buffer/client/cross/effect_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 CommandBufferEntry args[2]; 275 CommandBufferEntry args[2];
276 args[0].value_uint32 = 3; 276 args[0].value_uint32 = 3;
277 args[1].value_float = 4.f; 277 args[1].value_float = 4.f;
278 278
279 // Add a first command. 279 // Add a first command.
280 AddCommandWithExpect(parse_error::kParseNoError, 3, 2, args); 280 AddCommandWithExpect(parse_error::kParseNoError, 3, 2, args);
281 // keep track of the buffer position. 281 // keep track of the buffer position.
282 CommandBufferOffset command1_put = get_helper_put(); 282 CommandBufferOffset command1_put = get_helper_put();
283 int32 token = helper_->InsertToken(); 283 int32 token = helper_->InsertToken();
284 284
285 EXPECT_CALL(*api_mock_.get(), DoCommand(kSetToken, 1, _)) 285 EXPECT_CALL(*api_mock_.get(), DoCommand(cmd::kSetToken, 1, _))
286 .WillOnce(DoAll(Invoke(api_mock_.get(), &AsyncAPIMock::SetToken), 286 .WillOnce(DoAll(Invoke(api_mock_.get(), &AsyncAPIMock::SetToken),
287 Return(parse_error::kParseNoError))); 287 Return(parse_error::kParseNoError)));
288 // Add another command. 288 // Add another command.
289 AddCommandWithExpect(parse_error::kParseNoError, 4, 2, args); 289 AddCommandWithExpect(parse_error::kParseNoError, 4, 2, args);
290 helper_->WaitForToken(token); 290 helper_->WaitForToken(token);
291 // check that the get pointer is beyond the first command. 291 // check that the get pointer is beyond the first command.
292 EXPECT_LE(command1_put, command_buffer_->GetGetOffset()); 292 EXPECT_LE(command1_put, command_buffer_->GetGetOffset());
293 helper_->Finish(); 293 helper_->Finish();
294 294
295 // Check that the commands did happen. 295 // Check that the commands did happen.
296 Mock::VerifyAndClearExpectations(api_mock_.get()); 296 Mock::VerifyAndClearExpectations(api_mock_.get());
297 297
298 // Check the error status. 298 // Check the error status.
299 EXPECT_FALSE(command_buffer_->GetErrorStatus()); 299 EXPECT_FALSE(command_buffer_->GetErrorStatus());
300 EXPECT_EQ(parse_error::kParseNoError, command_buffer_->ResetParseError()); 300 EXPECT_EQ(parse_error::kParseNoError, command_buffer_->ResetParseError());
301 } 301 }
302 302
303 } // namespace command_buffer 303 } // namespace command_buffer
304 } // namespace o3d 304 } // namespace o3d
OLDNEW
« no previous file with comments | « no previous file | command_buffer/client/cross/effect_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698