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

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

Issue 220343002: Update touch-action hit-testing to match latest spec changes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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
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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 m_webViewHelper.reset(); // Explicitly reset to break dependency on locally scoped client. 162 m_webViewHelper.reset(); // Explicitly reset to break dependency on locally scoped client.
163 } 163 }
164 164
165 WebView* TouchActionTest::setupTest(std::string file, TouchActionTrackingWebView Client& client) 165 WebView* TouchActionTest::setupTest(std::string file, TouchActionTrackingWebView Client& client)
166 { 166 {
167 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL), WebString::fromUTF8(file)); 167 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL), WebString::fromUTF8(file));
168 // Note that JavaScript must be enabled for shadow DOM tests. 168 // Note that JavaScript must be enabled for shadow DOM tests.
169 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + file, true, 0, &client); 169 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + file, true, 0, &client);
170 170
171 // Set size to enable hit testing, and avoid line wrapping for consistency w ith browser. 171 // Set size to enable hit testing, and avoid line wrapping for consistency w ith browser.
172 webView->resize(WebSize(800, 1200)); 172 webView->resize(WebSize(800, 1600));
Rick Byers 2014/04/02 20:25:20 Check to see if this is really needed - I believe
Zeeshan Qureshi 2014/04/04 01:12:31 This wasn't needed after all.
173 173
174 // Scroll to verify the code properly transforms windows to client co-ords. 174 // Scroll to verify the code properly transforms windows to client co-ords.
175 const int kScrollOffset = 100; 175 const int kScrollOffset = 100;
176 RefPtr<WebCore::Document> document = static_cast<PassRefPtr<WebCore::Documen t> >(webView->mainFrame()->document()); 176 RefPtr<WebCore::Document> document = static_cast<PassRefPtr<WebCore::Documen t> >(webView->mainFrame()->document());
177 document->frame()->view()->setScrollOffset(WebCore::IntPoint(0, kScrollOffse t)); 177 document->frame()->view()->setScrollOffset(WebCore::IntPoint(0, kScrollOffse t));
178 178
179 return webView; 179 return webView;
180 } 180 }
181 181
182 void TouchActionTest::runTestOnTree(WebCore::ContainerNode* root, WebView* webVi ew, TouchActionTrackingWebViewClient& client) 182 void TouchActionTest::runTestOnTree(WebCore::ContainerNode* root, WebView* webVi ew, TouchActionTrackingWebViewClient& client)
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 { 324 {
325 runShadowDOMTest("touch-action-shadow-dom.html"); 325 runShadowDOMTest("touch-action-shadow-dom.html");
326 } 326 }
327 327
328 TEST_F(TouchActionTest, Pan) 328 TEST_F(TouchActionTest, Pan)
329 { 329 {
330 runTouchActionTest("touch-action-pan.html"); 330 runTouchActionTest("touch-action-pan.html");
331 } 331 }
332 332
333 } 333 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698