Add support for sending touch events in DRT.

As part of this, make it possible for DRT to configure the timeout threshold between sending touch events to WebCore as the Layout Tests only synthesize single events, not a stream. Because of this, they often get dropped by the WebView for coming too quickly.

Skip the multi touch test as we don't support multi touch in the Browser.

Change-Id: I7b9830f43181fea33206825b49ef2e294269b4dd
This commit is contained in:
Ben Murdoch
2010-01-13 10:54:56 +00:00
parent ecbfb2104f
commit ecbc65cf8f
6 changed files with 294 additions and 8 deletions

View File

@@ -705,6 +705,7 @@ public class TestShellActivity extends Activity implements LayoutTestController
mDumpDatabaseCallbacks = false;
mCanOpenWindows = false;
mEventSender.resetMouse();
mEventSender.clearTouchPoints();
mPageFinished = false;
mOneHundredPercentComplete = false;
mDumpWebKitData = false;
@@ -769,6 +770,12 @@ public class TestShellActivity extends Activity implements LayoutTestController
webview.setWebChromeClient(mChromeClient);
webview.setWebViewClient(mViewClient);
// Setting a touch interval of -1 effectively disables the optimisation in WebView
// that stops repeated touch events flooding WebCore. The Event Sender only sends a
// single event rather than a stream of events (like what would generally happen in
// a real use of touch events in a WebView) and so if the WebView drops the event,
// the test will fail as the test expects one callback for every touch it synthesizes.
webview.setTouchInterval(-1);
}
private WebView mWebView;