Skip to content

Commit

Permalink
Add Android 4.3/Nexus 4 detection test
Browse files Browse the repository at this point in the history
  • Loading branch information
madrobby committed Aug 27, 2013
1 parent 0fa0b8d commit c65ecf2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/detect.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ <h1>Browser detection</h1>
Android_2_1: "Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; Nexus One Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17 Chrome/4.1.249.1025",
Android_4_1_1: "Mozilla/5.0 (Linux; Android 4.1.1; Galaxy Nexus Build/JRO03O) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19",
Android_4_1_1_Tablet: "Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03S) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19",
Android_4_3: "Mozilla/5.0 (Linux; Android 4.3; Nexus 4 Build/JWR66Y) AppleWebKit/537.36 (KTHML, like Gecko) Chrome/29.0.1547.59 Mobile Safari/537.36",

BlackBerry_6_0_0_141: "Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en-GB) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.141 Mobile Safari/534.1+",
PlayBook_1_0_0: "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.8+ (KHTML, like Gecko) Version/0.0.1 Safari/534.8+",
Expand Down Expand Up @@ -127,6 +128,15 @@ <h1>Browser detection</h1>
t.assertTrue(os.tablet)
t.assertTrue(browser.chrome)
})
detect(UA.Android_4_3, function(os, browser){
t.assertTrue(os.android)
t.assertTrue(browser.webkit)
t.assertFalse(!!os.ios)
t.assertEqual("4.3", os.version)
t.assertTrue(os.phone)
t.assertFalse(!!os.iphone)
t.assertTrue(browser.chrome)
})
},

testIOS: function(t){
Expand Down

0 comments on commit c65ecf2

Please sign in to comment.