summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/editing/spelling/spellcheck-input-search-crash.html
blob: 35e7dae381b47bc557b534ad553981805e294ad2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script>
var clicked = false;

function handleClicked()
{
    clicked = true;
}

function test()
{
    description("This test passes if it doesn't crash and the context menu is shown for the search input");
    if (!window.eventSender)
        return;
    var target = document.getElementById("target");
    var clickX = target.offsetLeft + target.offsetWidth - 2;
    var clickY = target.offsetTop + target.offsetHeight / 2;
    eventSender.mouseMoveTo(clickX, clickY);
    eventSender.contextClick();
    shouldBe("clicked", "true");
}
</script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<input id="target" type="search" oncontextmenu="handleClicked()">
<script>test();</script>
</body>
</html>