WordPress.org

Making WordPress.org


Ignore:
Timestamp:
10/09/2017 05:35:09 PM (2 years ago)
Author:
coffee2code
Message:

Browse Happy API: Add support for Symbian as a platform and Ovi Browser as a browser.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/tests/phpunit/tests/browse-happy.php

    r5995 r6011  
    6363                'Android Android Browser 4.0',
    6464            ],
     65            [
     66                'Mozilla/5.0 (Linux; U; Android 4.2.2; en-us; IdeaTab S6000-F Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30',
     67                'Android Android Browser 4.0', // Actually: Symbian, but not worth accurately detecting.
     68            ],
    6569            [ // on Galaxy SIII
    6670                'Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; SCH-I535 Build/KOT49H) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30',
     
    379383                'Mobile Nokia Browser 8.5.0',
    380384            ],
     385            [
     386                'Nokia5250/10.0.011 (SymbianOS/9.4; U; Series60/5.0 Mozilla/5.0; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/525 (KHTML, like Gecko) Safari/525 3gpp-gba',
     387                'Symbian Nokia Browser',
     388            ],
     389            [
     390                'Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 Nokia5233/51.1.002; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.1.33 Mobile Safari/533.4 3gpp-gba',
     391                'Symbian Nokia Browser 7.3.1.33',
     392            ],
     393            [
     394                'Mozilla/5.0 (Symbian/3; Series60/5.3 NokiaN8-00/111.040.1511; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/535.1 (KHTML, like Gecko) NokiaBrowser/8.3.1.4 Mobile Safari/535.1 3gpp-gba',
     395                'Symbian Nokia Browser 8.3.1.4',
     396            ],
    381397
    382398            // Opera
     
    445461                'Mobile Opera Mini 12.16',
    446462            ],
     463            [
     464                'Opera/9.80 (J2ME/MIDP; Opera Mini/9.80 (S60; SymbOS; Opera Mobi/23.348; U; en) Presto/2.5.25 Version/10.54',
     465                'Symbian Opera Mini 10.54',
     466            ],
     467
     468            // Ovi Browser
     469
     470            [
     471                'Mozilla/5.0 (Series40; Nokia2055/03.20; Profile/MIDP-2.1 Configuration/CLDC-1.1) Gecko/20100401 S40OviBrowser/5.5.0.0.27',
     472                'Symbian Ovi Browser 5.5.0.0.27'
     473            ],
    447474
    448475            // QQ Browser
     
    568595                'Nokia5200/2.0 (05.00) Profile/MIDP-2.0 Configuration/CLDC-1.1 UCWEB/2.0 (Java; U; MIDP-2.0; id; Nokia5200) U2/1.0.0 UCBrowser/9.5.0.449 U2/1.0.0 Mobile',
    569596                'Mobile UC Browser 9.5.0.449',
     597            ],
     598            [
     599                'UCWEB/2.0 (Symbian; U; S60 V5; en-US; Nokia5233) U2/1.0.0 UCBrowser/9.2.0.336 U2/1.0.0 Mobile',
     600                'Symbian UC Browser 9.2.0.336',
    570601            ],
    571602            [
     
    682713        $parsed = browsehappy_parse_user_agent( $header );
    683714
    684         if ( in_array( $parsed['platform'], array( 'Android', 'Fire OS', 'iPad', 'iPhone', 'Mobile', 'PlayBook', 'RIM Tablet OS', 'Windows Phone OS' ) ) ) {
     715        if ( in_array( $parsed['platform'], array( 'Android', 'Fire OS', 'iPad', 'iPhone', 'Mobile', 'PlayBook', 'RIM Tablet OS', 'Symbian', 'Windows Phone OS' ) ) ) {
    685716            $this->assertTrue( $parsed['mobile'] );
    686717        } else {
Note: See TracChangeset for help on using the changeset viewer.