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

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

Issue 2479123003: WIP Add getCoalescedEvents API using vector of WebInputEvents (Closed)
Patch Set: Creating CoalescedWebInputEvent Created 4 years, 1 month 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 25 matching lines...) Expand all
36 #include "core/dom/shadow/ShadowRoot.h" 36 #include "core/dom/shadow/ShadowRoot.h"
37 #include "core/frame/FrameView.h" 37 #include "core/frame/FrameView.h"
38 #include "core/frame/LocalFrame.h" 38 #include "core/frame/LocalFrame.h"
39 #include "core/html/HTMLIFrameElement.h" 39 #include "core/html/HTMLIFrameElement.h"
40 #include "core/input/EventHandler.h" 40 #include "core/input/EventHandler.h"
41 #include "core/layout/HitTestResult.h" 41 #include "core/layout/HitTestResult.h"
42 #include "core/layout/LayoutTreeAsText.h" 42 #include "core/layout/LayoutTreeAsText.h"
43 #include "core/layout/api/LayoutViewItem.h" 43 #include "core/layout/api/LayoutViewItem.h"
44 #include "platform/testing/URLTestHelpers.h" 44 #include "platform/testing/URLTestHelpers.h"
45 #include "platform/testing/UnitTestHelpers.h" 45 #include "platform/testing/UnitTestHelpers.h"
46 #include "public/platform/CoalescedWebInputEvent.h"
46 #include "public/platform/Platform.h" 47 #include "public/platform/Platform.h"
47 #include "public/platform/WebInputEvent.h" 48 #include "public/platform/WebInputEvent.h"
48 #include "public/platform/WebURLLoaderMockFactory.h" 49 #include "public/platform/WebURLLoaderMockFactory.h"
49 #include "public/web/WebCache.h" 50 #include "public/web/WebCache.h"
50 #include "public/web/WebDocument.h" 51 #include "public/web/WebDocument.h"
51 #include "public/web/WebFrame.h" 52 #include "public/web/WebFrame.h"
52 #include "public/web/WebHitTestResult.h" 53 #include "public/web/WebHitTestResult.h"
53 #include "public/web/WebTouchAction.h" 54 #include "public/web/WebTouchAction.h"
54 #include "public/web/WebView.h" 55 #include "public/web/WebView.h"
55 #include "public/web/WebViewClient.h" 56 #include "public/web/WebViewClient.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 : WebTouchPoint::StateCancelled); 381 : WebTouchPoint::StateCancelled);
381 webTouchEvent.touches[0].id = kfakeTouchId; 382 webTouchEvent.touches[0].id = kfakeTouchId;
382 webTouchEvent.touches[0].screenPosition.x = clientPoint.x(); 383 webTouchEvent.touches[0].screenPosition.x = clientPoint.x();
383 webTouchEvent.touches[0].screenPosition.y = clientPoint.y(); 384 webTouchEvent.touches[0].screenPosition.y = clientPoint.y();
384 webTouchEvent.touches[0].position.x = clientPoint.x(); 385 webTouchEvent.touches[0].position.x = clientPoint.x();
385 webTouchEvent.touches[0].position.y = clientPoint.y(); 386 webTouchEvent.touches[0].position.y = clientPoint.y();
386 webTouchEvent.touches[0].radiusX = 10; 387 webTouchEvent.touches[0].radiusX = 10;
387 webTouchEvent.touches[0].radiusY = 10; 388 webTouchEvent.touches[0].radiusY = 10;
388 webTouchEvent.touches[0].force = 1.0; 389 webTouchEvent.touches[0].force = 1.0;
389 390
390 webView->handleInputEvent(webTouchEvent); 391 webView->handleInputEvent(CoalescedWebInputEvent(webTouchEvent));
391 runPendingTasks(); 392 runPendingTasks();
392 } 393 }
393 394
394 // crbug.com/411038 395 // crbug.com/411038
395 TEST_F(TouchActionTest, Simple) { 396 TEST_F(TouchActionTest, Simple) {
396 runTouchActionTest("touch-action-simple.html"); 397 runTouchActionTest("touch-action-simple.html");
397 } 398 }
398 399
399 TEST_F(TouchActionTest, Overflow) { 400 TEST_F(TouchActionTest, Overflow) {
400 runTouchActionTest("touch-action-overflow.html"); 401 runTouchActionTest("touch-action-overflow.html");
401 } 402 }
402 403
403 TEST_F(TouchActionTest, IFrame) { 404 TEST_F(TouchActionTest, IFrame) {
404 runIFrameTest("touch-action-iframe.html"); 405 runIFrameTest("touch-action-iframe.html");
405 } 406 }
406 407
407 TEST_F(TouchActionTest, ShadowDOM) { 408 TEST_F(TouchActionTest, ShadowDOM) {
408 runShadowDOMTest("touch-action-shadow-dom.html"); 409 runShadowDOMTest("touch-action-shadow-dom.html");
409 } 410 }
410 411
411 TEST_F(TouchActionTest, Pan) { 412 TEST_F(TouchActionTest, Pan) {
412 runTouchActionTest("touch-action-pan.html"); 413 runTouchActionTest("touch-action-pan.html");
413 } 414 }
414 415
415 } // namespace blink 416 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698