| OLD | NEW |
| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 expect.handle_count = 0; | 222 expect.handle_count = 0; |
| 223 server_mock()->AddSendCallExpect(expect); | 223 server_mock()->AddSendCallExpect(expect); |
| 224 | 224 |
| 225 proxy()->SignalGetChanges(3141, 5926); | 225 proxy()->SignalGetChanges(3141, 5926); |
| 226 } | 226 } |
| 227 | 227 |
| 228 // Tests the implementation of GetStatus, checking that it sends the correct | 228 // Tests the implementation of GetStatus, checking that it sends the correct |
| 229 // message and returns the correct value. | 229 // message and returns the correct value. |
| 230 TEST_F(BufferSyncProxyTest, TestGetStatus) { | 230 TEST_F(BufferSyncProxyTest, TestGetStatus) { |
| 231 RPCSendInterfaceMock::SendCallExpect expect; | 231 RPCSendInterfaceMock::SendCallExpect expect; |
| 232 expect._return = BufferSyncInterface::PARSING; | 232 expect._return = BufferSyncInterface::kParsing; |
| 233 expect.message_id = BufferRPCImpl::GET_STATUS; | 233 expect.message_id = BufferRPCImpl::GET_STATUS; |
| 234 expect.data = NULL; | 234 expect.data = NULL; |
| 235 expect.size = 0; | 235 expect.size = 0; |
| 236 expect.handles = NULL; | 236 expect.handles = NULL; |
| 237 expect.handle_count = 0; | 237 expect.handle_count = 0; |
| 238 server_mock()->AddSendCallExpect(expect); | 238 server_mock()->AddSendCallExpect(expect); |
| 239 | 239 |
| 240 EXPECT_EQ(BufferSyncInterface::PARSING, proxy()->GetStatus()); | 240 EXPECT_EQ(BufferSyncInterface::kParsing, proxy()->GetStatus()); |
| 241 } | 241 } |
| 242 | 242 |
| 243 // Tests the implementation of GetParseError, checking that it sends the correct | 243 // Tests the implementation of GetParseError, checking that it sends the correct |
| 244 // message and returns the correct value. | 244 // message and returns the correct value. |
| 245 TEST_F(BufferSyncProxyTest, TestGetParseError) { | 245 TEST_F(BufferSyncProxyTest, TestGetParseError) { |
| 246 RPCSendInterfaceMock::SendCallExpect expect; | 246 RPCSendInterfaceMock::SendCallExpect expect; |
| 247 expect._return = BufferSyncInterface::PARSE_UNKNOWN_COMMAND; | 247 expect._return = BufferSyncInterface::kParseUnknownCommand; |
| 248 expect.message_id = BufferRPCImpl::GET_PARSE_ERROR; | 248 expect.message_id = BufferRPCImpl::GET_PARSE_ERROR; |
| 249 expect.data = NULL; | 249 expect.data = NULL; |
| 250 expect.size = 0; | 250 expect.size = 0; |
| 251 expect.handles = NULL; | 251 expect.handles = NULL; |
| 252 expect.handle_count = 0; | 252 expect.handle_count = 0; |
| 253 server_mock()->AddSendCallExpect(expect); | 253 server_mock()->AddSendCallExpect(expect); |
| 254 | 254 |
| 255 EXPECT_EQ(BufferSyncInterface::PARSE_UNKNOWN_COMMAND, | 255 EXPECT_EQ(BufferSyncInterface::kParseUnknownCommand, |
| 256 proxy()->GetParseError()); | 256 proxy()->GetParseError()); |
| 257 } | 257 } |
| 258 | 258 |
| 259 } // namespace command_buffer | 259 } // namespace command_buffer |
| 260 } // namespace o3d | 260 } // namespace o3d |
| OLD | NEW |