Commit 607ae5f9 authored by zeeshanq@chromium.org's avatar zeeshanq@chromium.org

Touch text selection is going to be enabled on aura and these layout tests

needed to be updated. Long press on text will no longer show a context menu.

BUG=381152

Review URL: https://codereview.chromium.org/320453002

git-svn-id: svn://svn.chromium.org/blink/trunk@175595 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 1d8a653f
......@@ -3,5 +3,4 @@ PASS successfullyParsed is true
TEST COMPLETE
This test checks that the context menu is shown on long press gesture.
Testing
PASS
......@@ -2,10 +2,16 @@
<html>
<head>
<script src="../../../../resources/js-test.js"></script>
<style>
#empty {
width: 100px;
height: 50px;
}
</style>
</head>
<body onload="test()">
<p>This test checks that the context menu is shown on long press gesture.</p>
<div id="text">Testing</div>
<div id="empty"></div>
<div id="result">FAIL</div>
<script>
function test()
......@@ -15,10 +21,10 @@ function test()
document.oncontextmenu = function() { document.getElementById("result").innerHTML = "PASS"; }
var text = document.getElementById("text");
var empty = document.getElementById("empty");
var x = text.offsetParent.offsetLeft + text.offsetLeft + 4;
var y = text.offsetParent.offsetTop + text.offsetTop + text.offsetHeight / 2;
var x = empty.offsetParent.offsetLeft + empty.offsetLeft + 4;
var y = empty.offsetParent.offsetTop + empty.offsetTop + empty.offsetHeight / 2;
if (!window.eventSender)
return;
......
......@@ -26,6 +26,9 @@ function setCursorPosition(position)
if (window.testRunner)
testRunner.dumpAsText();
if (window.internals)
internals.settings.setTouchEditingEnabled(false);
var text = document.getElementById("text");
setCursorPosition(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment