Skip to content

Commit

Permalink
Improves version detection for Chrome OS (#7818)
Browse files Browse the repository at this point in the history
* Improves version detection for Chrome OS
  • Loading branch information
liviuconcioiu authored Sep 19, 2024
1 parent 1b40969 commit 8d233a9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
8 changes: 8 additions & 0 deletions Tests/Parser/fixtures/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5214,3 +5214,11 @@
version: 17.0.3
platform: ""
family: iOS
-
user_agent: Dalvik/2.1.0 (Linux; U; Android 9; Lenovo ThinkPad 11e 3rd Gen Chromebook Build/R103-14816.131.0)
os:
name: Chrome OS
short_name: COS
version: 14816.131.0
platform: ""
family: Chrome OS
16 changes: 8 additions & 8 deletions Tests/fixtures/desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3746,7 +3746,7 @@
user_agent: 'Dalvik/2.1.0 (Linux## U## Android 7.1.1## Acer Chromebook R11 (CB5-132T / C738T) Build/R63-10032.86.0)'
os:
name: Chrome OS
version: ""
version: 10032.86.0
platform: ""
client:
type: browser
Expand All @@ -3764,7 +3764,7 @@
user_agent: 'Dalvik/2.1.0 (Linux## U## Android 7.1.1## Acer Chromebook R13 (CB5-312T) Build/R65-10323.30.0)'
os:
name: Chrome OS
version: ""
version: 10323.30.0
platform: ""
client:
type: browser
Expand Down Expand Up @@ -7430,7 +7430,7 @@
user_agent: Dalvik/2.1.0 (Linux; U; Android 7.1.1; HP Chromebook 11 G5 Build/R79-12607.81.0)
os:
name: Chrome OS
version: ""
version: 12607.81.0
platform: ""
client:
type: browser
Expand All @@ -7448,7 +7448,7 @@
user_agent: Dalvik/2.1.0 (Linux; U; Android 9; HP Chromebook x360 11 G1 EE Build/R80-12739.111.0)
os:
name: Chrome OS
version: ""
version: 12739.111.0
platform: ""
client:
type: browser
Expand Down Expand Up @@ -8593,7 +8593,7 @@
user_agent: Mozilla/5.0 (Linux; Android 10; Samsung Chromebook Plus Build/R74-11895.118.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.62 Mobile Safari/537.36
os:
name: Chrome OS
version: ""
version: 11895.118.0
platform: ""
client:
type: browser
Expand Down Expand Up @@ -8971,7 +8971,7 @@
user_agent: Mozilla/5.0 (Linux; Android 9; HP Chromebook x2 Build/R76-12239.44.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36 OPR/53.0.2569.141117
os:
name: Chrome OS
version: ""
version: 12239.44.0
platform: ""
client:
type: browser
Expand Down Expand Up @@ -9517,7 +9517,7 @@
user_agent: Mozilla/5.0 (Linux; U; Android 7.1.1; fr-fr; Chromebook 14 (CB3-431) Build/R66-10452.99.0) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30 GSA/8.7.11.21.x86 CrosArc/4808754 (edgar)
os:
name: Chrome OS
version: ""
version: 10452.99.0
platform: x86
client:
type: mobile app
Expand Down Expand Up @@ -9551,7 +9551,7 @@
user_agent: Mozilla/5.0 (Linux; Android 7.1.1; ASUS Chromebook Flip C100PA Build/R62-9901.77.0; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/56.0.2924.87 Safari/537.36
os:
name: Chrome OS
version: ""
version: 9901.77.0
platform: ""
client:
type: browser
Expand Down
2 changes: 1 addition & 1 deletion Tests/fixtures/mobile_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@
user_agent: Mozilla/5.0 (Linux; Android 9; HP Chromebook x360 11 G1 EE Build/R92-13982.69.0; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.131 Safari/537.36 trill_2022007050 JsSdk/1.0 NetType/WIFI Channel/googleplay AppName/musical_ly app_version/20.7.5 ByteLocale/en ByteFullLocale/en Region/US
os:
name: Chrome OS
version: ""
version: 13982.69.0
platform: ""
client:
type: mobile app
Expand Down
2 changes: 1 addition & 1 deletion Tests/fixtures/unknown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2457,7 +2457,7 @@
user_agent: 'Dalvik/2.1.0 (Linux## U## Android 7.1.1## Chromebook 14 (CB3-431) Build/R63-10032.86.0)'
os:
name: Chrome OS
version: ""
version: 10032.86.0
platform: ""
client:
type: browser
Expand Down
2 changes: 1 addition & 1 deletion regexes/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@
##########
# ChromeOS
##########
- regex: 'CrOS [a-z0-9_]+ (\d+[\.\d]+)|Chromebook'
- regex: '(?:CrOS [a-z0-9_]+ |Chromebook.*Build/R\d+-)(\d+[\.\d]+)|Chromebook'
name: 'Chrome OS'
version: '$1'

Expand Down

0 comments on commit 8d233a9

Please # to comment.