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

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

Issue 212018: Change command buffer client code to use structures.... (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
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 param.current_value = 34; 144 param.current_value = 34;
145 param.rpc_message_id = 21; 145 param.rpc_message_id = 21;
146 buffer_rpc_impl()->DoCall(BufferRPCImpl::SIGNAL_GET_CHANGES, &param, 146 buffer_rpc_impl()->DoCall(BufferRPCImpl::SIGNAL_GET_CHANGES, &param,
147 sizeof(param), NULL, 0); 147 sizeof(param), NULL, 0);
148 } 148 }
149 149
150 // Checks that the GET_STATUS RPC is properly parsed and that the return value 150 // Checks that the GET_STATUS RPC is properly parsed and that the return value
151 // is properly forwarded. 151 // is properly forwarded.
152 TEST_F(BufferRPCImplTest, TestGetStatus) { 152 TEST_F(BufferRPCImplTest, TestGetStatus) {
153 EXPECT_CALL(buffer_sync_mock(), GetStatus()) 153 EXPECT_CALL(buffer_sync_mock(), GetStatus())
154 .WillOnce(Return(BufferSyncInterface::PARSE_ERROR)); 154 .WillOnce(Return(BufferSyncInterface::kParseError));
155 EXPECT_EQ(BufferSyncInterface::PARSE_ERROR, 155 EXPECT_EQ(BufferSyncInterface::kParseError,
156 buffer_rpc_impl()->DoCall(BufferRPCImpl::GET_STATUS, NULL, 0, NULL, 156 buffer_rpc_impl()->DoCall(BufferRPCImpl::GET_STATUS, NULL, 0, NULL,
157 0)); 157 0));
158 } 158 }
159 159
160 // Checks that the GET_STATUS RPC is properly parsed and that the return value 160 // Checks that the GET_STATUS RPC is properly parsed and that the return value
161 // is properly forwarded. 161 // is properly forwarded.
162 TEST_F(BufferRPCImplTest, TestGetParseError) { 162 TEST_F(BufferRPCImplTest, TestGetParseError) {
163 EXPECT_CALL(buffer_sync_mock(), GetParseError()) 163 EXPECT_CALL(buffer_sync_mock(), GetParseError())
164 .WillOnce(Return(BufferSyncInterface::PARSE_OUT_OF_BOUNDS)); 164 .WillOnce(Return(BufferSyncInterface::kParseOutOfBounds));
165 EXPECT_EQ(BufferSyncInterface::PARSE_OUT_OF_BOUNDS, 165 EXPECT_EQ(BufferSyncInterface::kParseOutOfBounds,
166 buffer_rpc_impl()->DoCall(BufferRPCImpl::GET_PARSE_ERROR, NULL, 0, 166 buffer_rpc_impl()->DoCall(BufferRPCImpl::GET_PARSE_ERROR, NULL, 0,
167 NULL, 0)); 167 NULL, 0));
168 } 168 }
169 169
170 } // namespace command_buffer 170 } // namespace command_buffer
171 } // namespace o3d 171 } // namespace o3d
OLDNEW
« no previous file with comments | « command_buffer/samples/bubble/bubble_module.cc ('k') | command_buffer/service/cross/cmd_buffer_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698