Comparing version 0.2.0 to 0.3.0
66
index.js
@@ -1,65 +0,3 @@ | ||
module.exports = { | ||
useragent_is: function (ua, options) { | ||
if (!ua) { | ||
// No user agent. | ||
return; | ||
} | ||
if (typeof ua !== 'string') { | ||
throw new Error('User agent must be a string'); | ||
} | ||
options = options || {}; | ||
options.unknownDeviceType = options.unknownDeviceType || 'phone'; | ||
'use strict'; | ||
// overwrite Flipboard user agent otherwise it's detected as a desktop | ||
if( ua.match(/FlipboardProxy/i) ) | ||
ua = 'FlipboardProxy/1.1; http://flipboard.com/browserproxy'; | ||
if( ua.match(/Applebot/i) ) | ||
ua = 'Applebot/0.1; http://www.apple.com/go/applebot'; | ||
if (ua.match(/GoogleTV|SmartTV|Internet TV|NetCast|NETTV|AppleTV|boxee|Kylo|Roku|DLNADOC|hbbtv|CE\-HTML/i)) { | ||
// if user agent is a smart TV - http://goo.gl/FocDk | ||
return 'tv'; | ||
} else if (ua.match(/Xbox|PLAYSTATION 3|Wii/i)) { | ||
// if user agent is a TV Based Gaming Console | ||
return 'tv'; | ||
} else if (ua.match(/iP(a|ro)d/i) || (ua.match(/tablet/i) && !ua.match(/RX-34/i)) || ua.match(/FOLIO/i)) { | ||
// if user agent is a Tablet | ||
return 'tablet'; | ||
} else if (ua.match(/Linux/i) && ua.match(/Android/i) && !ua.match(/Fennec|mobi|HTC Magic|HTCX06HT|Nexus One|SC-02B|fone 945/i)) { | ||
// if user agent is an Android Tablet | ||
return 'tablet'; | ||
} else if (ua.match(/Kindle/i) || (ua.match(/Mac OS/i) && ua.match(/Silk/i)) || (ua.match(/AppleWebKit/i) && ua.match(/Silk/i) && !ua.match(/Playstation Vita/i))) { | ||
// if user agent is a Kindle or Kindle Fire | ||
return 'tablet'; | ||
} else if (ua.match(/GT-P10|SC-01C|SHW-M180S|SGH-T849|SCH-I800|SHW-M180L|SPH-P100|SGH-I987|zt180|HTC( Flyer|_Flyer)|Sprint ATP51|ViewPad7|pandigital(sprnova|nova)|Ideos S7|Dell Streak 7|Advent Vega|A101IT|A70BHT|MID7015|Next2|nook/i) || (ua.match(/MB511/i) && ua.match(/RUTEM/i))) { | ||
// if user agent is a pre Android 3.0 Tablet | ||
return 'tablet'; | ||
} else if (ua.match(/BOLT|Fennec|Iris|Maemo|Minimo|Mobi|mowser|NetFront|Novarra|Prism|RX-34|Skyfire|Tear|XV6875|XV6975|Google Wireless Transcoder/i)) { | ||
// if user agent is unique phone User Agent | ||
return 'phone'; | ||
} else if (ua.match(/Opera/i) && ua.match(/Windows NT 5/i) && ua.match(/HTC|Xda|Mini|Vario|SAMSUNG\-GT\-i8000|SAMSUNG\-SGH\-i9/i)) { | ||
// if user agent is an odd Opera User Agent - http://goo.gl/nK90K | ||
return 'phone'; | ||
} else if ((ua.match(/Windows (NT|XP|ME|9)/) && !ua.match(/Phone/i)) && !ua.match(/Bot|Spider|ia_archiver|NewsGator/i) || ua.match(/Win( ?9|NT)/i)) { | ||
// if user agent is Windows Desktop | ||
return 'desktop'; | ||
} else if (ua.match(/Macintosh|PowerPC/i) && !ua.match(/Silk/i)) { | ||
// if agent is Mac Desktop | ||
return 'desktop'; | ||
} else if (ua.match(/Linux/i) && ua.match(/X11/i) && !ua.match(/Charlotte/i)) { | ||
// if user agent is a Linux Desktop | ||
return 'desktop'; | ||
} else if (ua.match(/CrOS/)) { | ||
// if user agent is a Chrome Book | ||
return 'desktop'; | ||
} else if (ua.match(/Solaris|SunOS|BSD/i)) { | ||
// if user agent is a Solaris, SunOS, BSD Desktop | ||
return 'desktop'; | ||
} else if (ua.match(/Mozilla\/5\.0 \(\)|jack|Applebot|FlipboardProxy|Go 1.1 package|HTMLParser|simplereach|python-requests|ShowyouBot|MetaURI|nineconnections|(^Java\/[0-9._]*)|Commons-HttpClient|InAGist|HTTP-Java-Client|curl|Bot|B-O-T|Crawler|Spider|Spyder|Yahoo|ia_archiver|Covario-IDS|findlinks|DataparkSearch|larbin|Mediapartners-Google|NG-Search|Snappy|Teoma|Jeeves|Charlotte|NewsGator|TinEye|Cerberian|SearchSight|Zao|Scrubby|Qseero|PycURL|Pompos|oegp|SBIder|yoogliFetchAgent|yacy|webcollage|VYU2|voyager|updated|truwoGPS|StackRambler|Sqworm|silk|semanticdiscovery|ScoutJet|Nymesis|NetResearchServer|MVAClient|mogimogi|Mnogosearch|Arachmo|Accoona|holmes|htdig|ichiro|webis|LinkWalker|lwp-trivial|facebookexternalhit/i) && !ua.match(/phone|Playstation/i)) { | ||
// if user agent is a BOT/Crawler/Spider | ||
return 'bot'; | ||
} else { | ||
// Otherwise assume it is a phone Device | ||
return options.unknownDeviceType; | ||
} | ||
} | ||
} | ||
module.exports = require('./lib/wimd.js'); |
{ | ||
"name": "device", | ||
"version": "0.2.0", | ||
"description": "Browser detection library based on express-device, but without the express part", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:jimmybergman/device.git" | ||
"author": "Rodrigo Guerreiro (@rguerreiro)", | ||
"description": "Device type detection library based on the useragent string. Refactored from express-device.", | ||
"keywords": ["browser","mobile","detection","user-agent","useragent","desktop","phone","tablet","tv","bot","parsing","device"], | ||
"version": "0.3.0", | ||
"main": "./index.js", | ||
"private": false, | ||
"engines": { | ||
"node": ">=0.10" | ||
}, | ||
"keywords": [ | ||
"browser", | ||
"mobile", | ||
"detection", | ||
"user-agent", | ||
"platform", | ||
"desktop", | ||
"tablet" | ||
], | ||
"dependencies": { | ||
"useragent": "*" | ||
}, | ||
"devDependencies": { | ||
"mocha": "*" | ||
}, | ||
"scripts": { | ||
"test": "mocha test/" | ||
"test": "mocha" | ||
}, | ||
"dependencies": {}, | ||
"author": "Jimmy Bergman <jimmy@sigint.se>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"mocha": "^2.3.1" | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/rguerreiro/device.git" | ||
} | ||
} |
115
README.md
@@ -1,14 +0,115 @@ | ||
# device - useragent device detection based on express-device | ||
# device [![Build Status](https://secure.travis-ci.org/rguerreiro/device.png?branch=master)](http://travis-ci.org/rguerreiro/device) [![NPM version](https://badge.fury.io/js/device.svg)](http://badge.fury.io/js/device) | ||
## usage | ||
## device | ||
To install: | ||
$ npm install device | ||
Basically the [express-device](https://github.com/rguerreiro/express-device) gained life of it's own and I had to refactor the basic functionality (it makes sense). Many were using [express-device](https://github.com/rguerreiro/express-device) only to identify the type of device and didn't want all the [express](http://expressjs.com) stuff. | ||
Example use: | ||
## how to use it? | ||
$ npm install device | ||
Here's an example on how to use it: | ||
```javascript | ||
var device = require('device'); | ||
device.useragent_is("Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3"); | ||
var mydevice = device('put here user-agent string'); | ||
if(mydevice.is('bot')) | ||
// do something... | ||
else | ||
// do another thing... | ||
``` | ||
By doing this you're getting an object that have the following properties: | ||
<table> | ||
<tr><td><strong>Name</strong></td><td><strong>Field Type</strong></td><td><strong>Description</strong></td><td><strong>Possible Values</strong></td></tr> | ||
<tr> | ||
<td>type</td> | ||
<td>string</td> | ||
<td>It gets the device type for the parsed user-agent string</td> | ||
<td>desktop, tv, tablet, phone or bot</td> | ||
</tr> | ||
<tr> | ||
<td>model</td> | ||
<td>string</td> | ||
<td>It gets the device model name for the parsed user-agent string</td> | ||
<td>Example: iPhone. If the option <strong>parseUserAgent</strong> is set to false, then it will return an empty string</td> | ||
</tr> | ||
</table> | ||
will return 'tablet' | ||
It accepts an object with only the config options you which to override (go [here](https://github.com/rguerreiro/device/blob/master/test/not_default_options_test.js) for some examples). The ones you don't override it will use the default values. Here's the list with the available config options: | ||
<table> | ||
<tr><td><strong>Name</strong></td><td><strong>Field Type</strong></td><td><strong>Description</strong></td><td><strong>Possible Values</strong></td></tr> | ||
<tr> | ||
<td>emptyUserAgentDeviceType</td> | ||
<td>string</td> | ||
<td>Device type to be returned whenever the has an empty user-agent. Defaults to desktop.</td> | ||
<td>desktop, tv, tablet, phone or bot</td> | ||
</tr> | ||
<tr> | ||
<td>unknownUserAgentDeviceType</td> | ||
<td>string</td> | ||
<td>Device type to be returned whenever the user-agent is unknown. Defaults to phone.</td> | ||
<td>desktop, tv, tablet, phone or bot</td> | ||
</tr> | ||
<tr> | ||
<td>botUserAgentDeviceType</td> | ||
<td>string</td> | ||
<td>Device type to be returned whenever the user-agent belongs to a bot. Defaults to bot.</td> | ||
<td>desktop, tv, tablet, phone or bot</td> | ||
</tr> | ||
<tr> | ||
<td>parseUserAgent</td> | ||
<td>string</td> | ||
<td>Configuration to parse the user-agent string using the <a href="https://www.npmjs.com/package/useragent">useragent</a> npm package. It's needed in order to get the device name. Defaults to false.</td> | ||
<td>true | false</td> | ||
</tr> | ||
</table> | ||
In case you didn't notice there's also a method **is()** that will return a boolean (true or false) when you pass the device type that you want validate against (check the initial example). | ||
## contributors | ||
Some contributed in the [express-device](https://github.com/rguerreiro/express-device) repository. | ||
- [@rguerreiro](https://github.com/rguerreiro) | ||
- [@aledbf](https://github.com/aledbf) | ||
- [@ryansully](https://github.com/ryansully) | ||
- [@lyxsus](https://github.com/lyxsus) | ||
- [@dsyph3r](https://github.com/dsyph3r) | ||
- [@davo11122](https://github.com/davo11122) | ||
- [@esco](https://github.com/esco) | ||
- [@Saicheg](https://github.com/Saicheg) | ||
- [@brycekahle](https://github.com/brycekahle) | ||
- [@manjeshpv](https://github.com/manjeshpv) | ||
- [@Sitebase](https://github.com/Sitebase) | ||
- [@lennym](https://github.com/lennym) | ||
Special thanks to [@jimmybergman](https://github.com/jimmybergman) that allowed me to use his `device` package for this refactoring. | ||
## where to go from here? | ||
Currently, `device` is on **version 0.5.0**. In order to add more features I'm asking anyone to contribute with some ideas. You can do it by making some feature requests on the issues panel, but I prefer that you make your contribution with some pull requests ;) | ||
## license | ||
The MIT License (MIT) | ||
Copyright (c) 2015 Rodrigo Guerreiro | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
@@ -1,9 +0,9 @@ | ||
var device = require('../'), | ||
var device = require('../lib/device.js'), | ||
assert = require('assert'); | ||
describe('device', function() { | ||
describe('device', function() { | ||
describe('1.Accoona-AI-Agent 1.1.2',function(){ | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Accoona-AI-Agent/1.1.2'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Accoona-AI-Agent/1.1.2'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -13,4 +13,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Arachmo)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Arachmo)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -20,4 +20,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; B-l-i-t-z-B-O-T)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Mozilla/4.0 (compatible; B-l-i-t-z-B-O-T)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -27,4 +27,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Cerberian Drtrs Version-3.2-Build-1)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Cerberian Drtrs Version-3.2-Build-1)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -34,4 +34,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Cerberian Drtrs Version-3.2-Build-0)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Cerberian Drtrs Version-3.2-Build-0)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -41,4 +41,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; Charlotte/0.9t; http://www.searchme.com/support/)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Mozilla/5.0 (compatible; Charlotte/0.9t; http://www.searchme.com/support/)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -48,4 +48,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; Charlotte/0.9t; +http://www.searchme.com/support/)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Mozilla/5.0 (compatible; Charlotte/0.9t; +http://www.searchme.com/support/)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -55,4 +55,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; Charlotte/1.0b; http://www.searchme.com/support/)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Mozilla/5.0 (compatible; Charlotte/1.0b; http://www.searchme.com/support/)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -62,4 +62,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; Charlotte/1.0t; http://www.searchme.com/support/)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Mozilla/5.0 (compatible; Charlotte/1.0t; http://www.searchme.com/support/)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -69,4 +69,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; Charlotte/1.1; http://www.searchme.com/support/)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Mozilla/5.0 (compatible; Charlotte/1.1; http://www.searchme.com/support/)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -76,4 +76,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('holmes/3.9 (someurl.co.cc)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('holmes/3.9 (someurl.co.cc)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -83,4 +83,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('htdig/3.1.5 (webmaster@online-medien.de)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('htdig/3.1.5 (webmaster@online-medien.de)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -90,4 +90,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('htdig/3.1.5 (root@localhost)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('htdig/3.1.5 (root@localhost)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -97,4 +97,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('htdig/3.1.5 (infosys@storm.rmi.org)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('htdig/3.1.5 (infosys@storm.rmi.org)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -104,4 +104,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('htdig/3.1.5'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('htdig/3.1.5'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -111,4 +111,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('htdig/3.1.6 (unconfigured@htdig.searchengine.maintainer)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('htdig/3.1.6 (unconfigured@htdig.searchengine.maintainer)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -118,4 +118,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('htdig/3.1.6 (mathieu.peltier@inrialpes.fr)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('htdig/3.1.6 (mathieu.peltier@inrialpes.fr)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -125,4 +125,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('ichiro/2.0 (ichiro@nttr.co.jp)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('ichiro/2.0 (ichiro@nttr.co.jp)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -132,4 +132,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('igdeSpyder (compatible; igde.ru; +http://igde.ru/doc/tech.html)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('igdeSpyder (compatible; igde.ru; +http://igde.ru/doc/tech.html)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -139,4 +139,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('L.webis/0.87 (http://webalgo.iit.cnr.it/index.php?pg=lwebis)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('L.webis/0.87 (http://webalgo.iit.cnr.it/index.php?pg=lwebis)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -146,4 +146,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('LinkWalker'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('LinkWalker'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -153,4 +153,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('LinkWalker/2.0'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('LinkWalker/2.0'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -160,4 +160,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('lwp-trivial/1.33'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('lwp-trivial/1.33'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -167,4 +167,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('lwp-trivial/1.35'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('lwp-trivial/1.35'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -174,4 +174,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('lwp-trivial/1.36'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('lwp-trivial/1.36'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -181,4 +181,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('lwp-trivial/1.38'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('lwp-trivial/1.38'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -188,4 +188,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('lwp-trivial/1.41'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('lwp-trivial/1.41'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -195,4 +195,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Mnogosearch-3.1.21'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Mnogosearch-3.1.21'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -202,4 +202,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('mogimogi/1.0'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('mogimogi/1.0'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -209,4 +209,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('MVAClient'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('MVAClient'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -216,4 +216,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('NetResearchServer(http://www.look.com)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('NetResearchServer(http://www.look.com)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -223,4 +223,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Nymesis/1.0 (http://nymesis.com)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Nymesis/1.0 (http://nymesis.com)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -230,4 +230,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('oegp v. 1.3.0'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('oegp v. 1.3.0'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -237,4 +237,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Pompos/1.1 http://pompos.iliad.fr'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Pompos/1.1 http://pompos.iliad.fr'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -244,4 +244,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Pompos/1.2 http://pompos.iliad.fr'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Pompos/1.2 http://pompos.iliad.fr'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -251,4 +251,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Pompos/1.3 http://dir.com/pompos.html'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Pompos/1.3 http://dir.com/pompos.html'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -258,4 +258,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('PycURL'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('PycURL'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -265,4 +265,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('PycURL/7.13.2'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('PycURL/7.13.2'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -272,4 +272,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('PycURL/7.15.5'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('PycURL/7.15.5'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -279,4 +279,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('PycURL/7.16.4'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('PycURL/7.16.4'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -286,4 +286,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('PycURL/7.18.0'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('PycURL/7.18.0'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -293,4 +293,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('PycURL/7.18.2'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('PycURL/7.18.2'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -300,4 +300,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('PycURL/7.19.0'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('PycURL/7.19.0'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -307,4 +307,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('PycURL/7.19.3'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('PycURL/7.19.3'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -314,4 +314,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('PycURL/7.19.5'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('PycURL/7.19.5'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -321,4 +321,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('PycURL/7.19.7'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('PycURL/7.19.7'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -328,4 +328,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Qseero v1.0.0'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Qseero v1.0.0'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -335,4 +335,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('SBIder/0.8-dev (SBIder; http://www.sitesell.com/sbider.html; http://support.sitesell.com/contact-support.html)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('SBIder/0.8-dev (SBIder; http://www.sitesell.com/sbider.html; http://support.sitesell.com/contact-support.html)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -342,4 +342,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; ScoutJet; http://www.scoutjet.com/)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Mozilla/5.0 (compatible; ScoutJet; http://www.scoutjet.com/)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -349,4 +349,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Scrubby/2.1 (http://www.scrubtheweb.com/)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Scrubby/2.1 (http://www.scrubtheweb.com/)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -356,4 +356,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; Scrubby/2.1; +http://www.scrubtheweb.com/abs/meta-check.html)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Mozilla/5.0 (compatible; Scrubby/2.1; +http://www.scrubtheweb.com/abs/meta-check.html)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -363,4 +363,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Scrubby/2.2 (http://www.scrubtheweb.com/)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Scrubby/2.2 (http://www.scrubtheweb.com/)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -370,4 +370,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; Scrubby/2.2; +http://www.scrubtheweb.com/)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Mozilla/5.0 (compatible; Scrubby/2.2; +http://www.scrubtheweb.com/)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -377,4 +377,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; Scrubby/2.2; http://www.scrubtheweb.com/)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Mozilla/5.0 (compatible; Scrubby/2.2; http://www.scrubtheweb.com/)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -384,4 +384,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('SearchSight/2.0 (http://SearchSight.com/)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('SearchSight/2.0 (http://SearchSight.com/)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -391,4 +391,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('semanticdiscovery/0.1'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('semanticdiscovery/0.1'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -398,4 +398,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('silk/1.0 (+http://www.slider.com/silk.htm)/3.7'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('silk/1.0 (+http://www.slider.com/silk.htm)/3.7'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -405,4 +405,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Silk/1.0'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Silk/1.0'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -412,4 +412,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Sqworm/2.9.85-BETA (beta_release; 20011115-775; i686-pc-linux-gnu)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Sqworm/2.9.85-BETA (beta_release; 20011115-775; i686-pc-linux-gnu)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -419,4 +419,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('StackRambler/2.0 (MSIE incompatible)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('StackRambler/2.0 (MSIE incompatible)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -426,4 +426,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('StackRambler/2.0'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('StackRambler/2.0'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -433,4 +433,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('truwoGPS/1.0 (GNU/Linux; U; i686; en-US; +http://www.lan4lano.net/browser.html )'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('truwoGPS/1.0 (GNU/Linux; U; i686; en-US; +http://www.lan4lano.net/browser.html )'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -440,4 +440,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('updated/0.1-beta (updated; http://www.updated.com; updated@updated.com)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('updated/0.1-beta (updated; http://www.updated.com; updated@updated.com)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -447,4 +447,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('voyager/1.0'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('voyager/1.0'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -454,4 +454,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('VYU2 (GNU; OpenRISC)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('VYU2 (GNU; OpenRISC)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -461,4 +461,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('webcollage/1.114'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('webcollage/1.114'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -468,4 +468,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('webcollage/1.117'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('webcollage/1.117'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -475,4 +475,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('webcollage/1.125'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('webcollage/1.125'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -482,4 +482,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('webcollage/1.129'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('webcollage/1.129'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -489,4 +489,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('webcollage/1.93'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('webcollage/1.93'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -496,4 +496,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('yacy (i386 Linux 2.6.14-1.1653_FC4smp; java 1.5.0_04; Europe/de) yacy.net'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('yacy (i386 Linux 2.6.14-1.1653_FC4smp; java 1.5.0_04; Europe/de) yacy.net'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -503,4 +503,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('yacy (i386 Linux 2.4.20-021stab028.17.777-enterprise; java 1.4.2_08; Europe/en) yacy.net'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('yacy (i386 Linux 2.4.20-021stab028.17.777-enterprise; java 1.4.2_08; Europe/en) yacy.net'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -510,4 +510,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('yoogliFetchAgent/0.1'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('yoogliFetchAgent/0.1'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -517,4 +517,4 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Zao/0.1 (http://www.kototoi.org/zao/)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Zao/0.1 (http://www.kototoi.org/zao/)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
@@ -524,6 +524,12 @@ }); | ||
it('should get device type bot', function(){ | ||
var type = device.useragent_is('Zao/0.1 (http://www.kototoi.org/zao/)'); | ||
assert.equal(type, 'bot'); | ||
var mydevice = device('Zao/0.1 (http://www.kototoi.org/zao/)'); | ||
assert.equal(mydevice.type, 'bot'); | ||
}); | ||
}); | ||
describe('Bot device type check with is method', function () { | ||
it('should get true', function () { | ||
var mydevice = device('Facebot'); | ||
assert.equal(mydevice.is('bot'), true); | ||
}); | ||
}); | ||
}); |
@@ -1,2 +0,2 @@ | ||
var device = require('../'), | ||
var device = require('../lib/device.js'), | ||
assert = require('assert'); | ||
@@ -7,4 +7,4 @@ | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -14,4 +14,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -21,4 +21,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -28,4 +28,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows; U; Win 9x 4.90; rv:1.7) Gecko/20041103 Firefox/0.9.3'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows; U; Win 9x 4.90; rv:1.7) Gecko/20041103 Firefox/0.9.3'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -35,4 +35,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (X11; I; SunOS sun4u; en-GB; rv:1.7.8) Gecko/20050713 Firefox/1.0.4'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (X11; I; SunOS sun4u; en-GB; rv:1.7.8) Gecko/20050713 Firefox/1.0.4'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -42,4 +42,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/6.0 (Macintosh; I; Intel Mac OS X 11_7_9; de-LI; rv:1.9b4) Gecko/2012010317 Firefox/10.0a4'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/6.0 (Macintosh; I; Intel Mac OS X 11_7_9; de-LI; rv:1.9b4) Gecko/2012010317 Firefox/10.0a4'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -49,4 +49,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0(Windows; U; Windows NT 7.0; rv:1.9.2) Gecko/20100101 Firefox/3.6'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0(Windows; U; Windows NT 7.0; rv:1.9.2) Gecko/20100101 Firefox/3.6'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -56,4 +56,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (X11; U; Linux x86_64; pl-PL; rv:2.0) Gecko/20110307 Firefox/4.0'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (X11; U; Linux x86_64; pl-PL; rv:2.0) Gecko/20110307 Firefox/4.0'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -63,4 +63,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows NT 6.1; rv:2.0) Gecko/20110319 Firefox/4.0'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows NT 6.1; rv:2.0) Gecko/20110319 Firefox/4.0'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -70,4 +70,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (X11; U; Linux i586; de; rv:5.0) Gecko/20100101 Firefox/5.0'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (X11; U; Linux i586; de; rv:5.0) Gecko/20100101 Firefox/5.0'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -77,4 +77,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows NT 5.1; U; rv:5.0) Gecko/20100101 Firefox/5.0'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows NT 5.1; U; rv:5.0) Gecko/20100101 Firefox/5.0'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -84,4 +84,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows NT 6.1; U; ru; rv:5.0.1.6) Gecko/20110501 Firefox/5.0.1 Firefox/5.0.1'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows NT 6.1; U; ru; rv:5.0.1.6) Gecko/20110501 Firefox/5.0.1 Firefox/5.0.1'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -91,4 +91,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (X11; Linux i686 on x86_64; rv:5.0a2) Gecko/20110524 Firefox/5.0a2'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (X11; Linux i686 on x86_64; rv:5.0a2) Gecko/20110524 Firefox/5.0a2'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -98,4 +98,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -105,4 +105,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20110814 Firefox/6.0'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20110814 Firefox/6.0'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -112,4 +112,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20100101 Firefox/9.0'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20100101 Firefox/9.0'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -119,4 +119,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows NT 6.2; rv:9.0.1) Gecko/20100101 Firefox/9.0.1'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows NT 6.2; rv:9.0.1) Gecko/20100101 Firefox/9.0.1'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -126,4 +126,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.33 (KHTML, like Gecko) Ubuntu/9.10 Chromium/13.0.752.0 Chrome/13.0.752.0 Safari/534.33'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.33 (KHTML, like Gecko) Ubuntu/9.10 Chromium/13.0.752.0 Chrome/13.0.752.0 Safari/534.33'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -133,4 +133,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Macintosh; PPC Mac OS X 10_6_7) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.790.0 Safari/535.1'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Macintosh; PPC Mac OS X 10_6_7) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.790.0 Safari/535.1'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -140,4 +140,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.861.0 Safari/535.2'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.861.0 Safari/535.2'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -147,4 +147,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.6 (KHTML, like Gecko) Chrome/16.0.897.0 Safari/535.6'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.6 (KHTML, like Gecko) Chrome/16.0.897.0 Safari/535.6'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -154,4 +154,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/17.0.940.0 Safari/535.8'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/17.0.940.0 Safari/535.8'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -161,4 +161,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/18.6.872.0 Safari/535.2 UNTRUSTED/1.0 3gpp-gba UNTRUSTED/1.0'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/18.6.872.0 Safari/535.2 UNTRUSTED/1.0 3gpp-gba UNTRUSTED/1.0'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -168,4 +168,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; XBLWP7; ZuneWP7)|HD7'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; XBLWP7; ZuneWP7)|HD7'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -175,4 +175,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; XBLWP7; ZuneWP7)|HD7'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; XBLWP7; ZuneWP7)|HD7'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -182,4 +182,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -189,4 +189,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Microsoft Internet Explorer/1.0 (Windows 95)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Microsoft Internet Explorer/1.0 (Windows 95)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -196,4 +196,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/1.22 (compatible; MSIE 1.5; Windows NT)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/1.22 (compatible; MSIE 1.5; Windows NT)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -203,4 +203,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; MSIE 4.01; Windows NT 5.0)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (compatible; MSIE 4.01; Windows NT 5.0)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -210,4 +210,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; MSIE 5.5; Windows 95)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (compatible; MSIE 5.5; Windows 95)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -217,4 +217,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -224,4 +224,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -231,4 +231,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Win64; x64; SV1)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Win64; x64; SV1)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -238,4 +238,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -245,4 +245,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -252,4 +252,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -259,4 +259,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/5.0)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/5.0)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -266,4 +266,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/4.0; InfoPath.2; SV1; .NET CLR 2.0.50727; WOW64)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/4.0; InfoPath.2; SV1; .NET CLR 2.0.50727; WOW64)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -273,4 +273,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/5.0)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/5.0)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -280,4 +280,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; MSIE 10.6; Windows NT 6.1; Trident/5.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727) 3gpp-gba UNTRUSTED/1.0'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (compatible; MSIE 10.6; Windows NT 6.1; Trident/5.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727) 3gpp-gba UNTRUSTED/1.0'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -287,4 +287,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -294,4 +294,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.0)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.0)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -301,4 +301,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible;MSIE 5.5; Windows 98)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (compatible;MSIE 5.5; Windows 98)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -308,4 +308,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -315,4 +315,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -322,4 +322,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows; U; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows; U; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -329,4 +329,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (MSIE 6.0; Windows NT 5.1)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (MSIE 6.0; Windows NT 5.1)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -336,4 +336,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -343,4 +343,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 5.2)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 5.2)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -350,4 +350,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (Windows; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/4.0 (Windows; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -357,4 +357,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 1.0.3705; .NET CLR 1.1.4322)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 1.0.3705; .NET CLR 1.1.4322)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -364,4 +364,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -371,4 +371,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -378,4 +378,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -385,4 +385,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; SLCC1; .NET CLR 1.1.4322)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; SLCC1; .NET CLR 1.1.4322)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -392,4 +392,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -399,4 +399,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; chromeframe/12.0.742.112)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; chromeframe/12.0.742.112)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -406,4 +406,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -413,4 +413,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 ( ; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 ( ; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -420,4 +420,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729; .NET4.0C)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729; .NET4.0C)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -427,4 +427,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20050519 Netscape/8.0.1'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20050519 Netscape/8.0.1'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -434,4 +434,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20070321 Netscape/9.0'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20070321 Netscape/9.0'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -441,4 +441,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.2.15 Version/10.00'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.2.15 Version/10.00'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -448,4 +448,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Opera/9.80 (Windows NT 6.1 x64; U; en) Presto/2.7.62 Version/11.00'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Opera/9.80 (Windows NT 6.1 x64; U; en) Presto/2.7.62 Version/11.00'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -455,4 +455,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Opera/9.80 (Windows NT 6.1; U; en-US) Presto/2.7.62 Version/11.01'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Opera/9.80 (Windows NT 6.1; U; en-US) Presto/2.7.62 Version/11.01'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -462,4 +462,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Opera/9.80 (X11; Linux x86_64; U; bg) Presto/2.8.131 Version/11.10'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Opera/9.80 (X11; Linux x86_64; U; bg) Presto/2.8.131 Version/11.10'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -469,4 +469,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Opera/9.80 (X11; Linux i686; U; es-ES) Presto/2.8.131 Version/11.11'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Opera/9.80 (X11; Linux i686; U; es-ES) Presto/2.8.131 Version/11.11'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -476,4 +476,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Opera/9.80 (X11; Linux x86_64; U; fr) Presto/2.9.168 Version/11.50'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Opera/9.80 (X11; Linux x86_64; U; fr) Presto/2.9.168 Version/11.50'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -483,4 +483,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Opera/9.80 (Windows NT 5.1; U; en) Presto/2.9.168 Version/11.51'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Opera/9.80 (Windows NT 5.1; U; en) Presto/2.9.168 Version/11.51'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -490,4 +490,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; fr) Presto/2.9.168 Version/11.52'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; fr) Presto/2.9.168 Version/11.52'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -497,4 +497,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Opera/9.80 (Windows NT 6.1; U; es-ES) Presto/2.9.181 Version/12.00'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Opera/9.80 (Windows NT 6.1; U; es-ES) Presto/2.9.181 Version/12.00'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -504,4 +504,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Opera/9.99 (Windows NT 5.1; U; pl) Presto/9.9.9'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Opera/9.99 (Windows NT 5.1; U; pl) Presto/9.9.9'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -511,4 +511,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_7; en-us) AppleWebKit/533.4 (KHTML, like Gecko) Version/4.1 Safari/533.4'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_7; en-us) AppleWebKit/533.4 (KHTML, like Gecko) Version/4.1 Safari/533.4'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -518,4 +518,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/534.1+ (KHTML, like Gecko) Version/5.0 Safari/533.16'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/534.1+ (KHTML, like Gecko) Version/5.0 Safari/533.16'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -525,4 +525,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; th-th) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; th-th) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -532,4 +532,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-HK) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-HK) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -539,4 +539,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/534.16+ (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/534.16+ (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -546,4 +546,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows; U; Windows NT 6.1; tr-TR) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Windows; U; Windows NT 6.1; tr-TR) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -553,4 +553,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; zh-cn) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; zh-cn) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -560,4 +560,4 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; de-at) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; de-at) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
@@ -567,12 +567,30 @@ }); | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; XBLWP7; ZuneWP7)'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device('Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; XBLWP7; ZuneWP7)'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
}); | ||
describe('82.Chromebook OS',function(){ | ||
describe('82.No user agent',function(){ | ||
it('should get device type desktop', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (X11; CrOS i686 0.12.433) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.77 Safari/534.30'); | ||
assert.equal(type, 'desktop'); | ||
var mydevice = device(undefined); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
}); | ||
describe('83.Empty user agent',function(){ | ||
it('should get device type desktop', function(){ | ||
var mydevice = device(''); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
}); | ||
describe('84.Chromebook OS',function(){ | ||
it('should get device type desktop', function(){ | ||
var mydevice = device('Mozilla/5.0 (X11; CrOS i686 0.12.433) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.77 Safari/534.30'); | ||
assert.equal(mydevice.type, 'desktop'); | ||
}); | ||
}); | ||
describe('Desktop device type check with is method', function () { | ||
it('should get true', function () { | ||
var mydevice = device('Mozilla/5.0 (X11; CrOS i686 0.12.433) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.77 Safari/534.30'); | ||
assert.equal(mydevice.is('desktop'), true); | ||
}); | ||
}); | ||
}); |
@@ -1,2 +0,2 @@ | ||
var device = require('../'), | ||
var device = require('../lib/device.js'), | ||
assert = require('assert'); | ||
@@ -7,4 +7,4 @@ | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; fr-fr; A500 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; fr-fr; A500 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -14,4 +14,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.1; en-us; A500 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.1; en-us; A500 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -21,4 +21,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; fr-fr; A500 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; fr-fr; A500 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -28,4 +28,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.1; en-us; A500 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.1; en-us; A500 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -35,4 +35,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; A501 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; A501 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -42,4 +42,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; A501 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; A501 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -49,4 +49,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; G100W Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; G100W Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -56,4 +56,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; G100W Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; G100W Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -63,4 +63,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.2; en-us; A100 Build/HTJ85B) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.2; en-us; A100 Build/HTJ85B) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -70,4 +70,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.2; en-us; A500 Build/HTJ85B) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.2; en-us; A500 Build/HTJ85B) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -77,4 +77,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; A100 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; A100 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -84,4 +84,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; A100 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; A100 Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -91,4 +91,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.2.1; en-us; A200 Build/HTK55D) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.2.1; en-us; A200 Build/HTK55D) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -98,4 +98,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; TPA60W Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; TPA60W Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -105,4 +105,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; TPA60W Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; TPA60W Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -112,4 +112,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Linux 2.6.10) NetFront/3.3 Kindle/1.0 (screen 600x800)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Linux 2.6.10) NetFront/3.3 Kindle/1.0 (screen 600x800)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -119,4 +119,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Linux 2.6.10) NetFront/3.3 Kindle/1.0 (screen 600x800)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Linux 2.6.10) NetFront/3.3 Kindle/1.0 (screen 600x800)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -126,4 +126,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Linux 2.6.10) NetFront/3.3 Kindle/1.0 (screen 600x800)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Linux 2.6.10) NetFront/3.3 Kindle/1.0 (screen 600x800)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -133,4 +133,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.0 (screen 600x800)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.0 (screen 600x800)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -140,4 +140,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.1 (screen 824x1200; rotate)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.1 (screen 824x1200; rotate)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -147,4 +147,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.3 (screen 600x800; rotate)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.3 (screen 600x800; rotate)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -154,4 +154,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.5 (screen 600x800; rotate)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.5 (screen 600x800; rotate)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -161,4 +161,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.0 (screen 600x800)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.0 (screen 600x800)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -168,4 +168,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.1 (screen 824x1200; rotate)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.1 (screen 824x1200; rotate)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -175,4 +175,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.3 (screen 600x800; rotate)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.3 (screen 600x800; rotate)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -182,4 +182,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.5 (screen 600x800; rotate)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.5 (screen 600x800; rotate)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -189,4 +189,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.0 (screen 600x800)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.0 (screen 600x800)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -196,4 +196,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) Version/4.0 Kindle/3.0 (screen 600x800)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) Version/4.0 Kindle/3.0 (screen 600x800)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -203,4 +203,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) Version/4.0 Kindle/3.0 (screen 600x800)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) Version/4.0 Kindle/3.0 (screen 600x800)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -210,4 +210,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) Version/4.0 Kindle/3.0 (screen 600X800; rotate)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) Version/4.0 Kindle/3.0 (screen 600X800; rotate)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -217,4 +217,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Kindle Fire Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Kindle Fire Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -224,4 +224,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -231,4 +231,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -238,4 +238,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 0.5; en-us) AppleWebKit/522+ (KHTML, like Gecko) Safari/419.3'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 0.5; en-us) AppleWebKit/522+ (KHTML, like Gecko) Safari/419.3'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -245,4 +245,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 0.5; en-us) AppleWebKit/522+ (KHTML, like Gecko) Safari/419.3'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 0.5; en-us) AppleWebKit/522+ (KHTML, like Gecko) Safari/419.3'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -252,4 +252,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7D11'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7D11'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -259,4 +259,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iProd; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iProd; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -266,4 +266,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad Simulator; U; CPU iPhone OS 3_2 like Mac OS X; en_us) AppleWebKit/525.18.1 (KHTML, like Gecko)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad Simulator; U; CPU iPhone OS 3_2 like Mac OS X; en_us) AppleWebKit/525.18.1 (KHTML, like Gecko)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -273,4 +273,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -280,4 +280,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B367'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B367'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -287,4 +287,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -294,4 +294,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU iPhone OS 4_2 like Mac OS X; en_us) AppleWebKit/525.18.1 (KHTML, like Gecko)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU iPhone OS 4_2 like Mac OS X; en_us) AppleWebKit/525.18.1 (KHTML, like Gecko)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -301,4 +301,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B405 Safari/531.21.10'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B405 Safari/531.21.10'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -308,4 +308,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -315,4 +315,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU iPhone OS 4_3 like Mac OS X; en_us) AppleWebKit/525.18.1 (KHTML, like Gecko )'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU iPhone OS 4_3 like Mac OS X; en_us) AppleWebKit/525.18.1 (KHTML, like Gecko )'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -322,4 +322,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU iPhone OS 4_3_1 like Mac OS X; fr-fr) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/7D11'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU iPhone OS 4_3_1 like Mac OS X; fr-fr) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/7D11'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -329,4 +329,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -336,4 +336,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7D11'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7D11'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -343,4 +343,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iProd; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iProd; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -350,4 +350,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad Simulator; U; CPU iPhone OS 3_2 like Mac OS X; en_us) AppleWebKit/525.18.1 (KHTML, like Gecko)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad Simulator; U; CPU iPhone OS 3_2 like Mac OS X; en_us) AppleWebKit/525.18.1 (KHTML, like Gecko)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -357,4 +357,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -364,4 +364,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B367'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B367'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -371,4 +371,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -378,4 +378,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU iPhone OS 4_2 like Mac OS X; en_us) AppleWebKit/525.18.1 (KHTML, like Gecko)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU iPhone OS 4_2 like Mac OS X; en_us) AppleWebKit/525.18.1 (KHTML, like Gecko)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -385,4 +385,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B405 Safari/531.21.10'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B405 Safari/531.21.10'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -392,4 +392,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -399,4 +399,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU iPhone OS 4_3 like Mac OS X; en_us) AppleWebKit/525.18.1 (KHTML, like Gecko )'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU iPhone OS 4_3 like Mac OS X; en_us) AppleWebKit/525.18.1 (KHTML, like Gecko )'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -406,4 +406,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU iPhone OS 4_3_1 like Mac OS X; fr-fr) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/7D11'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU iPhone OS 4_3_1 like Mac OS X; fr-fr) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/7D11'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -413,4 +413,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -420,4 +420,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; CPU OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; CPU OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -427,4 +427,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Opera/9.80 (J2ME/MIDP; Opera Mini/4.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/23.411; U; en) Presto/2.5.25 Version/10.54'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Opera/9.80 (J2ME/MIDP; Opera Mini/4.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/23.411; U; en) Presto/2.5.25 Version/10.54'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -434,4 +434,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.1-update1; en-ie; A101IT Build/ECLAIR) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.1-update1; en-ie; A101IT Build/ECLAIR) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -441,4 +441,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2.1; sv-se; A101IT Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2.1; sv-se; A101IT Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -448,4 +448,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.1-update1; en-ie; A101IT Build/ECLAIR) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.1-update1; en-ie; A101IT Build/ECLAIR) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -455,4 +455,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2.1; sv-se; A101IT Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2.1; sv-se; A101IT Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -462,4 +462,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 1.0.0; en-gb; A70BHT Build/ECLAIR) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 1.0.0; en-gb; A70BHT Build/ECLAIR) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -469,4 +469,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 1.0.0; en-gb; A70BHT Build/ECLAIR) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 1.0.0; en-gb; A70BHT Build/ECLAIR) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -476,4 +476,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.2.1; en-us; Transformer TF101 Build/HTK75) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.2.1; en-us; Transformer TF101 Build/HTK75) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -483,4 +483,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; Transformer Prime TF201 Build/IML74K) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Safari/535.7'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; Transformer Prime TF201 Build/IML74K) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Safari/535.7'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -490,4 +490,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('nook browser/1.0'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('nook browser/1.0'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -497,4 +497,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('nook browser/1.0'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('nook browser/1.0'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -504,4 +504,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.7 Safari/534.11+'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.7 Safari/534.11+'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -511,4 +511,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; MID7015 Build/ECLAIR) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; MID7015 Build/ECLAIR) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -518,4 +518,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.1-update1; pl-pl; MID7015 Build/ECLAIR) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.1-update1; pl-pl; MID7015 Build/ECLAIR) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -525,4 +525,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.1-update1; ja-jp; MB511 Build/RUTEM_U3_01.13.0) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.1-update1; ja-jp; MB511 Build/RUTEM_U3_01.13.0) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -532,4 +532,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; MID7015 Build/ECLAIR) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; MID7015 Build/ECLAIR) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -539,4 +539,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.1-update1; pl-pl; MID7015 Build/ECLAIR) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.1-update1; pl-pl; MID7015 Build/ECLAIR) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -546,4 +546,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.1-update1; ja-jp; MB511 Build/RUTEM_U3_01.13.0) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.1-update1; ja-jp; MB511 Build/RUTEM_U3_01.13.0) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -553,4 +553,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; Dell Streak 7 Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; Dell Streak 7 Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -560,4 +560,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; Dell Streak 7 Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; Dell Streak 7 Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -567,4 +567,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; ja-jp; L-06C Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; ja-jp; L-06C Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -574,4 +574,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; ja-jp; L-06C Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; ja-jp; L-06C Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -581,4 +581,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.48 Safari/534.6 TouchPad/1.0'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.48 Safari/534.6 TouchPad/1.0'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -588,4 +588,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.48 Safari/534.6 TouchPad/1.0'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.48 Safari/534.6 TouchPad/1.0'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -595,4 +595,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.2; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/234.40.1 Safari/534.6 TouchPad/1.0'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.2; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/234.40.1 Safari/534.6 TouchPad/1.0'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -602,4 +602,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.1-update1; bg-bg; Ideos S7 Build/ERE27) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.1-update1; bg-bg; Ideos S7 Build/ERE27) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -609,4 +609,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2.1; en-au; IDEOS S7 Build/FRG83) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2.1; en-au; IDEOS S7 Build/FRG83) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -616,4 +616,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; Ideos S7 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; Ideos S7 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -623,4 +623,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.1-update1; bg-bg; Ideos S7 Build/ERE27) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.1-update1; bg-bg; Ideos S7 Build/ERE27) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -630,4 +630,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2.1; en-au; IDEOS S7 Build/FRG83) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2.1; en-au; IDEOS S7 Build/FRG83) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -637,4 +637,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; Ideos S7 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; Ideos S7 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -644,4 +644,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0; en-us; LG-V900 Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0; en-us; LG-V900 Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -651,4 +651,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0; en-us; LG-V900 Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0; en-us; LG-V900 Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -658,4 +658,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0; de-de; Build/EVRSU_U5_0.61.0) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0; de-de; Build/EVRSU_U5_0.61.0) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -665,4 +665,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0; de-de; Build/EVRSU_U5_0.61.0) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0; de-de; Build/EVRSU_U5_0.61.0) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -672,4 +672,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.1; en-us; Xoom Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.1; en-us; Xoom Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -679,4 +679,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.1; en-us; Xoom Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.1; en-us; Xoom Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -686,4 +686,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.2.1; en-us; Xoom Build/HTK75D) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.2.1; en-us; Xoom Build/HTK75D) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -693,4 +693,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 1.5; de-de; Next2 Build/CUPCAKE) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 1.5; de-de; Next2 Build/CUPCAKE) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -700,4 +700,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 1.5; de-de; Next2 Build/CUPCAKE) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 1.5; de-de; Next2 Build/CUPCAKE) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -707,4 +707,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('nook browser/1.0'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('nook browser/1.0'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -714,4 +714,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; BNTV250 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; BNTV250 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -721,4 +721,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; it-it; OliPad 100 Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; it-it; OliPad 100 Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -728,4 +728,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; it-it; OliPad 100 Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; it-it; OliPad 100 Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -735,4 +735,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U;Android 2.3.4; en-us; pandigitalnova1/sourceidDL00000021) AppleWebKit/533.1(KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U;Android 2.3.4; en-us; pandigitalnova1/sourceidDL00000021) AppleWebKit/533.1(KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -742,4 +742,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (iPad; U; CPU OS_3_2_2 like Mac OS X; en-us/pandigitalnova1/sourceidDL00000021) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (iPad; U; CPU OS_3_2_2 like Mac OS X; en-us/pandigitalnova1/sourceidDL00000021) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -749,4 +749,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.3.1; en-us; pandigitalsprnova1/sourceidDL00000025) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.3.1; en-us; pandigitalsprnova1/sourceidDL00000025) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -756,4 +756,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('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+'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('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+'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -763,4 +763,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('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+'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('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+'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -770,4 +770,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.1; en-us; GT-P7510 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.1; en-us; GT-P7510 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -777,4 +777,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.2; en-us; GT-P6210 Build/HTJ85B) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.2; en-us; GT-P6210 Build/HTJ85B) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -784,4 +784,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.1; en-us; GT-P7310 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.1; en-us; GT-P7310 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -791,4 +791,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; es-es; GT-P1000 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; es-es; GT-P1000 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -798,4 +798,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-gb; SAMSUNG GT-P1000 Tablet Build/MASTER) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-gb; SAMSUNG GT-P1000 Tablet Build/MASTER) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -805,4 +805,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-ca; GT-P1000R Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-ca; GT-P1000R Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -812,4 +812,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-ca; GT-P1000M Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-ca; GT-P1000M Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -819,4 +819,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SGH-T849 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SGH-T849 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -826,4 +826,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SHW-M180S Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SHW-M180S Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -833,4 +833,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SCH-I800 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SCH-I800 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -840,4 +840,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux U Android 2.2 es-us SAMSUNG GT-P1000L Tablet Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux U Android 2.2 es-us SAMSUNG GT-P1000L Tablet Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -847,4 +847,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux U Android 2.2 es-us SAMSUNG GT-P1000N Tablet Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux U Android 2.2 es-us SAMSUNG GT-P1000N Tablet Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -854,4 +854,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SHW-M180L Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SHW-M180L Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -861,4 +861,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; SPH-P100 Build/FROYO) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; SPH-P100 Build/FROYO) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -868,4 +868,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SGH-I987 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SGH-I987 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -875,4 +875,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.3.3; es-es; GT-P1000 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.3.3; es-es; GT-P1000 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -882,4 +882,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; es-es; GT-P1000 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; es-es; GT-P1000 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -889,4 +889,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-gb; SAMSUNG GT-P1000 Tablet Build/MASTER) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-gb; SAMSUNG GT-P1000 Tablet Build/MASTER) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -896,4 +896,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-ca; GT-P1000R Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-ca; GT-P1000R Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -903,4 +903,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-ca; GT-P1000M Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-ca; GT-P1000M Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -910,4 +910,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SGH-T849 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SGH-T849 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -917,4 +917,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SHW-M180S Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SHW-M180S Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -924,4 +924,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SCH-I800 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SCH-I800 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -931,4 +931,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux U Android 2.2 es-us SAMSUNG GT-P1000L Tablet Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux U Android 2.2 es-us SAMSUNG GT-P1000L Tablet Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -938,4 +938,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux U Android 2.2 es-us SAMSUNG GT-P1000N Tablet Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux U Android 2.2 es-us SAMSUNG GT-P1000N Tablet Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -945,4 +945,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SHW-M180L Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SHW-M180L Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -952,4 +952,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; SPH-P100 Build/FROYO) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; SPH-P100 Build/FROYO) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -959,4 +959,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SGH-I987 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SGH-I987 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -966,4 +966,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.3.3; es-es; GT-P1000 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.3.3; es-es; GT-P1000 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -973,4 +973,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; GT-P7100 Build/HRI83) AppleWebkit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; GT-P7100 Build/HRI83) AppleWebkit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -980,4 +980,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; GT-P7100 Build/HRI83) AppleWebkit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; GT-P7100 Build/HRI83) AppleWebkit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -987,4 +987,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; GT-P7500 Build/HRI83) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; GT-P7500 Build/HRI83) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -994,4 +994,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.1; es-es; SAMSUNG-GT-P7500/P7500BUKEE Build/HONEYCOMB) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.1; es-es; SAMSUNG-GT-P7500/P7500BUKEE Build/HONEYCOMB) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1001,4 +1001,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; GT-P7500 Build/HRI83) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; GT-P7500 Build/HRI83) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1008,4 +1008,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.1; es-es; SAMSUNG-GT-P7500/P7500BUKEE Build/HONEYCOMB) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.1; es-es; SAMSUNG-GT-P7500/P7500BUKEE Build/HONEYCOMB) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1015,4 +1015,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; ja-jp; SC-01C Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 (Shinbun Browser)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; ja-jp; SC-01C Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 (Shinbun Browser)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1022,4 +1022,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.3.3; ja-jp; SC-01C Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.3.3; ja-jp; SC-01C Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1029,4 +1029,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SC-01C Build/FROYO) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SC-01C Build/FROYO) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1036,4 +1036,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; ja-jp; SC-01C Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 (Shinbun Browser)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; ja-jp; SC-01C Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 (Shinbun Browser)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1043,4 +1043,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.3.3; ja-jp; SC-01C Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.3.3; ja-jp; SC-01C Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1050,4 +1050,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SC-01C Build/FROYO) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2; en-us; SC-01C Build/FROYO) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1057,4 +1057,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.2.1; en-us; Sony Tablet S Build/THMASU0035) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.2.1; en-us; Sony Tablet S Build/THMASU0035) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1064,4 +1064,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.2; en-us; Sony Tablet S Build/THMAS11000) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.2; en-us; Sony Tablet S Build/THMAS11000) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1071,4 +1071,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 1.6; en-gb; SonyEricssonX10i Build/R1DA003) AppleWebKit/528.5+ (KHTML, like Gecko)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 1.6; en-gb; SonyEricssonX10i Build/R1DA003) AppleWebKit/528.5+ (KHTML, like Gecko)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1078,4 +1078,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 1.6; en-gb; SonyEricssonX10i Build/R1DA003) AppleWebKit/528.5+ (KHTML, like Gecko)'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 1.6; en-gb; SonyEricssonX10i Build/R1DA003) AppleWebKit/528.5+ (KHTML, like Gecko)'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1085,4 +1085,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux;U;Linux2.6; it-it; TSB_CLOUD_COMPANION;FOLIO_AND_A) AppleWebKit/530.17 (KHTML,like Gecko) Version/4.0 Safari/530.17'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux;U;Linux2.6; it-it; TSB_CLOUD_COMPANION;FOLIO_AND_A) AppleWebKit/530.17 (KHTML,like Gecko) Version/4.0 Safari/530.17'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1092,4 +1092,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Opera/9.80 (X11; Linux i686; ADR-1009091650; U; TSB_CLOUD_COMPANION;FOLIO_AND_A; it) Presto/2.5.28 Version/10.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Opera/9.80 (X11; Linux i686; ADR-1009091650; U; TSB_CLOUD_COMPANION;FOLIO_AND_A; it) Presto/2.5.28 Version/10.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1099,4 +1099,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux;U;Linux2.6; it-it; TSB_CLOUD_COMPANION;FOLIO_AND_A) AppleWebKit/530.17 (KHTML,like Gecko) Version/4.0 Safari/530.17'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux;U;Linux2.6; it-it; TSB_CLOUD_COMPANION;FOLIO_AND_A) AppleWebKit/530.17 (KHTML,like Gecko) Version/4.0 Safari/530.17'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1106,4 +1106,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Opera/9.80 (X11; Linux i686; ADR-1009091650; U; TSB_CLOUD_COMPANION;FOLIO_AND_A; it) Presto/2.5.28 Version/10.1'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Opera/9.80 (X11; Linux i686; ADR-1009091650; U; TSB_CLOUD_COMPANION;FOLIO_AND_A; it) Presto/2.5.28 Version/10.1'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1113,4 +1113,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 3.1; en-us; AT100 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 3.1; en-us; AT100 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1120,4 +1120,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2.1; ru-; ViewPad7 Build/FRG83) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2.1; ru-; ViewPad7 Build/FRG83) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1127,4 +1127,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.2.1; ru-; ViewPad7 Build/FRG83) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.2.1; ru-; ViewPad7 Build/FRG83) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1134,4 +1134,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.1-update1; cs-cz; zt180 Build/ERE27) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.1-update1; cs-cz; zt180 Build/ERE27) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1141,4 +1141,4 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; Android 2.1-update1; cs-cz; zt180 Build/ERE27) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; Android 2.1-update1; cs-cz; zt180 Build/ERE27) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
@@ -1148,7 +1148,18 @@ }); | ||
it('should get device type tablet', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Linux; U; en-us; KFJWI Build/IMM76D) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.10 Safari/535.19 Silk-Accelerated=true'); | ||
assert.equal(type, 'tablet'); | ||
var mydevice = device('Mozilla/5.0 (Linux; U; en-us; KFJWI Build/IMM76D) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.10 Safari/535.19 Silk-Accelerated=true'); | ||
assert.equal(mydevice.type, 'tablet'); | ||
}); | ||
}); | ||
describe('Tablet device type check with is method', function () { | ||
it('should get true', function () { | ||
var mydevice = device('iPad'); | ||
assert.equal(mydevice.is('tablet'), true); | ||
}); | ||
}); | ||
describe('Phone (but it is a tablet) device type check with is method', function () { | ||
it('should get false', function () { | ||
var mydevice = device('iPad'); | ||
assert.equal(mydevice.is('phone'), false); | ||
}); | ||
}); | ||
}); |
@@ -1,2 +0,2 @@ | ||
var device = require('../'), | ||
var device = require('../lib/device.js'), | ||
assert = require('assert'); | ||
@@ -7,4 +7,4 @@ | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100222 Firefox/3.6 Kylo/0.8.4.74873'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100222 Firefox/3.6 Kylo/0.8.4.74873'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -14,4 +14,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Large Screen Safari/533.4 GoogleTV/b54202'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Large Screen Safari/533.4 GoogleTV/b54202'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -21,4 +21,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Opera/9.00 (Nintendo Wii'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Opera/9.00 (Nintendo Wii'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -28,4 +28,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Opera/9.30 (Nintendo Wii; U; ; 2047-7; en)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Opera/9.30 (Nintendo Wii; U; ; 2047-7; en)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -35,4 +35,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Opera/9.10 (Nintendo Wii; U; ; 1621; en)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Opera/9.10 (Nintendo Wii; U; ; 1621; en)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -42,4 +42,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Opera/9.00 (Nintendo Wii'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Opera/9.00 (Nintendo Wii'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -49,4 +49,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Opera/9.30 (Nintendo Wii; U; ; 2047-7; en)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Opera/9.30 (Nintendo Wii; U; ; 2047-7; en)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -56,4 +56,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Opera/9.10 (Nintendo Wii; U; ; 1621; en)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Opera/9.10 (Nintendo Wii; U; ; 1621; en)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -63,4 +63,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('wii libnup/1.0'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('wii libnup/1.0'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -70,4 +70,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Opera/9.30 (Nintendo Wii; U; ; 2047-7; en)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Opera/9.30 (Nintendo Wii; U; ; 2047-7; en)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -77,4 +77,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Opera/9.10 (Nintendo Wii; U; ; 1621; en)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Opera/9.10 (Nintendo Wii; U; ; 1621; en)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -84,4 +84,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Opera/9.80 (Linux mips ; U; HbbTV/1.1.1 (; Philips; ; ; ; ) CE-HTML/1.0 NETTV/3.1.0; en) Presto/2.6.33 Version/10.70'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Opera/9.80 (Linux mips ; U; HbbTV/1.1.1 (; Philips; ; ; ; ) CE-HTML/1.0 NETTV/3.1.0; en) Presto/2.6.33 Version/10.70'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -91,4 +91,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Opera/9.80 (Linux armv6l ; U; CE-HTML/1.0 NETTV/3.0.1;; en) Presto/2.6.33 Version/10.60'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Opera/9.80 (Linux armv6l ; U; CE-HTML/1.0 NETTV/3.0.1;; en) Presto/2.6.33 Version/10.60'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -98,4 +98,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Opera/9.70 (Linux armv6l ; U; CE-HTML/1.0 NETTV/2.0.2; en) Presto/2.2.1'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Opera/9.70 (Linux armv6l ; U; CE-HTML/1.0 NETTV/2.0.2; en) Presto/2.2.1'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -105,4 +105,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Opera/9.70 (Linux mips ; U; CE-HTML/1.0 (); en) Presto/2.2.1'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Opera/9.70 (Linux mips ; U; CE-HTML/1.0 (); en) Presto/2.2.1'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -112,4 +112,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Opera 9.50 (Linux Mips; U; CE-HTML/1.0 (); en)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Opera 9.50 (Linux Mips; U; CE-HTML/1.0 (); en)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -119,4 +119,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (SmartHub; SMART-TV; U; Linux/SmartTV) AppleWebKit/531.2+ (KHTML, Like Gecko) WebBrowser/1.0 SmartTV Safari/531.2+'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Mozilla/5.0 (SmartHub; SMART-TV; U; Linux/SmartTV) AppleWebKit/531.2+ (KHTML, Like Gecko) WebBrowser/1.0 SmartTV Safari/531.2+'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -126,4 +126,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (X11; U: Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Large Screen Safari/533.4 GoogleTV/162671'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Mozilla/5.0 (X11; U: Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Large Screen Safari/533.4 GoogleTV/162671'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -133,4 +133,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (PLAYSTATION 3; 3.55)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Mozilla/5.0 (PLAYSTATION 3; 3.55)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -140,4 +140,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (PLAYSTATION 3; 2.00)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Mozilla/5.0 (PLAYSTATION 3; 2.00)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -147,4 +147,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (PLAYSTATION 3; 1.90)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Mozilla/5.0 (PLAYSTATION 3; 1.90)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -154,4 +154,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (PLAYSTATION 3; 1.70)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Mozilla/5.0 (PLAYSTATION 3; 1.70)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -161,4 +161,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (PLAYSTATION 3; 1.5)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Mozilla/5.0 (PLAYSTATION 3; 1.5)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -168,4 +168,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (PLAYSTATION 3; 1.10)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Mozilla/5.0 (PLAYSTATION 3; 1.10)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -175,4 +175,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Mozilla/5.0 (PLAYSTATION 3; 1.00)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Mozilla/5.0 (PLAYSTATION 3; 1.00)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -182,4 +182,4 @@ }); | ||
it('should get device type tv', function(){ | ||
var type = device.useragent_is('Mozilla/4.0 (PS3 (PlayStation 3); 1.00)'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Mozilla/4.0 (PS3 (PlayStation 3); 1.00)'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
@@ -189,6 +189,12 @@ }); | ||
it('should get device type tv', function () { | ||
var type = device.useragent_is('Opera/9.80 (Linux armv7l; HbbTV/1.1.1 (; Sony; KDL32W655A; PKG3.802EUA; 2013;); ) Presto/2.12.362 Version/12.11'); | ||
assert.equal(type, 'tv'); | ||
var mydevice = device('Opera/9.80 (Linux armv7l; HbbTV/1.1.1 (; Sony; KDL32W655A; PKG3.802EUA; 2013;); ) Presto/2.12.362 Version/12.11'); | ||
assert.equal(mydevice.type, 'tv'); | ||
}); | ||
}); | ||
describe('TV device type check with is method', function () { | ||
it('should get true', function () { | ||
var mydevice = device('PlayStation 3'); | ||
assert.equal(mydevice.is('tv'), true); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
3445015
19
66539
116
1
1
+ Addeduseragent@*
+ Addedlru-cache@4.1.5(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedpseudomap@1.0.2(transitive)
+ Addedtmp@0.0.33(transitive)
+ Addeduseragent@2.3.0(transitive)
+ Addedyallist@2.1.2(transitive)