diff options
Diffstat (limited to 'gpu/command_buffer/service/framebuffer_manager_unittest.cc')
-rw-r--r-- | gpu/command_buffer/service/framebuffer_manager_unittest.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gpu/command_buffer/service/framebuffer_manager_unittest.cc b/gpu/command_buffer/service/framebuffer_manager_unittest.cc index 36bbbe9..1c57c85 100644 --- a/gpu/command_buffer/service/framebuffer_manager_unittest.cc +++ b/gpu/command_buffer/service/framebuffer_manager_unittest.cc @@ -24,23 +24,24 @@ class FramebufferManagerTest : public testing::Test { }; TEST_F(FramebufferManagerTest, Basic) { - const GLuint kFramebuffer1Id = 1; - const GLuint kFramebuffer2Id = 2; + const GLuint kClient1Id = 1; + const GLuint kService1Id = 11; + const GLuint kClient2Id = 2; // Check we can create framebuffer. - manager_.CreateFramebufferInfo(kFramebuffer1Id); + manager_.CreateFramebufferInfo(kClient1Id, kService1Id); // Check framebuffer got created. FramebufferManager::FramebufferInfo* info1 = - manager_.GetFramebufferInfo(kFramebuffer1Id); + manager_.GetFramebufferInfo(kClient1Id); ASSERT_TRUE(info1 != NULL); EXPECT_FALSE(info1->IsDeleted()); - EXPECT_EQ(kFramebuffer1Id, info1->framebuffer_id()); + EXPECT_EQ(kService1Id, info1->service_id()); // Check we get nothing for a non-existent framebuffer. - EXPECT_TRUE(manager_.GetFramebufferInfo(kFramebuffer2Id) == NULL); + EXPECT_TRUE(manager_.GetFramebufferInfo(kClient2Id) == NULL); // Check trying to a remove non-existent framebuffers does not crash. - manager_.RemoveFramebufferInfo(kFramebuffer2Id); + manager_.RemoveFramebufferInfo(kClient2Id); // Check we can't get the framebuffer after we remove it. - manager_.RemoveFramebufferInfo(kFramebuffer1Id); - EXPECT_TRUE(manager_.GetFramebufferInfo(kFramebuffer1Id) == NULL); + manager_.RemoveFramebufferInfo(kClient1Id); + EXPECT_TRUE(manager_.GetFramebufferInfo(kClient1Id) == NULL); } // TODO(gman): Write test for AttachRenderbuffer |