Skip to content

Commit

Permalink
Breaking a circular build dependency in test code
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Jun 27, 2014
1 parent 6b58d26 commit 4c6f34e
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NativeEventsRequired;
import org.openqa.selenium.testing.NeedsLocalEnvironment;
import org.openqa.selenium.testing.TestUtilities;

import java.util.Arrays;
import java.util.Set;
Expand Down Expand Up @@ -132,10 +131,18 @@ private boolean isIgnoredBecauseOfNativeEvents(NativeEventsRequired annotation)
}

// We only have native events on Linux and Windows.
Platform platform = TestUtilities.getEffectivePlatform();
Platform platform = getEffectivePlatform();
return !(platform.is(LINUX) || platform.is(WINDOWS));
}

private static Platform getEffectivePlatform() {
if (SauceDriver.shouldUseSauce()) {
return SauceDriver.getEffectivePlatform();
}

return Platform.getCurrent();
}

private boolean isIgnoredDueToBeingOnSauce(FrameworkMethod method, Object test) {
return SauceDriver.shouldUseSauce() &&
(method.getMethod().getAnnotation(NeedsLocalEnvironment.class) != null ||
Expand Down

0 comments on commit 4c6f34e

Please sign in to comment.