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

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

Issue 2467023003: Revert "Touchpad scroll latching enabled for Mac behind flag." (Closed)
Patch Set: 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 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 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after
2038 private: 2037 private:
2039 gfx::ScrollOffset initial_scroll_; 2038 gfx::ScrollOffset initial_scroll_;
2040 gfx::ScrollOffset second_scroll_; 2039 gfx::ScrollOffset second_scroll_;
2041 gfx::Vector2dF scroll_amount_; 2040 gfx::Vector2dF scroll_amount_;
2042 }; 2041 };
2043 2042
2044 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostScrollTestPropertyTreeUpdate); 2043 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostScrollTestPropertyTreeUpdate);
2045 2044
2046 } // namespace 2045 } // namespace
2047 } // namespace cc 2046 } // 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