Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/third_party/closure/goog/labs/useragent/test_agents.js
2868 views
1
// Copyright 2013 The Closure Library Authors. All Rights Reserved.
2
//
3
// Licensed under the Apache License, Version 2.0 (the 'License');
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an 'AS-IS' BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
/**
16
* @fileoverview Various User-Agent strings.
17
* See http://go/useragentexamples and http://www.useragentstring.com/ for
18
* examples.
19
*
20
* @author [email protected] (Andy Martone)
21
*/
22
23
goog.provide('goog.labs.userAgent.testAgents');
24
goog.setTestOnly('goog.labs.userAgent.testAgents');
25
26
goog.scope(function() {
27
var testAgents = goog.labs.userAgent.testAgents;
28
29
30
/** @const {string} */
31
testAgents.ANDROID_BROWSER_235 =
32
'Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; ' +
33
'HTC Vision Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) ' +
34
'Version/4.0 Mobile Safari/533.1';
35
36
37
/** @const {string} */
38
testAgents.ANDROID_BROWSER_221 =
39
'Mozilla/5.0 (Linux; U; Android 2.2.1; en-ca; LG-P505R Build/FRG83)' +
40
' AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';
41
42
43
/** @const {string} */
44
testAgents.ANDROID_BROWSER_233 =
45
'Mozilla/5.0 (Linux; U; Android 2.3.3; en-us; HTC_DesireS_S510e' +
46
' Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0' +
47
' Mobile Safari/533.1';
48
49
50
/** @const {string} */
51
testAgents.ANDROID_BROWSER_403 =
52
'Mozilla/5.0 (Linux; U; Android 4.0.3; de-ch; HTC Sensation Build/IML74K)' +
53
' AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30';
54
55
56
/** @const {string} */
57
// User agent retrieved from dremel queries for cases matching b/13222688
58
testAgents.ANDROID_BROWSER_403_ALT =
59
'Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K)' +
60
' AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30';
61
62
63
// Chromium for Android. Found in Android 4.4+ devices based on AOSP, but never
64
// in the 'Google' devices (where only Google Chrome is shipped).
65
// UA string matches Chromium based WebView exactly, see ANDROID_WEB_VIEW_4_4.
66
/** @const {string} */
67
testAgents.ANDROID_BROWSER_4_4 =
68
'Mozilla/5.0 (Linux; Android 4.4.2; S8 Build/KOT49H) ' +
69
'AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 ' +
70
'Chrome/30.0.0.0 Mobile Safari/537.36';
71
72
73
// See https://developer.chrome.com/multidevice/user-agent
74
/** @const {string} */
75
testAgents.ANDROID_WEB_VIEW_4_1_1 =
76
'Mozilla/5.0 (Linux; U; Android 4.1.1; en-gb; Build/KLP) ' +
77
'AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30';
78
79
80
// See https://developer.chrome.com/multidevice/user-agent
81
/** @const {string} */
82
testAgents.ANDROID_WEB_VIEW_4_4 =
83
'Mozilla/5.0 (Linux; Android 4.4; Nexus 5 Build/_BuildID_) ' +
84
'AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 ' +
85
'Chrome/30.0.0.0 Mobile Safari/537.36';
86
87
88
/** @const {string} */
89
testAgents.IE_6 = 'Mozilla/5.0 (Windows; U; MSIE 6.0; Windows NT 5.1; SV1;' +
90
'.NET CLR 2.0.50727)';
91
92
93
/** @const {string} */
94
testAgents.IE_7 = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)';
95
96
97
/** @const {string} */
98
testAgents.IE_8 =
99
'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)';
100
101
102
/** @const {string} */
103
testAgents.IE_8_COMPATIBILITY =
104
'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0)';
105
106
107
/** @const {string} */
108
testAgents.IE_9 =
109
'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)';
110
111
112
/** @const {string} */
113
testAgents.IE_9_COMPATIBILITY =
114
'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0)';
115
116
117
/** @const {string} */
118
testAgents.IE_10 =
119
'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';
120
121
122
/** @const {string} */
123
testAgents.IE_10_COMPATIBILITY =
124
'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/6.0)';
125
126
127
/**
128
* http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/10/17/getting-websites-ready-for-internet-explorer-10-on-windows-phone-8.aspx
129
* @const {string}
130
*/
131
testAgents.IE_10_MOBILE =
132
'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; ' +
133
'IEMobile/10.0; ARM; Touch; NOKIA; Lumia 820)';
134
135
136
/** @const {string} */
137
testAgents.IE_11 =
138
'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';
139
140
141
/** @const {string} */
142
testAgents.IE_11_COMPATIBILITY_MSIE_7 =
143
'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; Trident/7.0; ' +
144
'.NET4.0E; .NET4.0C)';
145
146
147
/** @const {string} */
148
testAgents.IE_11_COMPATIBILITY_MSIE_9 =
149
'Mozilla/5.0 (MSIE 9.0; Windows NT 6.1; WOW64; Trident/7.0; ' +
150
'rv:11.0) like Gecko';
151
152
153
/**
154
* https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396#edge
155
* @const {string}
156
*/
157
testAgents.EDGE_12_0 =
158
'Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 ' +
159
'(KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 Edge/12.0';
160
161
162
/** @const {string} */
163
testAgents.EDGE_12_9600 =
164
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ' +
165
'(KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.9600';
166
167
168
/** @const {string} */
169
testAgents.FIREFOX_19 =
170
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) ' +
171
'Gecko/20100101 Firefox/19.0';
172
173
174
/** @const {string} */
175
testAgents.FIREFOX_LINUX =
176
'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101' +
177
' Firefox/15.0.1';
178
179
180
/** @const {string} */
181
testAgents.FIREFOX_MAC =
182
'Mozilla/6.0 (Macintosh; I; Intel Mac OS X 11_7_9; de-LI; rv:1.9b4)' +
183
' Gecko/2012010317 Firefox/10.0a4';
184
185
186
/** @const {string} */
187
testAgents.FIREFOX_WINDOWS =
188
'Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120403211507' +
189
' Firefox/14.0.1';
190
191
192
/** @const {string} */
193
testAgents.SAFARI_6 = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_1) ' +
194
'AppleWebKit/536.25 (KHTML, like Gecko) ' +
195
'Version/6.0 Safari/536.25';
196
197
198
/** @const {string} */
199
testAgents.SAFARI_IPHONE_32 =
200
'Mozilla/5.0(iPhone; U; CPU iPhone OS 3_2 like Mac OS X; en-us)' +
201
' AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314' +
202
' Safari/531.21.10';
203
204
205
/** @const {string} */
206
testAgents.SAFARI_IPHONE_421 =
207
'Mozilla/5.0 (iPhone; U; ru; CPU iPhone OS 4_2_1 like Mac OS X; ru)' +
208
' AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148a' +
209
' Safari/6533.18.5';
210
211
212
/** @const {string} */
213
testAgents.SAFARI_IPHONE_431 =
214
'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_1 like Mac OS X; zh-tw)' +
215
' AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8G4' +
216
' Safari/6533.18.5';
217
218
219
/** @const {string} */
220
testAgents.SAFARI_IPHONE_6 =
221
'Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X)' +
222
' AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e' +
223
' Safari/8536.25';
224
225
226
/** @const {string} */
227
testAgents.SAFARI_IPOD =
228
'Mozila/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1' +
229
' (KHTML, like Gecko) Version/3.0 Mobile/3A101a Safari/419.3';
230
231
232
/** @const {string} */
233
testAgents.SAFARI_MAC =
234
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+' +
235
' (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2';
236
237
238
/** @const {string} */
239
testAgents.SAFARI_WINDOWS =
240
'Mozilla/5.0 (Windows; U; Windows NT 6.1; tr-TR) AppleWebKit/533.20.25' +
241
' (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27';
242
243
244
/** @const {string} */
245
testAgents.COAST =
246
'Mozilla/5.0 (iPad; CPU OS 7_0_2 like Mac OS X) AppleWebKit/537.51.1' +
247
' (KHTML like Gecko) Coast/1.1.2.64598 Mobile/11B511 Safari/7534.48.3';
248
249
250
/** @const {string} */
251
testAgents.WEBVIEW_IPHONE =
252
'Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26' +
253
' (KHTML, like Gecko) Mobile/10A403';
254
255
256
/** @const {string} */
257
testAgents.WEBVIEW_IPAD =
258
'Mozilla/5.0 (iPad; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26' +
259
' (KHTML, like Gecko) Mobile/10A403';
260
261
262
/** @const {string} */
263
testAgents.OPERA_MINI =
264
'Opera/9.80 (Android; Opera Mini/7.6.35766/35.5706; U; en)' +
265
' Presto/2.8.119 Version/11.10';
266
267
268
/** @const {string} */
269
testAgents.OPERA_10 = 'Opera/9.80 (S60; SymbOS; Opera Mobi/447; U; en) ' +
270
'Presto/2.4.18 Version/10.00';
271
272
273
/** @const {string} */
274
testAgents.OPERA_LINUX =
275
'Opera/9.80 (X11; Linux x86_64; U; fr) Presto/2.9.168 Version/11.50';
276
277
278
/** @const {string} */
279
testAgents.OPERA_MAC =
280
'Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; fr) Presto/2.9.168' +
281
' Version/11.52';
282
283
284
/** @const {string} */
285
testAgents.OPERA_15 =
286
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ' +
287
'(KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36 OPR/15.0.1147.100';
288
289
290
/** @const {string} */
291
testAgents.IPAD_4 = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us)' +
292
' AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b' +
293
' Safari/531.21.10';
294
295
296
/** @const {string} */
297
testAgents.IPAD_5 =
298
'Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X; en-us) AppleWebKit/534.46' +
299
' (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3';
300
301
302
/** @const {string} */
303
testAgents.IPAD_6 = 'Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) ' +
304
'AppleWebKit/536.26 (KHTML, like Gecko) ' +
305
'Version/6.0 Mobile/10A403 Safari/8536.25';
306
307
308
/** @const {string} */
309
testAgents.CHROME_25 = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) ' +
310
'AppleWebKit/535.8 (KHTML, like Gecko) ' +
311
'Chrome/25.0.1000.10 Safari/535.8';
312
313
314
/** @const {string} */
315
testAgents.CHROME_ANDROID =
316
'Mozilla/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) ' +
317
'AppleWebKit/535.7 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile ' +
318
'Safari/535.7';
319
320
321
/** @const {string} */
322
testAgents.CHROME_ANDROID_PHONE_4_4 =
323
'Mozilla/5.0 (Linux; Android 4.4.2; S8 Build/KOT49H) ' +
324
'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.93 Mobile ' +
325
'Safari/537.36';
326
327
328
/** @const {string} */
329
testAgents.CHROME_ANDROID_TABLET =
330
'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) ' +
331
'AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Safari/535.19';
332
333
334
/** @const {string} */
335
testAgents.CHROME_ANDROID_TABLET_4_4 =
336
'Mozilla/5.0 (Linux; Android 4.4.4; Nexus 7 Build/KTU84P) ' +
337
'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.93 Safari/537.36';
338
339
340
/** @const {string} */
341
testAgents.CHROME_IPHONE =
342
'Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X; en-us) ' +
343
'AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/22.0.1194.0 Mobile/11E53 ' +
344
'Safari/7534.48.3';
345
346
347
/** @const {string} */
348
testAgents.CHROME_IPAD = 'Mozilla/5.0 (iPad; CPU OS 7_0_4 like Mac OS X) ' +
349
'AppleWebKit/537.51.1 (KHTML, like Gecko) CriOS/32.0.1700.20 ' +
350
'Mobile/11B554a Safari/9537.53';
351
352
353
/** @const {string} */
354
testAgents.CHROME_LINUX =
355
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko)' +
356
' Chrome/26.0.1410.33 Safari/537.31';
357
358
359
/**
360
* We traditionally use Appversion to detect X11
361
* @const {string}
362
*/
363
testAgents.CHROME_LINUX_APPVERVERSION =
364
'5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko)' +
365
' Chrome/26.0.1410.33 Safari/537.31';
366
367
368
/** @const {string} */
369
testAgents.CHROME_MAC =
370
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17' +
371
' (KHTML, like Gecko) Chrome/24.0.1309.0 Safari/537.17';
372
373
374
/** @const {string} */
375
testAgents.CHROME_OS =
376
'Mozilla/5.0 (X11; CrOS x86_64 3701.62.0) AppleWebKit/537.31 ' +
377
'(KHTML, like Gecko) Chrome/26.0.1410.40 Safari/537.31';
378
379
380
/** @const {string} */
381
testAgents.CHROME_OS_910 =
382
'Mozilla/5.0 (X11; U; CrOS i686 9.10.0; en-US) AppleWebKit/532.5' +
383
' (KHTML, like Gecko) Chrome/4.0.253.0 Safari/532.5';
384
385
386
/** @const {string} */
387
testAgents.KINDLE_FIRE =
388
'Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; KFTT Build/IML74K)' +
389
' AppleWebKit/535.19 (KHTML, like Gecko) Silk/2.1 Mobile Safari/535.19' +
390
' Silk-Accelerated=true';
391
392
393
/** @const {string} */
394
testAgents.FIREFOX_ANDROID_TABLET =
395
'Mozilla/5.0 (Android; Tablet; rv:28.0) Gecko/28.0 Firefox/28.0';
396
397
}); // goog.scope
398
399