Skip to content
This repository has been archived by the owner on Jul 19, 2018. It is now read-only.

Commit

Permalink
Merge pull request #331 from miketaylr/fx-tablet
Browse files Browse the repository at this point in the history
Better detection of Firefox browsers on tablets (Firefox OS and Android)
  • Loading branch information
tobie committed Jan 28, 2014
2 parents 2875e0c + 35be2de commit d53bc18
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ os_parsers:
##########
# Firefox OS
##########
- regex: '\(Mobile;.+Firefox/\d+\.\d+'
- regex: '\((?:Mobile|Tablet);.+Firefox/\d+\.\d+'
os_replacement: 'Firefox OS'

##########
Expand Down
3 changes: 3 additions & 0 deletions test_resources/test_device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ test_cases:
- user_agent_string: 'Mozilla/5.0 (Mobile; rv:15.0) Gecko/15.0 Firefox/15.0'
family: 'Other'

- user_agent_string: 'Mozilla/5.0 (Tablet; rv:29.0) Gecko/29.0 Firefox/29.0'
family: 'Other'

- user_agent_string: 'PantechP6010/JNUS11072011 BMP/1.0.2 DeviceId/141020 NetFront/4.1 OMC/1.5.3 Profile/MIDP-2.1 Configuration/CLDC-1.1'
family: 'Pantech P6010'

Expand Down
7 changes: 7 additions & 0 deletions test_resources/test_user_agent_parser_os.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,13 @@ test_cases:
patch:
patch_minor:

- user_agent_string: 'Mozilla/5.0 (Tablet; rv:29.0) Gecko/29.0 Firefox/29.0'
family: 'Firefox OS'
major:
minor:
patch:
patch_minor:

- user_agent_string: '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'
family: 'iOS'
major: '3'
Expand Down

0 comments on commit d53bc18

Please sign in to comment.