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

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

Issue 1373033004: aura: Defer OutputSurface creation until widget is available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « ui/compositor/compositor_unittest.cc ('k') | ui/compositor/test/test_compositor_host_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/compositor/layer_owner.h" 5 #include "ui/compositor/layer_owner.h"
6 6
7 #include "base/test/null_task_runner.h" 7 #include "base/test/null_task_runner.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "ui/compositor/compositor.h" 9 #include "ui/compositor/compositor.h"
10 #include "ui/compositor/layer.h" 10 #include "ui/compositor/layer.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 void LayerOwnerTestWithCompositor::SetUp() { 63 void LayerOwnerTestWithCompositor::SetUp() {
64 scoped_refptr<base::SingleThreadTaskRunner> task_runner = 64 scoped_refptr<base::SingleThreadTaskRunner> task_runner =
65 new base::NullTaskRunner(); 65 new base::NullTaskRunner();
66 66
67 ui::ContextFactory* context_factory = 67 ui::ContextFactory* context_factory =
68 ui::InitializeContextFactoryForTests(false); 68 ui::InitializeContextFactoryForTests(false);
69 69
70 compositor_.reset(new ui::Compositor(context_factory, task_runner)); 70 compositor_.reset(new ui::Compositor(context_factory, task_runner));
71 compositor_->SetAcceleratedWidgetAndStartCompositor( 71 compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget);
72 gfx::kNullAcceleratedWidget);
73 } 72 }
74 73
75 void LayerOwnerTestWithCompositor::TearDown() { 74 void LayerOwnerTestWithCompositor::TearDown() {
76 compositor_.reset(); 75 compositor_.reset();
77 ui::TerminateContextFactoryForTests(); 76 ui::TerminateContextFactoryForTests();
78 } 77 }
79 78
80 } // namespace 79 } // namespace
81 80
82 TEST(LayerOwnerTest, RecreateLayerHonorsAnimationTargets) { 81 TEST(LayerOwnerTest, RecreateLayerHonorsAnimationTargets) {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 animation.AddObserver(observer.get()); 211 animation.AddObserver(observer.get());
213 gfx::Transform transform; 212 gfx::Transform transform;
214 transform.Scale(0.5f, 0.5f); 213 transform.Scale(0.5f, 0.5f);
215 child->SetTransform(transform); 214 child->SetTransform(transform);
216 } 215 }
217 216
218 scoped_ptr<Layer> layer_copy = owner.RecreateLayer(); 217 scoped_ptr<Layer> layer_copy = owner.RecreateLayer();
219 } 218 }
220 219
221 } // namespace ui 220 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor_unittest.cc ('k') | ui/compositor/test/test_compositor_host_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698