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

Side by Side Diff: Source/web/tests/PinchViewportTest.cpp

Issue 1215973002: Oilpan: improve ScrollableArea handling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review-induced improvements Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/ViewportAnchor.h ('k') | Source/web/tests/ScrollAnimatorNoneTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "config.h" 5 #include "config.h"
6 6
7 #include "core/frame/PinchViewport.h" 7 #include "core/frame/PinchViewport.h"
8 8
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/frame/FrameHost.h" 10 #include "core/frame/FrameHost.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 class ParameterizedPinchViewportTest 201 class ParameterizedPinchViewportTest
202 : public PinchViewportTest 202 : public PinchViewportTest
203 , public testing::WithParamInterface<SettingOverrideFunction> { 203 , public testing::WithParamInterface<SettingOverrideFunction> {
204 public: 204 public:
205 void overrideSettings(WebSettings *settings) override 205 void overrideSettings(WebSettings *settings) override
206 { 206 {
207 GetParam()(settings); 207 GetParam()(settings);
208 } 208 }
209 }; 209 };
210 210
211 #if OS(MACOSX) && ENABLE(OILPAN)
212 // FIXME(504655): RootLayerScrolls configuration crashes on Mac Oilpan bots.
213 INSTANTIATE_TEST_CASE_P(All, ParameterizedPinchViewportTest, ::testing::Values(
214 DefaultSettingOverride));
215 #else
216 static void RootLayerScrollsSettingOverride(WebSettings *settings) 211 static void RootLayerScrollsSettingOverride(WebSettings *settings)
217 { 212 {
218 settings->setRootLayerScrolls(true); 213 settings->setRootLayerScrolls(true);
219 } 214 }
220 INSTANTIATE_TEST_CASE_P(All, ParameterizedPinchViewportTest, ::testing::Values( 215 INSTANTIATE_TEST_CASE_P(All, ParameterizedPinchViewportTest, ::testing::Values(
221 DefaultSettingOverride, 216 DefaultSettingOverride,
222 RootLayerScrollsSettingOverride)); 217 RootLayerScrollsSettingOverride));
223 #endif
224 218
225 // Test that resizing the PinchViewport works as expected and that resizing the 219 // Test that resizing the PinchViewport works as expected and that resizing the
226 // WebView resizes the PinchViewport. 220 // WebView resizes the PinchViewport.
227 TEST_P(ParameterizedPinchViewportTest, TestResize) 221 TEST_P(ParameterizedPinchViewportTest, TestResize)
228 { 222 {
229 initializeWithDesktopSettings(); 223 initializeWithDesktopSettings();
230 webViewImpl()->resize(IntSize(320, 240)); 224 webViewImpl()->resize(IntSize(320, 240));
231 225
232 navigateTo("about:blank"); 226 navigateTo("about:blank");
233 forceFullCompositingUpdate(); 227 forceFullCompositingUpdate();
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1752 webViewImpl()->handleInputEvent(pinchUpdate); 1746 webViewImpl()->handleInputEvent(pinchUpdate);
1753 1747
1754 PinchViewport& pinchViewport = webViewImpl()->page()->frameHost().pinchViewp ort(); 1748 PinchViewport& pinchViewport = webViewImpl()->page()->frameHost().pinchViewp ort();
1755 FrameView& frameView = *webViewImpl()->mainFrameImpl()->frameView(); 1749 FrameView& frameView = *webViewImpl()->mainFrameImpl()->frameView();
1756 1750
1757 EXPECT_FLOAT_POINT_EQ(FloatPoint(50, 50), pinchViewport.location()); 1751 EXPECT_FLOAT_POINT_EQ(FloatPoint(50, 50), pinchViewport.location());
1758 EXPECT_FLOAT_POINT_EQ(FloatPoint(0, 0), frameView.scrollPositionDouble()); 1752 EXPECT_FLOAT_POINT_EQ(FloatPoint(0, 0), frameView.scrollPositionDouble());
1759 } 1753 }
1760 1754
1761 } // namespace 1755 } // namespace
OLDNEW
« no previous file with comments | « Source/web/ViewportAnchor.h ('k') | Source/web/tests/ScrollAnimatorNoneTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698