@@ -127,9 +127,7 @@ public void testShouldAllowInheritedStylesToBeUsed() {
127
127
reason = "HtmlUnit: Advanced mouse actions only implemented in rendered browsers. Firefox: hover is broken again." )
128
128
@ Test
129
129
public void testShouldAllowUsersToHoverOverElements () {
130
- if (!hasInputDevices ()) {
131
- return ;
132
- }
130
+ assumeTrue (hasInputDevices ());
133
131
134
132
driver .get (pages .javascriptPage );
135
133
@@ -157,9 +155,7 @@ public Boolean call() throws Exception {
157
155
reason = "HtmlUnit: Advanced mouse actions only implemented in rendered browsers" )
158
156
@ Test
159
157
public void testHoverPersists () throws Exception {
160
- if (!hasInputDevices ()) {
161
- return ;
162
- }
158
+ assumeTrue (hasInputDevices ());
163
159
164
160
// This test passes on IE. When running in Firefox on Windows, the test
165
161
// will fail if the mouse cursor is not in the window. Solution: Maximize.
@@ -203,9 +199,7 @@ public Boolean call() throws Exception {
203
199
@ NeedsLocalEnvironment
204
200
@ Test
205
201
public void testPersistentHoverCanBeTurnedOff () throws Exception {
206
- if (!hasInputDevices ()) {
207
- return ;
208
- }
202
+ assumeTrue (hasInputDevices ());
209
203
210
204
assumeTrue (TestUtilities .isInternetExplorer (driver ));
211
205
// Destroy the previous driver to make sure the hovering thread is
@@ -314,9 +308,7 @@ public void testCorrectlyDetectMapElementsAreShown() {
314
308
@ JavascriptEnabled
315
309
@ Test
316
310
public void testCanClickOnSuckerFishMenuItem () throws Exception {
317
- if (!hasInputDevices ()) {
318
- return ;
319
- }
311
+ assumeTrue (hasInputDevices ());
320
312
321
313
driver .get (pages .javascriptPage );
322
314
@@ -338,10 +330,7 @@ public void testCanClickOnSuckerFishMenuItem() throws Exception {
338
330
reason = "Advanced mouse actions only implemented in rendered browsers" )
339
331
@ Test
340
332
public void testMovingMouseByRelativeOffset () {
341
- if (!hasInputDevices ()) {
342
- System .out .println ("Skipping move by offset test: no input devices" );
343
- return ;
344
- }
333
+ assumeTrue (hasInputDevices ());
345
334
346
335
driver .get (pages .mouseTrackerPage );
347
336
@@ -362,10 +351,7 @@ public void testMovingMouseByRelativeOffset() {
362
351
reason = "Advanced mouse actions only implemented in rendered browsers" )
363
352
@ Test
364
353
public void testMovingMouseToRelativeElementOffset () {
365
- if (!hasInputDevices ()) {
366
- System .out .println ("Skipping move to offset test: no input devices: %s" );
367
- return ;
368
- }
354
+ assumeTrue (hasInputDevices ());
369
355
370
356
driver .get (pages .mouseTrackerPage );
371
357
@@ -383,10 +369,7 @@ public void testMovingMouseToRelativeElementOffset() {
383
369
reason = "Advanced mouse actions only implemented in rendered browsers" )
384
370
@ Test
385
371
public void testMovingMouseToRelativeZeroElementOffset () {
386
- if (!hasInputDevices ()) {
387
- System .out .println ("Skipping move to offset test: no input devices" );
388
- return ;
389
- }
372
+ assumeTrue (hasInputDevices ());
390
373
391
374
driver .get (pages .mouseTrackerPage );
392
375
@@ -404,10 +387,7 @@ public void testMovingMouseToRelativeZeroElementOffset() {
404
387
@ Ignore (value = {HTMLUNIT , OPERA }, reason = "Advanced mouse actions only implemented in rendered browsers" )
405
388
@ Test
406
389
public void testMoveRelativeToBody () {
407
- if (!hasInputDevices ()) {
408
- System .out .println (String .format ("Skipping move to offset test: no input devices" ));
409
- return ;
410
- }
390
+ assumeTrue (hasInputDevices ());
411
391
412
392
try {
413
393
driver .get (pages .mouseTrackerPage );
0 commit comments