| Index: LayoutTests/fast/events/touch/gesture/gesture-tap-down-special-elements.html
|
| diff --git a/LayoutTests/fast/events/touch/gesture/gesture-tap-down-special-elements.html b/LayoutTests/fast/events/touch/gesture/gesture-tap-down-special-elements.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0250be475b59c5d25fb536defb350addd4c7d7a1
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/events/touch/gesture/gesture-tap-down-special-elements.html
|
| @@ -0,0 +1,134 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script src="../../../../resources/js-test.js"></script>
|
| +<link rel="stylesheet" href="../resources/touch-hover-active-tests.css">
|
| +<style>
|
| +#box {
|
| + width: 300px;
|
| + height: 50px;
|
| +}
|
| +
|
| +#overflowBox {
|
| + width: 300px;
|
| + height: 600px;
|
| +}
|
| +
|
| +#container {
|
| + width: 300px;
|
| + height: 50px;
|
| + overflow-y: scroll;
|
| + overflow-x: hidden;
|
| + margin: 10px 0 10px 0;
|
| +}
|
| +
|
| +#frame {
|
| + width: 200px;
|
| + height: 50px;
|
| +}
|
| +</style>
|
| +</head>
|
| +<body>
|
| +
|
| +<select id="combobox" class="touch-interactive">
|
| + <option value="1"> One </option>
|
| + <option value="2"> Two </option>
|
| + <option value="3"> Three </option>
|
| + <option value="4"> Four </option>
|
| + <option value="5"> Five </option>
|
| + <option value="6"> Six </option>
|
| + <option value="7"> Sever </option>
|
| + <option value="8"> Eight </option>
|
| + <option value="9"> Nine </option>
|
| + <option value="10"> Ten </option>
|
| + <option value="11"> Eleven </option>
|
| + <option value="12"> Twelve </option>
|
| + <option value="13"> Thirteen </option>
|
| + <option value="14"> Fourteen </option>
|
| + <option value="15"> Fifteen </option>
|
| + <option value="16"> Sixteen </option>
|
| + <option value="17"> Seventeen </option>
|
| + <option value="18"> Eighteen </option>
|
| + <option value="19"> Nineteen </option>
|
| + <option value="20"> Twenty </option>
|
| +</select>
|
| +
|
| +<select id="listbox" class="touch-interactive" multiple="5">
|
| + <option value="1"> One </option>
|
| + <option value="2"> Two </option>
|
| + <option value="3"> Three </option>
|
| + <option value="4"> Four </option>
|
| + <option value="5"> Five </option>
|
| + <option value="6"> Six </option>
|
| + <option value="7"> Sever </option>
|
| + <option value="8"> Eight </option>
|
| + <option value="9"> Nine </option>
|
| + <option value="10"> Ten </option>
|
| +</select>
|
| +
|
| +<input type="text" id="textbox" class="touch-interactive" value="The input element represents a typed data field, usually with a form control to allow the user to edit the data."/>
|
| +
|
| +<textarea id="textarea" class="touch-interactive" rows="3">
|
| +The textarea element represents a multiline plain text edit control for the element's raw value. The contents of the control represent the control's default value.
|
| +
|
| +The raw value of a textarea control must be initially the empty string.
|
| +</textarea>
|
| +
|
| +<iframe id="frame" src="resources/gesture-tap-down-iframe.html"></iframe>
|
| +
|
| +<p id="description"></p>
|
| +<p>See http://crbug.com/316974 for details</p>
|
| +
|
| +<div id="console" style="clear:both; float: left"></div>
|
| +
|
| +<script src="../resources/touch-hover-active-tests.js"></script>
|
| +<script>
|
| +var combobox = document.getElementById("combobox");
|
| +var listbox = document.getElementById("listbox");
|
| +var textbox = document.getElementById("textbox");
|
| +var textarea = document.getElementById("textarea");
|
| +var frame = document.getElementById("frame");
|
| +var frameBody;
|
| +
|
| +if (window.internals) {
|
| + internals.settings.setViewportEnabled(true);
|
| + internals.settings.setViewportMetaEnabled(true);
|
| +}
|
| +
|
| +description("Tests gesture tapdown behaviour on different form elements.");
|
| +
|
| +function runTests()
|
| +{
|
| + if (!window.eventSender) {
|
| + debug('This test requires DRT.');
|
| + return;
|
| + }
|
| +
|
| + if (!eventSender.gestureTapDown
|
| + || !eventSender.gestureShowPress) {
|
| + debug('Gesture events are not supported by this platform');
|
| + return;
|
| + }
|
| +
|
| + // Insert meta tag after viewport has been enabled via internals
|
| + var meta = document.createElement('meta');
|
| + meta.name = 'viewport';
|
| + meta.content = 'width=device-width, initial-scale=1, user-scalable=no';
|
| + document.head.appendChild(meta);
|
| +
|
| + // Frame should be ready now
|
| + frameBody = frame.contentDocument.body;
|
| +
|
| + debug("Scroll and Pinch are disabled on the page");
|
| + hasEarlyShowPress("getHoverActiveState(combobox)", elementCenter(combobox), true);
|
| + hasEarlyShowPress("getHoverActiveState(listbox)", elementCenter(listbox), false);
|
| + hasEarlyShowPress("getHoverActiveState(textbox)", elementCenter(textbox), false);
|
| + hasEarlyShowPress("getHoverActiveState(textarea)", elementCenter(textarea), false);
|
| + hasEarlyShowPress("getHoverActiveState(frameBody)", elementCenter(frame), false);
|
| +}
|
| +
|
| +window.onload = runTests;
|
| +</script>
|
| +</body>
|
| +</html>
|
| +
|
|
|