| 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;
|
|
|