public void DragTooFar()
{
driver.Url = dragAndDropPage;
IWebElement img = driver.FindElement(By.Id("test1"));
// Dragging too far left and up does not move the element. It will be at
// its original location after the drag.
Point originalLocation = new Point(0, 0);
Actions actionProvider = new Actions(driver);
actionProvider.DragAndDropToOffset(img, int.MinValue, int.MinValue).Perform();
Assert.AreEqual(originalLocation, img.Location);
actionProvider.DragAndDropToOffset(img, int.MaxValue, int.MaxValue).Perform();
//We don't know where the img is dragged to , but we know it's not too
//far, otherwise this function will not return for a long long time
}