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

Unified Diff: o3d/gpu_plugin/command_buffer_unittest.cc

Issue 207061: Added support for getting and setting the CommandBuffer token and error.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « o3d/gpu_plugin/command_buffer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: o3d/gpu_plugin/command_buffer_unittest.cc
===================================================================
--- o3d/gpu_plugin/command_buffer_unittest.cc (revision 26857)
+++ o3d/gpu_plugin/command_buffer_unittest.cc (working copy)
@@ -236,5 +236,25 @@
EXPECT_EQ(window_object_, command_buffer_->GetRegisteredObject(1));
}
+TEST_F(CommandBufferTest, DefaultTokenIsZero) {
+ EXPECT_EQ(0, command_buffer_->GetToken());
+}
+
+TEST_F(CommandBufferTest, CanSetToken) {
+ command_buffer_->SetToken(7);
+ EXPECT_EQ(7, command_buffer_->GetToken());
+}
+
+TEST_F(CommandBufferTest, DefaultErrorIsNoError) {
+ EXPECT_EQ(CommandBuffer::ERROR_NO_ERROR, command_buffer_->ResetError());
+}
+
+TEST_F(CommandBufferTest, CanSetAndResetError) {
+ command_buffer_->SetError(CommandBuffer::ERROR_UNKNOWN_COMMAND);
+ EXPECT_EQ(CommandBuffer::ERROR_UNKNOWN_COMMAND,
+ command_buffer_->ResetError());
+ EXPECT_EQ(CommandBuffer::ERROR_NO_ERROR, command_buffer_->ResetError());
+}
+
} // namespace gpu_plugin
} // namespace o3d
« no previous file with comments | « o3d/gpu_plugin/command_buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698