Path: blob/trunk/third_party/closure/goog/labs/useragent/test_agents.js
2868 views
// Copyright 2013 The Closure Library Authors. All Rights Reserved.1//2// Licensed under the Apache License, Version 2.0 (the 'License');3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an 'AS-IS' BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.1314/**15* @fileoverview Various User-Agent strings.16* See http://go/useragentexamples and http://www.useragentstring.com/ for17* examples.18*19* @author [email protected] (Andy Martone)20*/2122goog.provide('goog.labs.userAgent.testAgents');23goog.setTestOnly('goog.labs.userAgent.testAgents');2425goog.scope(function() {26var testAgents = goog.labs.userAgent.testAgents;272829/** @const {string} */30testAgents.ANDROID_BROWSER_235 =31'Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; ' +32'HTC Vision Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) ' +33'Version/4.0 Mobile Safari/533.1';343536/** @const {string} */37testAgents.ANDROID_BROWSER_221 =38'Mozilla/5.0 (Linux; U; Android 2.2.1; en-ca; LG-P505R Build/FRG83)' +39' AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';404142/** @const {string} */43testAgents.ANDROID_BROWSER_233 =44'Mozilla/5.0 (Linux; U; Android 2.3.3; en-us; HTC_DesireS_S510e' +45' Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0' +46' Mobile Safari/533.1';474849/** @const {string} */50testAgents.ANDROID_BROWSER_403 =51'Mozilla/5.0 (Linux; U; Android 4.0.3; de-ch; HTC Sensation Build/IML74K)' +52' AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30';535455/** @const {string} */56// User agent retrieved from dremel queries for cases matching b/1322268857testAgents.ANDROID_BROWSER_403_ALT =58'Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K)' +59' AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30';606162// Chromium for Android. Found in Android 4.4+ devices based on AOSP, but never63// in the 'Google' devices (where only Google Chrome is shipped).64// UA string matches Chromium based WebView exactly, see ANDROID_WEB_VIEW_4_4.65/** @const {string} */66testAgents.ANDROID_BROWSER_4_4 =67'Mozilla/5.0 (Linux; Android 4.4.2; S8 Build/KOT49H) ' +68'AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 ' +69'Chrome/30.0.0.0 Mobile Safari/537.36';707172// See https://developer.chrome.com/multidevice/user-agent73/** @const {string} */74testAgents.ANDROID_WEB_VIEW_4_1_1 =75'Mozilla/5.0 (Linux; U; Android 4.1.1; en-gb; Build/KLP) ' +76'AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30';777879// See https://developer.chrome.com/multidevice/user-agent80/** @const {string} */81testAgents.ANDROID_WEB_VIEW_4_4 =82'Mozilla/5.0 (Linux; Android 4.4; Nexus 5 Build/_BuildID_) ' +83'AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 ' +84'Chrome/30.0.0.0 Mobile Safari/537.36';858687/** @const {string} */88testAgents.IE_6 = 'Mozilla/5.0 (Windows; U; MSIE 6.0; Windows NT 5.1; SV1;' +89'.NET CLR 2.0.50727)';909192/** @const {string} */93testAgents.IE_7 = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)';949596/** @const {string} */97testAgents.IE_8 =98'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)';99100101/** @const {string} */102testAgents.IE_8_COMPATIBILITY =103'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0)';104105106/** @const {string} */107testAgents.IE_9 =108'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)';109110111/** @const {string} */112testAgents.IE_9_COMPATIBILITY =113'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0)';114115116/** @const {string} */117testAgents.IE_10 =118'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';119120121/** @const {string} */122testAgents.IE_10_COMPATIBILITY =123'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/6.0)';124125126/**127* http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/10/17/getting-websites-ready-for-internet-explorer-10-on-windows-phone-8.aspx128* @const {string}129*/130testAgents.IE_10_MOBILE =131'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; ' +132'IEMobile/10.0; ARM; Touch; NOKIA; Lumia 820)';133134135/** @const {string} */136testAgents.IE_11 =137'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';138139140/** @const {string} */141testAgents.IE_11_COMPATIBILITY_MSIE_7 =142'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; Trident/7.0; ' +143'.NET4.0E; .NET4.0C)';144145146/** @const {string} */147testAgents.IE_11_COMPATIBILITY_MSIE_9 =148'Mozilla/5.0 (MSIE 9.0; Windows NT 6.1; WOW64; Trident/7.0; ' +149'rv:11.0) like Gecko';150151152/**153* https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396#edge154* @const {string}155*/156testAgents.EDGE_12_0 =157'Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 ' +158'(KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 Edge/12.0';159160161/** @const {string} */162testAgents.EDGE_12_9600 =163'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ' +164'(KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.9600';165166167/** @const {string} */168testAgents.FIREFOX_19 =169'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) ' +170'Gecko/20100101 Firefox/19.0';171172173/** @const {string} */174testAgents.FIREFOX_LINUX =175'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101' +176' Firefox/15.0.1';177178179/** @const {string} */180testAgents.FIREFOX_MAC =181'Mozilla/6.0 (Macintosh; I; Intel Mac OS X 11_7_9; de-LI; rv:1.9b4)' +182' Gecko/2012010317 Firefox/10.0a4';183184185/** @const {string} */186testAgents.FIREFOX_WINDOWS =187'Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120403211507' +188' Firefox/14.0.1';189190191/** @const {string} */192testAgents.SAFARI_6 = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_1) ' +193'AppleWebKit/536.25 (KHTML, like Gecko) ' +194'Version/6.0 Safari/536.25';195196197/** @const {string} */198testAgents.SAFARI_IPHONE_32 =199'Mozilla/5.0(iPhone; U; CPU iPhone OS 3_2 like Mac OS X; en-us)' +200' AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314' +201' Safari/531.21.10';202203204/** @const {string} */205testAgents.SAFARI_IPHONE_421 =206'Mozilla/5.0 (iPhone; U; ru; CPU iPhone OS 4_2_1 like Mac OS X; ru)' +207' AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148a' +208' Safari/6533.18.5';209210211/** @const {string} */212testAgents.SAFARI_IPHONE_431 =213'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_1 like Mac OS X; zh-tw)' +214' AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8G4' +215' Safari/6533.18.5';216217218/** @const {string} */219testAgents.SAFARI_IPHONE_6 =220'Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X)' +221' AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e' +222' Safari/8536.25';223224225/** @const {string} */226testAgents.SAFARI_IPOD =227'Mozila/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1' +228' (KHTML, like Gecko) Version/3.0 Mobile/3A101a Safari/419.3';229230231/** @const {string} */232testAgents.SAFARI_MAC =233'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+' +234' (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2';235236237/** @const {string} */238testAgents.SAFARI_WINDOWS =239'Mozilla/5.0 (Windows; U; Windows NT 6.1; tr-TR) AppleWebKit/533.20.25' +240' (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27';241242243/** @const {string} */244testAgents.COAST =245'Mozilla/5.0 (iPad; CPU OS 7_0_2 like Mac OS X) AppleWebKit/537.51.1' +246' (KHTML like Gecko) Coast/1.1.2.64598 Mobile/11B511 Safari/7534.48.3';247248249/** @const {string} */250testAgents.WEBVIEW_IPHONE =251'Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26' +252' (KHTML, like Gecko) Mobile/10A403';253254255/** @const {string} */256testAgents.WEBVIEW_IPAD =257'Mozilla/5.0 (iPad; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26' +258' (KHTML, like Gecko) Mobile/10A403';259260261/** @const {string} */262testAgents.OPERA_MINI =263'Opera/9.80 (Android; Opera Mini/7.6.35766/35.5706; U; en)' +264' Presto/2.8.119 Version/11.10';265266267/** @const {string} */268testAgents.OPERA_10 = 'Opera/9.80 (S60; SymbOS; Opera Mobi/447; U; en) ' +269'Presto/2.4.18 Version/10.00';270271272/** @const {string} */273testAgents.OPERA_LINUX =274'Opera/9.80 (X11; Linux x86_64; U; fr) Presto/2.9.168 Version/11.50';275276277/** @const {string} */278testAgents.OPERA_MAC =279'Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; fr) Presto/2.9.168' +280' Version/11.52';281282283/** @const {string} */284testAgents.OPERA_15 =285'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ' +286'(KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36 OPR/15.0.1147.100';287288289/** @const {string} */290testAgents.IPAD_4 = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us)' +291' AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b' +292' Safari/531.21.10';293294295/** @const {string} */296testAgents.IPAD_5 =297'Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X; en-us) AppleWebKit/534.46' +298' (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3';299300301/** @const {string} */302testAgents.IPAD_6 = 'Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) ' +303'AppleWebKit/536.26 (KHTML, like Gecko) ' +304'Version/6.0 Mobile/10A403 Safari/8536.25';305306307/** @const {string} */308testAgents.CHROME_25 = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) ' +309'AppleWebKit/535.8 (KHTML, like Gecko) ' +310'Chrome/25.0.1000.10 Safari/535.8';311312313/** @const {string} */314testAgents.CHROME_ANDROID =315'Mozilla/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) ' +316'AppleWebKit/535.7 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile ' +317'Safari/535.7';318319320/** @const {string} */321testAgents.CHROME_ANDROID_PHONE_4_4 =322'Mozilla/5.0 (Linux; Android 4.4.2; S8 Build/KOT49H) ' +323'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.93 Mobile ' +324'Safari/537.36';325326327/** @const {string} */328testAgents.CHROME_ANDROID_TABLET =329'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) ' +330'AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Safari/535.19';331332333/** @const {string} */334testAgents.CHROME_ANDROID_TABLET_4_4 =335'Mozilla/5.0 (Linux; Android 4.4.4; Nexus 7 Build/KTU84P) ' +336'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.93 Safari/537.36';337338339/** @const {string} */340testAgents.CHROME_IPHONE =341'Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X; en-us) ' +342'AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/22.0.1194.0 Mobile/11E53 ' +343'Safari/7534.48.3';344345346/** @const {string} */347testAgents.CHROME_IPAD = 'Mozilla/5.0 (iPad; CPU OS 7_0_4 like Mac OS X) ' +348'AppleWebKit/537.51.1 (KHTML, like Gecko) CriOS/32.0.1700.20 ' +349'Mobile/11B554a Safari/9537.53';350351352/** @const {string} */353testAgents.CHROME_LINUX =354'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko)' +355' Chrome/26.0.1410.33 Safari/537.31';356357358/**359* We traditionally use Appversion to detect X11360* @const {string}361*/362testAgents.CHROME_LINUX_APPVERVERSION =363'5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko)' +364' Chrome/26.0.1410.33 Safari/537.31';365366367/** @const {string} */368testAgents.CHROME_MAC =369'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17' +370' (KHTML, like Gecko) Chrome/24.0.1309.0 Safari/537.17';371372373/** @const {string} */374testAgents.CHROME_OS =375'Mozilla/5.0 (X11; CrOS x86_64 3701.62.0) AppleWebKit/537.31 ' +376'(KHTML, like Gecko) Chrome/26.0.1410.40 Safari/537.31';377378379/** @const {string} */380testAgents.CHROME_OS_910 =381'Mozilla/5.0 (X11; U; CrOS i686 9.10.0; en-US) AppleWebKit/532.5' +382' (KHTML, like Gecko) Chrome/4.0.253.0 Safari/532.5';383384385/** @const {string} */386testAgents.KINDLE_FIRE =387'Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; KFTT Build/IML74K)' +388' AppleWebKit/535.19 (KHTML, like Gecko) Silk/2.1 Mobile Safari/535.19' +389' Silk-Accelerated=true';390391392/** @const {string} */393testAgents.FIREFOX_ANDROID_TABLET =394'Mozilla/5.0 (Android; Tablet; rv:28.0) Gecko/28.0 Firefox/28.0';395396}); // goog.scope397398399