Merge pull request #26 from startswithaj/master

Add support for iPod touch and add device tests for iPhone and iPod
This commit is contained in:
Faisal Salman 2013-11-06 20:23:51 -08:00
commit 4d28bee555
2 changed files with 23 additions and 2 deletions

View File

@ -315,7 +315,7 @@
/(dell)\s(strea[kpr\s\d]*[\dko])/i // Dell Streak /(dell)\s(strea[kpr\s\d]*[\dko])/i // Dell Streak
], [VENDOR, MODEL, [TYPE, TABLET]], [ ], [VENDOR, MODEL, [TYPE, TABLET]], [
/\((ip[honed]+);.+(apple)/i // iPod/iPhone /\((ip[honed|\s\w*]+);.+(apple)/i // iPod/iPhone
], [MODEL, VENDOR, [TYPE, MOBILE]], [ ], [MODEL, VENDOR, [TYPE, MOBILE]], [
/(blackberry)[\s-]?(\w+)/i, // BlackBerry /(blackberry)[\s-]?(\w+)/i, // BlackBerry

View File

@ -28,4 +28,25 @@
"model" : "DROID RAZR 4G", "model" : "DROID RAZR 4G",
"type" : "mobile" "type" : "mobile"
} }
}] },
{
"desc" : "iPhone",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53",
"expect" :
{
"vendor" : "Apple",
"model" : "iPhone",
"type" : "mobile"
}
},
{
"desc" : "Motorola Droid RAZR 4G",
"ua" : "Mozilla/5.0 (iPod touch; CPU iPhone OS 7_0_2 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A501 Safari/9537.53",
"expect" :
{
"vendor" : "Apple",
"model" : "iPod touch",
"type" : "mobile"
}
}
]