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

Side by Side Diff: cc/trees/layer_tree_host_unittest_scroll.cc

Issue 2360963003: Revert "Touchpad scroll latching enabled for Mac behind flag." (Closed)
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 gfx::Point scroll_point = 686 gfx::Point scroll_point =
687 gfx::ToCeiledPoint(expected_scroll_layer_impl->position() - 687 gfx::ToCeiledPoint(expected_scroll_layer_impl->position() -
688 gfx::Vector2dF(0.5f, 0.5f)); 688 gfx::Vector2dF(0.5f, 0.5f));
689 InputHandler::ScrollStatus status = impl->ScrollBegin( 689 InputHandler::ScrollStatus status = impl->ScrollBegin(
690 BeginState(scroll_point).get(), InputHandler::TOUCHSCREEN); 690 BeginState(scroll_point).get(), InputHandler::TOUCHSCREEN);
691 EXPECT_EQ(InputHandler::SCROLL_ON_IMPL_THREAD, status.thread); 691 EXPECT_EQ(InputHandler::SCROLL_ON_IMPL_THREAD, status.thread);
692 impl->ScrollBy(UpdateState(gfx::Point(), scroll_amount_).get()); 692 impl->ScrollBy(UpdateState(gfx::Point(), scroll_amount_).get());
693 LayerImpl* scrolling_layer = impl->CurrentlyScrollingLayer(); 693 LayerImpl* scrolling_layer = impl->CurrentlyScrollingLayer();
694 CHECK(scrolling_layer); 694 CHECK(scrolling_layer);
695 impl->ScrollEnd(EndState().get()); 695 impl->ScrollEnd(EndState().get());
696 impl->ClearCurrentlyScrollingLayerForTesting();
697 CHECK(!impl->CurrentlyScrollingLayer()); 696 CHECK(!impl->CurrentlyScrollingLayer());
698 EXPECT_EQ(scrolling_layer->id(), 697 EXPECT_EQ(scrolling_layer->id(),
699 impl->active_tree()->LastScrolledLayerId()); 698 impl->active_tree()->LastScrolledLayerId());
700 699
701 // Check the scroll is applied as a delta. 700 // Check the scroll is applied as a delta.
702 EXPECT_VECTOR_EQ(initial_offset_, 701 EXPECT_VECTOR_EQ(initial_offset_,
703 ScrollTreeForLayer(expected_scroll_layer_impl) 702 ScrollTreeForLayer(expected_scroll_layer_impl)
704 ->GetScrollOffsetBaseForTesting( 703 ->GetScrollOffsetBaseForTesting(
705 expected_scroll_layer_impl->id())); 704 expected_scroll_layer_impl->id()));
706 EXPECT_VECTOR_EQ(scroll_amount_, 705 EXPECT_VECTOR_EQ(scroll_amount_,
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 1972
1974 const gfx::Vector2dF elastic_overscroll_test_cases_[5] = { 1973 const gfx::Vector2dF elastic_overscroll_test_cases_[5] = {
1975 gfx::Vector2dF(0, 0), gfx::Vector2dF(5, 10), gfx::Vector2dF(5, 5), 1974 gfx::Vector2dF(0, 0), gfx::Vector2dF(5, 10), gfx::Vector2dF(5, 5),
1976 gfx::Vector2dF(-4, -5), gfx::Vector2dF(0, 0)}; 1975 gfx::Vector2dF(-4, -5), gfx::Vector2dF(0, 0)};
1977 }; 1976 };
1978 1977
1979 MULTI_THREAD_TEST_F(LayerTreeHostScrollTestElasticOverscroll); 1978 MULTI_THREAD_TEST_F(LayerTreeHostScrollTestElasticOverscroll);
1980 1979
1981 } // namespace 1980 } // namespace
1982 } // namespace cc 1981 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | content/browser/renderer_host/input/mouse_wheel_event_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698