Bug 519844 - Improve test_setCursorLocation stability
Summary: Improve test_setCursorLocation stability
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.8   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Leo Ufimtsev CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2017-07-18 12:41 EDT by Leo Ufimtsev CLA
Modified: 2017-08-01 10:32 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Ufimtsev CLA 2017-07-18 12:41:57 EDT
The current setCurorLocation* are somewhat frustrating.

1) They fails if there is the slightest mouse movement.
2) They jerk the mouse around. This is a usability nuisance as it is somewhat annoying... This has been annoying me for years...

Solution:
1) I noticed it creates a screenshot before getting the resultant cursor location. Instead, the screenshot can be taken after, this makes it less prone to erroring out.
In fact, it can be moved such that it's only taken if test fails.

2) Cache cursor location & restore it after test. 
(this has shown to work well for test_StatusTextListener_hoverMouseOverLink(). 

~Patch en route.
Comment 1 Eclipse Genie CLA 2017-07-18 12:42:48 EDT
New Gerrit change created: https://git.eclipse.org/r/101451