summaryrefslogtreecommitdiffstats
path: root/client/tests/src/com/vaadin
diff options
context:
space:
mode:
authorDenis Anisimov <denis@vaadin.com>2014-09-07 16:33:30 +0300
committerMarkus Koivisto <markus@vaadin.com>2014-10-14 18:03:06 +0300
commitcf0682ab3b5346138659c572b074f09455a15638 (patch)
treeed89d70b7bc160398b852565e4b8d864194c6945 /client/tests/src/com/vaadin
parentdd6ef048372e441718ecf357066a374f6570ea2f (diff)
downloadvaadin-framework-cf0682ab3b5346138659c572b074f09455a15638.tar.gz
vaadin-framework-cf0682ab3b5346138659c572b074f09455a15638.zip
isIPad() and isIPhone() methods are added to WebBrowser (#14424,#14423).
Change-Id: I7b3556d5f9c1dd84beec638d7fbff1c5382070a4
Diffstat (limited to 'client/tests/src/com/vaadin')
-rw-r--r--client/tests/src/com/vaadin/client/TestVBrowserDetailsUserAgentParser.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/client/tests/src/com/vaadin/client/TestVBrowserDetailsUserAgentParser.java b/client/tests/src/com/vaadin/client/TestVBrowserDetailsUserAgentParser.java
index dd892b19ec..6cd0630137 100644
--- a/client/tests/src/com/vaadin/client/TestVBrowserDetailsUserAgentParser.java
+++ b/client/tests/src/com/vaadin/client/TestVBrowserDetailsUserAgentParser.java
@@ -85,6 +85,7 @@ public class TestVBrowserDetailsUserAgentParser extends TestCase {
// assertBrowserMinorVersion(bd, 1);
assertEngineVersion(bd, 536f);
assertIOS(bd, 6, 1);
+ assertIPhone(bd);
}
public void testIPhoneIOS5() {
@@ -95,6 +96,7 @@ public class TestVBrowserDetailsUserAgentParser extends TestCase {
assertBrowserMinorVersion(bd, 1);
assertEngineVersion(bd, 534f);
assertIOS(bd, 5, 1);
+ assertIPhone(bd);
}
public void testIPhoneIOS4() {
@@ -105,6 +107,7 @@ public class TestVBrowserDetailsUserAgentParser extends TestCase {
assertBrowserMinorVersion(bd, 0);
assertEngineVersion(bd, 532f);
assertIOS(bd, 4, 0);
+ assertIPhone(bd);
}
public void testIPadIOS4() {
@@ -115,6 +118,7 @@ public class TestVBrowserDetailsUserAgentParser extends TestCase {
assertBrowserMinorVersion(bd, 0);
assertEngineVersion(bd, 533f);
assertIOS(bd, 4, 3);
+ assertIPad(bd);
}
public void testAndroid21() {
@@ -539,6 +543,16 @@ public class TestVBrowserDetailsUserAgentParser extends TestCase {
assertOSMinorVersion(browserDetails, minorVersion);
}
+ private void assertIPhone(VBrowserDetails browserDetails) {
+ assertTrue(browserDetails.isIPhone());
+ assertFalse(browserDetails.isIPad());
+ }
+
+ private void assertIPad(VBrowserDetails browserDetails) {
+ assertFalse(browserDetails.isIPhone());
+ assertTrue(browserDetails.isIPad());
+ }
+
private void assertWindows(VBrowserDetails browserDetails) {
assertWindows(browserDetails, false);
}