| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |