summaryrefslogtreecommitdiffstats
path: root/client/tests/src
diff options
context:
space:
mode:
authorDenis Anisimov <denis@vaadin.com>2014-09-07 16:33:30 +0300
committerDenis Anisimov <denis@vaadin.com>2014-10-09 14:35:48 +0300
commit709f35aca0f445444c8052015e34113e567a3166 (patch)
tree3492e967f97681e27ae3e75b43e5f946c37dbebe /client/tests/src
parent29b57f24f735fc529df3487820bc8f2cb513385a (diff)
downloadvaadin-framework-709f35aca0f445444c8052015e34113e567a3166.tar.gz
vaadin-framework-709f35aca0f445444c8052015e34113e567a3166.zip
isIPad() and isIPhone() methods are added to WebBrowser (#14424,#14423).
Change-Id: I7b3556d5f9c1dd84beec638d7fbff1c5382070a4
Diffstat (limited to 'client/tests/src')
-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);
}