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

Side by Side Diff: third_party/WebKit/Source/web/LinkHighlightImplTest.cpp

Issue 2539283002: Remove PlatformGestureEvent in favour of using WebGestureEvent (Closed)
Patch Set: Add missing copyright on new file Created 4 years 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "web/WebLocalFrameImpl.h" 48 #include "web/WebLocalFrameImpl.h"
49 #include "web/WebViewImpl.h" 49 #include "web/WebViewImpl.h"
50 #include "web/tests/FrameTestHelpers.h" 50 #include "web/tests/FrameTestHelpers.h"
51 #include "wtf/PtrUtil.h" 51 #include "wtf/PtrUtil.h"
52 #include <memory> 52 #include <memory>
53 53
54 namespace blink { 54 namespace blink {
55 55
56 GestureEventWithHitTestResults getTargetedEvent(WebViewImpl* webViewImpl, 56 GestureEventWithHitTestResults getTargetedEvent(WebViewImpl* webViewImpl,
57 WebGestureEvent& touchEvent) { 57 WebGestureEvent& touchEvent) {
58 PlatformGestureEventBuilder platformEvent( 58 WebGestureEvent scaledEvent = TransformWebGestureEvent(
59 webViewImpl->mainFrameImpl()->frameView(), touchEvent); 59 webViewImpl->mainFrameImpl()->frameView(), touchEvent);
60 return webViewImpl->page() 60 return webViewImpl->page()
61 ->deprecatedLocalMainFrame() 61 ->deprecatedLocalMainFrame()
62 ->eventHandler() 62 ->eventHandler()
63 .targetGestureEvent(platformEvent, true); 63 .targetGestureEvent(scaledEvent, true);
64 } 64 }
65 65
66 TEST(LinkHighlightImplTest, verifyWebViewImplIntegration) { 66 TEST(LinkHighlightImplTest, verifyWebViewImplIntegration) {
67 const std::string baseURL("http://www.test.com/"); 67 const std::string baseURL("http://www.test.com/");
68 const std::string fileName("test_touch_link_highlight.html"); 68 const std::string fileName("test_touch_link_highlight.html");
69 69
70 URLTestHelpers::registerMockedURLFromBaseURL( 70 URLTestHelpers::registerMockedURLFromBaseURL(
71 WebString::fromUTF8(baseURL.c_str()), 71 WebString::fromUTF8(baseURL.c_str()),
72 WebString::fromUTF8("test_touch_link_highlight.html")); 72 WebString::fromUTF8("test_touch_link_highlight.html"));
73 FrameTestHelpers::WebViewHelper webViewHelper; 73 FrameTestHelpers::WebViewHelper webViewHelper;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 goodTargets, highlightNodes); 260 goodTargets, highlightNodes);
261 261
262 webViewImpl->enableTapHighlights(highlightNodes); 262 webViewImpl->enableTapHighlights(highlightNodes);
263 EXPECT_EQ(2U, webViewImpl->numLinkHighlights()); 263 EXPECT_EQ(2U, webViewImpl->numLinkHighlights());
264 264
265 Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs(); 265 Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs();
266 WebCache::clear(); 266 WebCache::clear();
267 } 267 }
268 268
269 } // namespace blink 269 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/InspectorOverlay.cpp ('k') | third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698