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

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

Issue 1617863002: Set the correct pressure for pointer events based on force (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Applying comments Created 4 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) 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 webTouchEvent.touches[0].state = (type == WebInputEvent::TouchStart ? 332 webTouchEvent.touches[0].state = (type == WebInputEvent::TouchStart ?
333 WebTouchPoint::StatePressed : 333 WebTouchPoint::StatePressed :
334 WebTouchPoint::StateCancelled); 334 WebTouchPoint::StateCancelled);
335 webTouchEvent.touches[0].id = kfakeTouchId; 335 webTouchEvent.touches[0].id = kfakeTouchId;
336 webTouchEvent.touches[0].screenPosition.x = clientPoint.x(); 336 webTouchEvent.touches[0].screenPosition.x = clientPoint.x();
337 webTouchEvent.touches[0].screenPosition.y = clientPoint.y(); 337 webTouchEvent.touches[0].screenPosition.y = clientPoint.y();
338 webTouchEvent.touches[0].position.x = clientPoint.x(); 338 webTouchEvent.touches[0].position.x = clientPoint.x();
339 webTouchEvent.touches[0].position.y = clientPoint.y(); 339 webTouchEvent.touches[0].position.y = clientPoint.y();
340 webTouchEvent.touches[0].radiusX = 10; 340 webTouchEvent.touches[0].radiusX = 10;
341 webTouchEvent.touches[0].radiusY = 10; 341 webTouchEvent.touches[0].radiusY = 10;
342 webTouchEvent.touches[0].force = 1.0;
342 343
343 webView->handleInputEvent(webTouchEvent); 344 webView->handleInputEvent(webTouchEvent);
344 runPendingTasks(); 345 runPendingTasks();
345 } 346 }
346 347
347 // crbug.com/411038 348 // crbug.com/411038
348 TEST_F(TouchActionTest, Simple) 349 TEST_F(TouchActionTest, Simple)
349 { 350 {
350 runTouchActionTest("touch-action-simple.html"); 351 runTouchActionTest("touch-action-simple.html");
351 } 352 }
(...skipping 12 matching lines...) Expand all
364 { 365 {
365 runShadowDOMTest("touch-action-shadow-dom.html"); 366 runShadowDOMTest("touch-action-shadow-dom.html");
366 } 367 }
367 368
368 TEST_F(TouchActionTest, Pan) 369 TEST_F(TouchActionTest, Pan)
369 { 370 {
370 runTouchActionTest("touch-action-pan.html"); 371 runTouchActionTest("touch-action-pan.html");
371 } 372 }
372 373
373 } // namespace blink 374 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/PlatformTouchPoint.h ('k') | third_party/WebKit/public/platform/WebPointerProperties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698