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

Unified Diff: cc/layers/scrollbar_layer_unittest.cc

Issue 348093004: Make cc output surface creation async (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android compile fixes Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: cc/layers/scrollbar_layer_unittest.cc
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
index 7cb0e25118c4a04f26d9c40af92768be445789b8..2133800f9b17f50a49bcc784db80941c411e1809 100644
--- a/cc/layers/scrollbar_layer_unittest.cc
+++ b/cc/layers/scrollbar_layer_unittest.cc
@@ -60,7 +60,8 @@ LayerImpl* LayerImplForScrollAreaAndScrollbar(FakeLayerTreeHost* host,
}
TEST(ScrollbarLayerTest, ResolveScrollLayerPointer) {
- scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
+ FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
+ scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(&client);
scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar);
LayerImpl* layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar(
host.get(), scrollbar.Pass(), false, false, 0, 0);
@@ -75,7 +76,8 @@ TEST(ScrollbarLayerTest, ResolveScrollLayerPointer) {
}
TEST(ScrollbarLayerTest, ResolveScrollLayerPointer_ReverseOrder) {
- scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
+ FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
+ scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(&client);
scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar);
LayerImpl* layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar(
host.get(), scrollbar.Pass(), true, false, 0, 0);
@@ -90,7 +92,8 @@ TEST(ScrollbarLayerTest, ResolveScrollLayerPointer_ReverseOrder) {
}
TEST(ScrollbarLayerTest, ShouldScrollNonOverlayOnMainThread) {
- scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
+ FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
+ scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(&client);
// Create and attach a non-overlay scrollbar.
scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar);
@@ -123,7 +126,8 @@ TEST(ScrollbarLayerTest, ShouldScrollNonOverlayOnMainThread) {
}
TEST(PaintedScrollbarLayerTest, ScrollOffsetSynchronization) {
- scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
+ FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
+ scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(&client);
scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar);
scoped_refptr<Layer> layer_tree_root = Layer::Create();
@@ -193,7 +197,8 @@ TEST(PaintedScrollbarLayerTest, ScrollOffsetSynchronization) {
} while (false)
TEST(ScrollbarLayerTest, UpdatePropertiesOfScrollBarWhenThumbRemoved) {
- scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
+ FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
+ scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(&client);
scoped_refptr<Layer> root_clip_layer = Layer::Create();
scoped_refptr<Layer> root_layer = Layer::Create();
scoped_refptr<Layer> content_layer = Layer::Create();
@@ -237,7 +242,8 @@ TEST(ScrollbarLayerTest, UpdatePropertiesOfScrollBarWhenThumbRemoved) {
}
TEST(ScrollbarLayerTest, ThumbRect) {
- scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
+ FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
+ scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(&client);
scoped_refptr<Layer> root_clip_layer = Layer::Create();
scoped_refptr<Layer> root_layer = Layer::Create();
scoped_refptr<Layer> content_layer = Layer::Create();
@@ -321,9 +327,10 @@ TEST(ScrollbarLayerTest, SolidColorDrawQuads) {
const int kTrackStart = 1;
const int kTrackLength = 100;
+ FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
LayerTreeSettings layer_tree_settings;
scoped_ptr<FakeLayerTreeHost> host =
- FakeLayerTreeHost::Create(layer_tree_settings);
+ FakeLayerTreeHost::Create(&client, layer_tree_settings);
scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, true));
LayerImpl* layer_impl_tree_root = LayerImplForScrollAreaAndScrollbar(
@@ -406,9 +413,10 @@ TEST(ScrollbarLayerTest, LayerDrivenSolidColorDrawQuads) {
const int kTrackStart = 0;
const int kTrackLength = 10;
+ FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
LayerTreeSettings layer_tree_settings;
scoped_ptr<FakeLayerTreeHost> host =
- FakeLayerTreeHost::Create(layer_tree_settings);
+ FakeLayerTreeHost::Create(&client, layer_tree_settings);
scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar(false, true, true));

Powered by Google App Engine
This is Rietveld 408576698