blob: 071187bb29da6a88616609a3c1f7430d498e538c [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<div id="box">This is a test box. ABC 123</div>
if (window.testRunner) {
description("This tests to make sure that right clicking when the left-mouse button is pressed disables the drag.");
var box = document.getElementById("box");
var x = box.offsetLeft;
var y = box.offsetTop + box.offsetHeight / 2;
eventSender.dragMode = false;
eventSender.mouseMoveTo(x, y);
// Start a mouse down with the left mouse button.
// On some platforms, the page only sees a right MouseDown before displaying the
// context menu. The context menu can also be dismissed via Esc and so there is
// no guarantee that a page will see MouseUp.
x = x + 30;
// Move the mouse to initiate a drag.
eventSender.mouseMoveTo(x, y);