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

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

Issue 1158673006: Replace various ScrollableArea scroll methods with setScrollPosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Build fix Created 5 years, 6 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
« no previous file with comments | « Source/web/tests/TopControlsTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL), WebString::fromUTF8(file)); 179 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL), WebString::fromUTF8(file));
180 // Note that JavaScript must be enabled for shadow DOM tests. 180 // Note that JavaScript must be enabled for shadow DOM tests.
181 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + file, true, 0, &client); 181 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + file, true, 0, &client);
182 182
183 // Set size to enable hit testing, and avoid line wrapping for consistency w ith browser. 183 // Set size to enable hit testing, and avoid line wrapping for consistency w ith browser.
184 webView->resize(WebSize(800, 1200)); 184 webView->resize(WebSize(800, 1200));
185 185
186 // Scroll to verify the code properly transforms windows to client co-ords. 186 // Scroll to verify the code properly transforms windows to client co-ords.
187 const int kScrollOffset = 100; 187 const int kScrollOffset = 100;
188 RefPtrWillBeRawPtr<Document> document = static_cast<PassRefPtrWillBeRawPtr<D ocument>>(webView->mainFrame()->document()); 188 RefPtrWillBeRawPtr<Document> document = static_cast<PassRefPtrWillBeRawPtr<D ocument>>(webView->mainFrame()->document());
189 document->frame()->view()->setScrollOffset(IntPoint(0, kScrollOffset)); 189 document->frame()->view()->setScrollPosition(IntPoint(0, kScrollOffset), Pro grammaticScroll);
190 190
191 return webView; 191 return webView;
192 } 192 }
193 193
194 void TouchActionTest::runTestOnTree(ContainerNode* root, WebView* webView, Touch ActionTrackingWebViewClient& client) 194 void TouchActionTest::runTestOnTree(ContainerNode* root, WebView* webView, Touch ActionTrackingWebViewClient& client)
195 { 195 {
196 // Find all elements to test the touch-action of in the document. 196 // Find all elements to test the touch-action of in the document.
197 TrackExceptionState es; 197 TrackExceptionState es;
198 198
199 // Oilpan: see runTouchActionTest() comment why these are persistent referen ces. 199 // Oilpan: see runTouchActionTest() comment why these are persistent referen ces.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 { 340 {
341 runShadowDOMTest("touch-action-shadow-dom.html"); 341 runShadowDOMTest("touch-action-shadow-dom.html");
342 } 342 }
343 343
344 TEST_F(TouchActionTest, Pan) 344 TEST_F(TouchActionTest, Pan)
345 { 345 {
346 runTouchActionTest("touch-action-pan.html"); 346 runTouchActionTest("touch-action-pan.html");
347 } 347 }
348 348
349 } 349 }
OLDNEW
« no previous file with comments | « Source/web/tests/TopControlsTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698