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

Unified Diff: cc/layers/painted_scrollbar_layer_unittest.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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/layers/nine_patch_layer_unittest.cc ('k') | cc/layers/picture_image_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/painted_scrollbar_layer_unittest.cc
diff --git a/cc/layers/painted_scrollbar_layer_unittest.cc b/cc/layers/painted_scrollbar_layer_unittest.cc
index b43c7379e78537dd7772c3442ccea22d9f8b19df..e249607a9e9d71064a629e1c82e51a0ca09d883f 100644
--- a/cc/layers/painted_scrollbar_layer_unittest.cc
+++ b/cc/layers/painted_scrollbar_layer_unittest.cc
@@ -4,6 +4,7 @@
#include "cc/layers/painted_scrollbar_layer.h"
+#include "cc/animation/animation_host.h"
#include "cc/test/fake_layer_tree_host.h"
#include "cc/test/fake_layer_tree_host_client.h"
#include "cc/test/fake_scrollbar.h"
@@ -29,10 +30,10 @@ class MockScrollbar : public FakeScrollbar {
TEST(PaintedScrollbarLayerTest, NeedsPaint) {
FakeLayerTreeHostClient fake_client_;
TestTaskGraphRunner task_graph_runner_;
- std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
- layer_tree_host_ =
- FakeLayerTreeHost::Create(&fake_client_, &task_graph_runner_);
+ auto animation_host = AnimationHost::CreateForTesting(ThreadInstance::MAIN);
+ auto layer_tree_host = FakeLayerTreeHost::Create(
+ &fake_client_, &task_graph_runner_, animation_host.get());
MockScrollbar* scrollbar = new MockScrollbar();
scoped_refptr<PaintedScrollbarLayer> scrollbar_layer =
@@ -41,9 +42,9 @@ TEST(PaintedScrollbarLayerTest, NeedsPaint) {
scrollbar_layer->SetIsDrawable(true);
scrollbar_layer->SetBounds(gfx::Size(100, 100));
- layer_tree_host_->SetRootLayer(scrollbar_layer);
+ layer_tree_host->SetRootLayer(scrollbar_layer);
EXPECT_EQ(scrollbar_layer->GetLayerTreeHostForTesting(),
- layer_tree_host_.get());
+ layer_tree_host.get());
scrollbar_layer->SavePaintProperties();
// Request no paint, but expect them to be painted because they have not
« no previous file with comments | « cc/layers/nine_patch_layer_unittest.cc ('k') | cc/layers/picture_image_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698