summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/test/java/com/vaadin/tests/CurrentTimeMillisTest.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/CurrentTimeMillisTest.java b/uitest/src/test/java/com/vaadin/tests/CurrentTimeMillisTest.java
index b703a3b2a5..2bfa1f9ad4 100644
--- a/uitest/src/test/java/com/vaadin/tests/CurrentTimeMillisTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/CurrentTimeMillisTest.java
@@ -40,8 +40,9 @@ public class CurrentTimeMillisTest extends MultiBrowserTest {
setDebug(true);
openTestURL();
- boolean highResTimeSupported = !BrowserUtil
- .isPhantomJS(getDesiredCapabilities())
+ boolean phantomJs1 = BrowserUtil.isPhantomJS(getDesiredCapabilities())
+ && "1".equals(getDesiredCapabilities().getVersion());
+ boolean highResTimeSupported = !phantomJs1
&& !BrowserUtil.isSafari(getDesiredCapabilities());
String time = getJsonParsingTime();
@@ -51,13 +52,15 @@ public class CurrentTimeMillisTest extends MultiBrowserTest {
time = time.substring(0, time.length() - 2);
}
if (highResTimeSupported) {
- if (BrowserUtil.isChrome(getDesiredCapabilities())) {
+ if (BrowserUtil.isChrome(getDesiredCapabilities())
+ || BrowserUtil.isFirefox(getDesiredCapabilities())) {
// Chrome (version 33 at least) sometimes doesn't use high res
- // time if number of ms is less then 1
+ // time for very short times
Assert.assertTrue(
"High resolution time is not used in "
+ "JSON parsing mesurement. Time=" + time,
- time.equals("0") || time.indexOf('.') > 0);
+ time.equals("0") || time.equals("1")
+ || time.indexOf('.') > 0);
} else {
Assert.assertTrue(
"High resolution time is not used in "