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

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

Issue 967213004: Removed FrameView's windowToContents and contentsToWindow methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 9 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/PinchViewportTest.cpp ('k') | Source/web/tests/WebPluginContainerTest.cpp » ('j') | 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 FrameView* frameView = frame->view(); 252 FrameView* frameView = frame->view();
253 IntRect visibleRect = frameView->windowClipRect(); 253 IntRect visibleRect = frameView->windowClipRect();
254 ASSERT_TRUE(visibleRect.contains(clientPoint)) << failureContextPos 254 ASSERT_TRUE(visibleRect.contains(clientPoint)) << failureContextPos
255 << " Test point not contained in visible area: " << visibleRect. x() << "," << visibleRect.y() 255 << " Test point not contained in visible area: " << visibleRect. x() << "," << visibleRect.y()
256 << "-" << visibleRect.maxX() << "," << visibleRect.maxY(); 256 << "-" << visibleRect.maxX() << "," << visibleRect.maxY();
257 257
258 // First validate that a hit test at this point will really hit the element 258 // First validate that a hit test at this point will really hit the element
259 // we intended. This is the easiest way for a test to be broken, but has nothing really 259 // we intended. This is the easiest way for a test to be broken, but has nothing really
260 // to do with touch action. 260 // to do with touch action.
261 // Note that we can't use WebView's hit test API because it doesn't look into shadow DOM. 261 // Note that we can't use WebView's hit test API because it doesn't look into shadow DOM.
262 IntPoint docPoint(frameView->windowToContents(clientPoint)); 262 IntPoint docPoint(frameView->rootFrameToContents(clientPoint));
263 HitTestResult result = frame->eventHandler().hitTestResultAtPoint(do cPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); 263 HitTestResult result = frame->eventHandler().hitTestResultAtPoint(do cPoint, HitTestRequest::ReadOnly | HitTestRequest::Active);
264 ASSERT_EQ(element, result.innerElement()) << "Unexpected hit test re sult " << failureContextPos 264 ASSERT_EQ(element, result.innerElement()) << "Unexpected hit test re sult " << failureContextPos
265 << " Got element: \"" << result.innerElement()->outerHTML().str ipWhiteSpace().left(80).ascii().data() << "\"" 265 << " Got element: \"" << result.innerElement()->outerHTML().str ipWhiteSpace().left(80).ascii().data() << "\""
266 << std::endl << "Document render tree:" << std::endl << external Representation(root->document().frame()).utf8().data(); 266 << std::endl << "Document render tree:" << std::endl << external Representation(root->document().frame()).utf8().data();
267 267
268 // Now send the touch event and check any touch action result. 268 // Now send the touch event and check any touch action result.
269 sendTouchEvent(webView, WebInputEvent::TouchStart, clientPoint); 269 sendTouchEvent(webView, WebInputEvent::TouchStart, clientPoint);
270 270
271 AtomicString expectedAction = element->getAttribute("expected-action "); 271 AtomicString expectedAction = element->getAttribute("expected-action ");
272 if (expectedAction == "auto") { 272 if (expectedAction == "auto") {
(...skipping 67 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/PinchViewportTest.cpp ('k') | Source/web/tests/WebPluginContainerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698