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

Unified Diff: cc/trees/layer_tree_host_unittest_scroll.cc

Issue 23983047: Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Backup 2013.10.29 Created 7 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_host_unittest_scroll.cc
diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc
index 114262252949965b8d40980054539b791c515399..4f983369ea1d7b06f84f8c94d066ee72fbd52ef0 100644
--- a/cc/trees/layer_tree_host_unittest_scroll.cc
+++ b/cc/trees/layer_tree_host_unittest_scroll.cc
@@ -31,9 +31,9 @@ class LayerTreeHostScrollTestScrollSimple : public LayerTreeHostScrollTest {
num_scrolls_(0) {}
virtual void BeginTest() OVERRIDE {
- layer_tree_host()->root_layer()->SetScrollable(true);
- layer_tree_host()->root_layer()
- ->SetMaxScrollOffset(gfx::Vector2d(100, 100));
+// layer_tree_host()->root_layer()->SetScrollable(true); // WJM
+// layer_tree_host()->root_layer()
+// ->SetMaxScrollOffset(gfx::Vector2d(100, 100));
layer_tree_host()->root_layer()->SetScrollOffset(initial_scroll_);
PostSetNeedsCommitToMainThread();
}
@@ -54,8 +54,8 @@ class LayerTreeHostScrollTestScrollSimple : public LayerTreeHostScrollTest {
LayerImpl* root = impl->active_tree()->root_layer();
EXPECT_VECTOR_EQ(gfx::Vector2d(), root->ScrollDelta());
- root->SetScrollable(true);
- root->SetMaxScrollOffset(gfx::Vector2d(100, 100));
+// root->SetScrollable(true); // WJM
+// root->SetMaxScrollOffset(gfx::Vector2d(100, 100));
root->ScrollBy(scroll_amount_);
switch (impl->active_tree()->source_frame_number()) {
@@ -95,11 +95,11 @@ class LayerTreeHostScrollTestScrollMultipleRedraw
: initial_scroll_(40, 10), scroll_amount_(-3, 17), num_scrolls_(0) {}
virtual void BeginTest() OVERRIDE {
- layer_tree_host()->root_layer()->SetScrollable(true);
+// layer_tree_host()->root_layer()->SetScrollable(true); // WJM
layer_tree_host()->root_layer()->SetScrollOffset(initial_scroll_);
layer_tree_host()->root_layer()->SetBounds(gfx::Size(200, 200));
- layer_tree_host()->root_layer()
- ->SetMaxScrollOffset(gfx::Vector2d(100, 100));
+// layer_tree_host()->root_layer()
+// ->SetMaxScrollOffset(gfx::Vector2d(100, 100));
PostSetNeedsCommitToMainThread();
}
@@ -184,10 +184,10 @@ class LayerTreeHostScrollTestScrollAbortedCommit
virtual void SetupTree() OVERRIDE {
LayerTreeHostScrollTest::SetupTree();
scoped_refptr<Layer> root_scroll_layer = Layer::Create();
- root_scroll_layer->SetScrollable(true);
+// root_scroll_layer->SetScrollable(true); // WJM
root_scroll_layer->SetScrollOffset(initial_scroll_);
root_scroll_layer->SetBounds(gfx::Size(200, 200));
- root_scroll_layer->SetMaxScrollOffset(gfx::Vector2d(100, 100));
+// root_scroll_layer->SetMaxScrollOffset(gfx::Vector2d(100, 100));
root_scroll_layer->SetIsDrawable(true);
layer_tree_host()->root_layer()->AddChild(root_scroll_layer);
@@ -345,9 +345,9 @@ class LayerTreeHostScrollTestFractionalScroll : public LayerTreeHostScrollTest {
LayerTreeHostScrollTestFractionalScroll() : scroll_amount_(1.75, 0) {}
virtual void BeginTest() OVERRIDE {
- layer_tree_host()->root_layer()->SetScrollable(true);
- layer_tree_host()->root_layer()
- ->SetMaxScrollOffset(gfx::Vector2d(100, 100));
+// layer_tree_host()->root_layer()->SetScrollable(true); // WJM
+// layer_tree_host()->root_layer()
+// ->SetMaxScrollOffset(gfx::Vector2d(100, 100));
PostSetNeedsCommitToMainThread();
}
@@ -411,8 +411,8 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest {
root_scroll_layer_->SetAnchorPoint(gfx::PointF());
root_scroll_layer_->SetIsDrawable(true);
- root_scroll_layer_->SetScrollable(true);
- root_scroll_layer_->SetMaxScrollOffset(gfx::Vector2d(100, 100));
+// root_scroll_layer_->SetScrollable(true); // WJM
+// root_scroll_layer_->SetMaxScrollOffset(gfx::Vector2d(100, 100));
root_layer->AddChild(root_scroll_layer_);
child_layer_ = ContentLayer::Create(&fake_content_layer_client_);
@@ -433,8 +433,8 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest {
child_layer_->SetAnchorPoint(gfx::PointF());
child_layer_->SetIsDrawable(true);
- child_layer_->SetScrollable(true);
- child_layer_->SetMaxScrollOffset(gfx::Vector2d(100, 100));
+// child_layer_->SetScrollable(true); // WJM
+// child_layer_->SetMaxScrollOffset(gfx::Vector2d(100, 100));
root_scroll_layer_->AddChild(child_layer_);
if (scroll_child_layer_) {
@@ -725,9 +725,9 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest {
num_scrolls_(0) {}
virtual void BeginTest() OVERRIDE {
- layer_tree_host()->root_layer()->SetScrollable(true);
- layer_tree_host()->root_layer()
- ->SetMaxScrollOffset(gfx::Vector2d(100, 100));
+// layer_tree_host()->root_layer()->SetScrollable(true); // WJM
+// layer_tree_host()->root_layer()
+// ->SetMaxScrollOffset(gfx::Vector2d(100, 100));
layer_tree_host()->root_layer()->SetScrollOffset(initial_scroll_);
PostSetNeedsCommitToMainThread();
}
@@ -833,9 +833,9 @@ class ImplSidePaintingScrollTestImplOnlyScroll
: initial_scroll_(20, 10), impl_thread_scroll_(-2, 3) {}
virtual void BeginTest() OVERRIDE {
- layer_tree_host()->root_layer()->SetScrollable(true);
- layer_tree_host()->root_layer()->SetMaxScrollOffset(
- gfx::Vector2d(100, 100));
+// layer_tree_host()->root_layer()->SetScrollable(true); // WJM
+// layer_tree_host()->root_layer()->SetMaxScrollOffset(
+// gfx::Vector2d(100, 100));
layer_tree_host()->root_layer()->SetScrollOffset(initial_scroll_);
PostSetNeedsCommitToMainThread();
}
@@ -939,17 +939,17 @@ class LayerTreeHostScrollTestScrollZeroMaxScrollOffset
virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
LayerImpl* root = impl->active_tree()->root_layer();
- root->SetScrollable(true);
+// root->SetScrollable(true); // WJM
- root->SetMaxScrollOffset(gfx::Vector2d(100, 100));
+// root->SetMaxScrollOffset(gfx::Vector2d(100, 100));
EXPECT_EQ(InputHandler::ScrollStarted,
root->TryScroll(gfx::PointF(0.0f, 1.0f), InputHandler::Gesture));
- root->SetMaxScrollOffset(gfx::Vector2d(0, 0));
+// root->SetMaxScrollOffset(gfx::Vector2d(0, 0));
EXPECT_EQ(InputHandler::ScrollIgnored,
root->TryScroll(gfx::PointF(0.0f, 1.0f), InputHandler::Gesture));
- root->SetMaxScrollOffset(gfx::Vector2d(-100, -100));
+// root->SetMaxScrollOffset(gfx::Vector2d(-100, -100));
EXPECT_EQ(InputHandler::ScrollIgnored,
root->TryScroll(gfx::PointF(0.0f, 1.0f), InputHandler::Gesture));
@@ -1093,8 +1093,8 @@ class LayerTreeHostScrollTestLayerStructureChange
scroll_layer->SetPosition(gfx::Point(0, 0));
scroll_layer->SetAnchorPoint(gfx::PointF());
scroll_layer->SetIsDrawable(true);
- scroll_layer->SetScrollable(true);
- scroll_layer->SetMaxScrollOffset(gfx::Vector2d(100, 100));
+// scroll_layer->SetScrollable(true); // WJM
+// scroll_layer->SetMaxScrollOffset(gfx::Vector2d(100, 100));
scroll_layer->set_did_scroll_callback(base::Bind(
&FakeLayerScrollClient::DidScroll, base::Unretained(client)));
client->owner_ = this;

Powered by Google App Engine
This is Rietveld 408576698