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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation_unittest.cc

Issue 2278283003: Refactor client visibility handling (Closed)
Patch Set: fix compositor_unittests Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Tests for GLES2Implementation. 5 // Tests for GLES2Implementation.
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #include <GLES2/gl2ext.h> 10 #include <GLES2/gl2ext.h>
(...skipping 4589 matching lines...) Expand 10 before | Expand all | Expand 10 after
4600 init_options.bind_generates_resource_service = false; 4600 init_options.bind_generates_resource_service = false;
4601 EXPECT_FALSE(Initialize(init_options)); 4601 EXPECT_FALSE(Initialize(init_options));
4602 } 4602 }
4603 4603
4604 TEST_F(GLES2ImplementationManualInitTest, FailInitOnTransferBufferFail) { 4604 TEST_F(GLES2ImplementationManualInitTest, FailInitOnTransferBufferFail) {
4605 ContextInitOptions init_options; 4605 ContextInitOptions init_options;
4606 init_options.transfer_buffer_initialize_fail = true; 4606 init_options.transfer_buffer_initialize_fail = true;
4607 EXPECT_FALSE(Initialize(init_options)); 4607 EXPECT_FALSE(Initialize(init_options));
4608 } 4608 }
4609 4609
4610 TEST_F(GLES2ImplementationTest, ClientVisibility) {
4611 EXPECT_FALSE(gl_->AnyClientsVisible());
4612 gl_->SetClientVisible(0, true);
4613 EXPECT_TRUE(gl_->AnyClientsVisible());
4614 gl_->SetClientVisible(0, false);
4615 EXPECT_FALSE(gl_->AnyClientsVisible());
4616 gl_->SetClientVisible(0, true);
4617 gl_->SetClientVisible(1, true);
4618 EXPECT_TRUE(gl_->AnyClientsVisible());
4619 gl_->SetClientVisible(0, false);
4620 EXPECT_TRUE(gl_->AnyClientsVisible());
4621 gl_->SetClientVisible(1, false);
4622 EXPECT_FALSE(gl_->AnyClientsVisible());
4623 }
4624
4625 #include "base/macros.h" 4610 #include "base/macros.h"
4626 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" 4611 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h"
4627 4612
4628 } // namespace gles2 4613 } // namespace gles2
4629 } // namespace gpu 4614 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698