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

Side by Side Diff: gpu/command_buffer/service/cmd_parser_test.cc

Issue 465040: Added CommandBufferClient, CommandBufferStub and some IPC messages.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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
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 21 matching lines...) Expand all
32 32
33 // Tests for the command parser. 33 // Tests for the command parser.
34 34
35 #include "gpu/command_buffer/service/precompile.h" 35 #include "gpu/command_buffer/service/precompile.h"
36 36
37 #include "base/scoped_ptr.h" 37 #include "base/scoped_ptr.h"
38 #include "gpu/command_buffer/service/cmd_parser.h" 38 #include "gpu/command_buffer/service/cmd_parser.h"
39 #include "gpu/command_buffer/service/mocks.h" 39 #include "gpu/command_buffer/service/mocks.h"
40 #include "testing/gtest/include/gtest/gtest.h" 40 #include "testing/gtest/include/gtest/gtest.h"
41 41
42 namespace command_buffer { 42 namespace gpu {
43 43
44 using testing::Return; 44 using testing::Return;
45 using testing::Mock; 45 using testing::Mock;
46 using testing::Truly; 46 using testing::Truly;
47 using testing::Sequence; 47 using testing::Sequence;
48 using testing::_; 48 using testing::_;
49 49
50 // Test fixture for CommandParser test - Creates a mock AsyncAPIInterface, and 50 // Test fixture for CommandParser test - Creates a mock AsyncAPIInterface, and
51 // a fixed size memory buffer. Also provides a simple API to create a 51 // a fixed size memory buffer. Also provides a simple API to create a
52 // CommandParser. 52 // CommandParser.
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 // correctly. 306 // correctly.
307 EXPECT_EQ(put_post_fail, parser->get()); 307 EXPECT_EQ(put_post_fail, parser->get());
308 Mock::VerifyAndClearExpectations(api_mock()); 308 Mock::VerifyAndClearExpectations(api_mock());
309 // make the second one succeed, and check that the parser recovered fine. 309 // make the second one succeed, and check that the parser recovered fine.
310 AddDoCommandExpect(parse_error::kParseNoError, 4, 0, NULL); 310 AddDoCommandExpect(parse_error::kParseNoError, 4, 0, NULL);
311 EXPECT_EQ(parse_error::kParseNoError, parser->ProcessAllCommands()); 311 EXPECT_EQ(parse_error::kParseNoError, parser->ProcessAllCommands());
312 EXPECT_EQ(put, parser->get()); 312 EXPECT_EQ(put, parser->get());
313 Mock::VerifyAndClearExpectations(api_mock()); 313 Mock::VerifyAndClearExpectations(api_mock());
314 } 314 }
315 315
316 } // namespace command_buffer 316 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/cmd_parser.cc ('k') | gpu/command_buffer/service/command_buffer_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698