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

Unified Diff: cc/test/layer_tree_test.h

Issue 1766053002: Clean LayerImpl's scroll offset callers in unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve source_to_parent update issue Created 4 years, 9 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/test/layer_tree_test.h
diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h
index 5a7f111aa305dbcdfb8127d54b4a44b2aa0856c8..2b9a91a864285f325fdd15209d39f59e1c53776c 100644
--- a/cc/test/layer_tree_test.h
+++ b/cc/test/layer_tree_test.h
@@ -191,6 +191,16 @@ class LayerTreeTest : public testing::Test, public TestHooks {
bool IsRemoteTest() const;
+ static gfx::Vector2dF ScrollDelta(LayerImpl* layer_impl) {
+ if (layer_impl->IsActive())
+ return gfx::Vector2dF(layer_impl->synced_scroll_offset()->Delta().x(),
+ layer_impl->synced_scroll_offset()->Delta().y());
+ else
+ return gfx::Vector2dF(
+ layer_impl->synced_scroll_offset()->PendingDelta().get().x(),
+ layer_impl->synced_scroll_offset()->PendingDelta().get().y());
+ }
+
private:
LayerTreeSettings settings_;
LayerSettings layer_settings_;

Powered by Google App Engine
This is Rietveld 408576698