Index: Source/web/tests/TouchActionTest.cpp |
diff --git a/Source/web/tests/TouchActionTest.cpp b/Source/web/tests/TouchActionTest.cpp |
index 9cb4f7c3513d232af60559ef933150aee7c593b9..b4ccceff40dfd8c2f5d1a184596eba86b8e6d9a5 100644 |
--- a/Source/web/tests/TouchActionTest.cpp |
+++ b/Source/web/tests/TouchActionTest.cpp |
@@ -169,7 +169,7 @@ WebView* TouchActionTest::setupTest(std::string file, TouchActionTrackingWebView |
WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + file, true, 0, &client); |
// Set size to enable hit testing, and avoid line wrapping for consistency with browser. |
- webView->resize(WebSize(700, 1000)); |
+ webView->resize(WebSize(800, 1200)); |
gnana
2014/02/24 18:59:50
I changed this to fix the unit test failure for
Rick Byers
2014/02/25 22:52:03
Yeah, that should be fine. At some point we may w
gnana
2014/02/27 13:26:59
Done.
|
// Scroll to verify the code properly transforms windows to client co-ords. |
const int kScrollOffset = 100; |
@@ -252,14 +252,18 @@ void TouchActionTest::runTestOnTree(WebCore::ContainerNode* root, WebView* webVi |
<< " Got element: \"" << result.innerElement()->outerHTML().stripWhiteSpace().left(80).ascii().data() << "\"" |
<< std::endl << "Document render tree:" << std::endl << externalRepresentation(root->document().frame()).utf8().data(); |
+ WebCore::HitTestResult taResult = frame->eventHandler().hitTestResultAtPoint(docPoint, WebCore::HitTestRequest::ReadOnly | WebCore::HitTestRequest::Active | WebCore::HitTestRequest::TouchAction); |
+ |
// Now send the touch event and check any touch action result. |
sendTouchEvent(webView, WebInputEvent::TouchStart, clientPoint); |
AtomicString expectedAction = element->getAttribute("expected-action"); |
if (expectedAction == "auto") { |
- // Auto is the default - no action set. |
- EXPECT_EQ(0, client.touchActionSetCount()) << failureContextPos; |
- EXPECT_EQ(WebTouchActionAuto, client.lastTouchAction()) << failureContextPos; |
+ if (taResult.innerElement() == result.innerElement()) { |
gnana
2014/02/24 18:59:50
I have added this check for cases similar to this
Rick Byers
2014/02/25 22:52:03
Oh! Something is wrong with the hit testing code
gnana
2014/02/27 13:26:59
Debugged and found that this issue caused in inlin
Rick Byers
2014/02/27 14:53:11
Good work!
|
+ // Auto is the default - no action set. |
+ EXPECT_EQ(0, client.touchActionSetCount()) << failureContextPos; |
+ EXPECT_EQ(WebTouchActionAuto, client.lastTouchAction()) << failureContextPos; |
+ } |
} else { |
// Should have received exactly one touch action. |
EXPECT_EQ(1, client.touchActionSetCount()) << failureContextPos; |