Skip to content

Commit 4cacc9d

Browse files
committed
Add back test ensuring preservation of pointer location
This was removed back in 0606379 but only because the comment above it was misleading.
1 parent c8f6bf9 commit 4cacc9d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

java/client/test/org/openqa/selenium/CorrectEventFiringTest.java

+19
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import static org.openqa.selenium.testing.TestUtilities.isOldIe;
4444

4545
import org.junit.Test;
46+
import org.openqa.selenium.interactions.Actions;
4647
import org.openqa.selenium.support.ui.WebDriverWait;
4748
import org.openqa.selenium.testing.Ignore;
4849
import org.openqa.selenium.testing.JUnit4TestBase;
@@ -123,6 +124,24 @@ public void testShouldFireMouseOverEventWhenClicking() {
123124
assertEventFired("mouseover", driver);
124125
}
125126

127+
/**
128+
* This isn't quite right. We just loaded the page, and the native mouse is assumed to be at 0,0
129+
* (or the last location the mouse was in) In order to click the element, the mouse will have to
130+
* move towards it.
131+
*/
132+
@Test
133+
@Ignore(MARIONETTE)
134+
public void testShouldFireMouseMoveEventWhenClicking() {
135+
driver.get(pages.simpleTestPage);
136+
// Move the mouse cursor to somewhere pretty far down the page
137+
new Actions(driver).moveToElement(driver.findElement(By.id("span"))).perform();
138+
139+
driver.get(pages.javascriptPage);
140+
clickOnElementWhichRecordsEvents(driver);
141+
142+
assertEventFired("mousemove", driver);
143+
}
144+
126145
@Test
127146
public void testShouldNotThrowIfEventHandlerThrows() {
128147
driver.get(pages.javascriptPage);

0 commit comments

Comments
 (0)