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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp

Issue 2680953002: Remove GraphicsLayer::didScroll and directly call ScrollableArea::didScroll (Closed)
Patch Set: Remove unneeded tests from parent patch Created 3 years, 10 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 private: 203 private:
204 ScrollOffset m_scrollOffset; 204 ScrollOffset m_scrollOffset;
205 }; 205 };
206 206
207 TEST_F(GraphicsLayerTest, applyScrollToScrollableArea) { 207 TEST_F(GraphicsLayerTest, applyScrollToScrollableArea) {
208 FakeScrollableArea* scrollableArea = FakeScrollableArea::create(); 208 FakeScrollableArea* scrollableArea = FakeScrollableArea::create();
209 m_graphicsLayer->setScrollableArea(scrollableArea, false); 209 m_graphicsLayer->setScrollableArea(scrollableArea, false);
210 210
211 WebDoublePoint scrollPosition(7, 9); 211 WebDoublePoint scrollPosition(7, 9);
212 m_platformLayer->setScrollPositionDouble(scrollPosition); 212 m_platformLayer->setScrollPositionDouble(scrollPosition);
wkorman 2017/02/07 22:18:05 Do we still need to do this? It looks like this wa
pdr. 2017/02/08 03:53:55 Good catch, these are no longer needed.
213 m_graphicsLayer->didScroll(); 213 scrollableArea->didScroll(gfx::ScrollOffset(7, 9));
214 214
215 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->getScrollOffset().width()); 215 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->getScrollOffset().width());
216 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->getScrollOffset().height()); 216 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->getScrollOffset().height());
217 } 217 }
218 218
219 } // namespace blink 219 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698