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

Side by Side Diff: ui/compositor/layer_unittest.cc

Issue 134623005: Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: danakj review Created 6 years, 6 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 // 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 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 virtual ~LayerWithRealCompositorTest() {} 88 virtual ~LayerWithRealCompositorTest() {}
89 89
90 // Overridden from testing::Test: 90 // Overridden from testing::Test:
91 virtual void SetUp() OVERRIDE { 91 virtual void SetUp() OVERRIDE {
92 bool enable_pixel_output = true; 92 bool enable_pixel_output = true;
93 ui::ContextFactory* context_factory = 93 ui::ContextFactory* context_factory =
94 InitializeContextFactoryForTests(enable_pixel_output); 94 InitializeContextFactoryForTests(enable_pixel_output);
95 95
96 const gfx::Rect host_bounds(10, 10, 500, 500); 96 const gfx::Rect host_bounds(10, 10, 500, 500);
97 compositor_host_.reset(TestCompositorHost::Create( 97 compositor_host_.reset(
98 host_bounds, context_factory)); 98 TestCompositorHost::Create(host_bounds, context_factory));
99 compositor_host_->Show(); 99 compositor_host_->Show();
100 } 100 }
101 101
102 virtual void TearDown() OVERRIDE { 102 virtual void TearDown() OVERRIDE {
103 compositor_host_.reset(); 103 compositor_host_.reset();
104 TerminateContextFactoryForTests(); 104 TerminateContextFactoryForTests();
105 } 105 }
106 106
107 Compositor* GetCompositor() { return compositor_host_->GetCompositor(); } 107 Compositor* GetCompositor() { return compositor_host_->GetCompositor(); }
108 108
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1548 1548
1549 child->SetAnimator(LayerAnimator::CreateImplicitAnimator()); 1549 child->SetAnimator(LayerAnimator::CreateImplicitAnimator());
1550 child->SetOpacity(0.5f); 1550 child->SetOpacity(0.5f);
1551 EXPECT_TRUE(compositor()->layer_animator_collection()->HasActiveAnimators()); 1551 EXPECT_TRUE(compositor()->layer_animator_collection()->HasActiveAnimators());
1552 1552
1553 child.reset(); 1553 child.reset();
1554 EXPECT_FALSE(compositor()->layer_animator_collection()->HasActiveAnimators()); 1554 EXPECT_FALSE(compositor()->layer_animator_collection()->HasActiveAnimators());
1555 } 1555 }
1556 1556
1557 } // namespace ui 1557 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698