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

Side by Side Diff: command_buffer/service/cross/cmd_buffer_engine_test.cc

Issue 208037: Added command buffer unit tests to gyp.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « command_buffer/command_buffer.gyp ('k') | command_buffer/service/cross/gl/effect_gl.h » ('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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 493
494 CommandBufferOffset fail_get = put; 494 CommandBufferOffset fail_get = put;
495 CommandHeader header; 495 CommandHeader header;
496 header.size = 3; 496 header.size = 3;
497 header.command = 4; 497 header.command = 4;
498 entries[put++].value_header = header; 498 entries[put++].value_header = header;
499 entries[put++].value_uint32 = 5; 499 entries[put++].value_uint32 = 5;
500 entries[put++].value_uint32 = 6; 500 entries[put++].value_uint32 = 6;
501 501
502 // we should be beyond the end of the buffer now. 502 // we should be beyond the end of the buffer now.
503 DCHECK_LT(6, put); 503 DCHECK_LT(6U, put);
504 put = 0; 504 put = 0;
505 505
506 engine()->Put(put); 506 engine()->Put(put);
507 while (get != put) { 507 while (get != put) {
508 // When the parsing stop progressing, break. 508 // When the parsing stop progressing, break.
509 CommandBufferOffset new_get = engine()->WaitGetChanges(get); 509 CommandBufferOffset new_get = engine()->WaitGetChanges(get);
510 if (new_get == get) { 510 if (new_get == get) {
511 EXPECT_EQ(new_get, engine()->Get()); 511 EXPECT_EQ(new_get, engine()->Get());
512 break; 512 break;
513 } 513 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 EXPECT_CALL(*process_mock(), ProcessMessage()).WillOnce(Return(false)); 617 EXPECT_CALL(*process_mock(), ProcessMessage()).WillOnce(Return(false));
618 EXPECT_FALSE(engine()->DoWork()); 618 EXPECT_FALSE(engine()->DoWork());
619 Mock::VerifyAndClearExpectations(process_mock()); 619 Mock::VerifyAndClearExpectations(process_mock());
620 620
621 engine()->CloseConnection(); 621 engine()->CloseConnection();
622 DestroyCommandBuffer(); 622 DestroyCommandBuffer();
623 } 623 }
624 624
625 } // namespace command_buffer 625 } // namespace command_buffer
626 } // namespace o3d 626 } // namespace o3d
OLDNEW
« no previous file with comments | « command_buffer/command_buffer.gyp ('k') | command_buffer/service/cross/gl/effect_gl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698