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

Unified Diff: cc/layer_sorter_unittest.cc

Issue 11472021: cc: Pass LayerTreeHostImpl to LayerImpl constructor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layer_impl_unittest.cc ('k') | cc/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_sorter_unittest.cc
diff --git a/cc/layer_sorter_unittest.cc b/cc/layer_sorter_unittest.cc
index 578ec2847ec01dcc90866f51f3d2e0323f7a9bb0..da86383ab691998a9ba5830c95c2f057d87c816f 100644
--- a/cc/layer_sorter_unittest.cc
+++ b/cc/layer_sorter_unittest.cc
@@ -7,6 +7,8 @@
#include "cc/layer_impl.h"
#include "cc/math_util.h"
#include "cc/single_thread_proxy.h"
+#include "cc/test/fake_impl_proxy.h"
+#include "cc/test/fake_layer_tree_host_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/transform.h"
@@ -197,11 +199,14 @@ TEST(LayerSorterTest, verifyExistingOrderingPreservedWhenNoZDiff)
// - 3 and 4 do not have a 3d z difference, and therefore their relative ordering should be retained.
// - 3 and 4 should be re-sorted so they are in front of 1, 2, and 5.
- scoped_ptr<LayerImpl> layer1 = LayerImpl::create(1);
- scoped_ptr<LayerImpl> layer2 = LayerImpl::create(2);
- scoped_ptr<LayerImpl> layer3 = LayerImpl::create(3);
- scoped_ptr<LayerImpl> layer4 = LayerImpl::create(4);
- scoped_ptr<LayerImpl> layer5 = LayerImpl::create(5);
+ FakeImplProxy proxy;
+ FakeLayerTreeHostImpl hostImpl(&proxy);
+
+ scoped_ptr<LayerImpl> layer1 = LayerImpl::create(&hostImpl, 1);
+ scoped_ptr<LayerImpl> layer2 = LayerImpl::create(&hostImpl, 2);
+ scoped_ptr<LayerImpl> layer3 = LayerImpl::create(&hostImpl, 3);
+ scoped_ptr<LayerImpl> layer4 = LayerImpl::create(&hostImpl, 4);
+ scoped_ptr<LayerImpl> layer5 = LayerImpl::create(&hostImpl, 5);
gfx::Transform BehindMatrix;
BehindMatrix.Translate3d(0, 0, 2);
« no previous file with comments | « cc/layer_impl_unittest.cc ('k') | cc/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698