File tree Expand file tree Collapse file tree 3 files changed +12
-17
lines changed
Expand file tree Collapse file tree 3 files changed +12
-17
lines changed Original file line number Diff line number Diff line change 5353 "karma-ie-launcher" : " 1.0.0" ,
5454 "karma-jsdom-launcher" : " 12.0.0" ,
5555 "karma-qunit" : " 4.1.2" ,
56- "karma-webkit-launcher" : " 1.3.1 " ,
56+ "karma-webkit-launcher" : " 2.1.0 " ,
5757 "load-grunt-tasks" : " 5.1.0" ,
5858 "native-promise-only" : " 0.8.1" ,
5959 "playwright-webkit" : " 1.29.2" ,
Original file line number Diff line number Diff line change 11QUnit . module ( "selector" , {
22 beforeEach : function ( ) {
33
4- // Playwright WebKit on macOS doesn't expose `Safari` in its user agent string.
5- // However, this particular version of WebKit is only present in modern
6- // WebKit UAs (Safari 13+) as Chromium is locked to an older version.
4+ // Playwright WebKit on macOS doesn't expose `Safari` in its user agent
5+ // string; use the "AppleWebKit" token. This token is also present
6+ // in the Chromium UA, but it is locked to an older version there.
7+ // Modern WebKit (Safari 13+) locks it to `605.1.15`.
78 this . safari = / \b a p p l e w e b k i t \/ 6 0 5 \. 1 \. 1 5 \b / i. test ( navigator . userAgent ) ;
89 } ,
910 afterEach : moduleTeardown
Original file line number Diff line number Diff line change @@ -107,19 +107,13 @@ testIframe(
107107 expected = expectedMap . firefox ;
108108 } else if ( / (?: i p h o n e | i p a d ) ; .* (?: i p h o n e ) ? o s \d + _ / i. test ( userAgent ) ) {
109109 expected = expectedMap . ios ;
110- } else if (
111-
112- // Playwright WebKit on macOS doesn't expose `Safari` in its user agent string.
113- // However, this particular version of WebKit is only present in modern
114- // WebKit UAs (Safari 13+) as Chromium is locked to an older version.
115- ( / \b a p p l e w e b k i t \/ 6 0 5 \. 1 \. 1 5 \b / i. test ( userAgent ) &&
116- ! / \b s a f a r i \/ / i. test ( userAgent ) ) ||
117-
118- // The Linux version of Playwright WebKit does include the `Safari` token,
119- // though. Since there's no WebKit-based real browser that we officially
120- // support outside of macOS and GitHub Actions run on Linux, use it to
121- // detect Playwright WebKit.
122- / \b l i n u x [ ^ ) ] + \) a p p l e w e b k i t \/ 6 0 5 \. 1 \. 1 5 \b / i. test ( userAgent ) ) {
110+ } else if ( typeof URLSearchParams !== "undefined" &&
111+
112+ // See https://github.com/google/karma-webkit-launcher#detected-if-safari-or-playwright-is-used
113+ new URLSearchParams ( document . referrer || window . location . search ) . get (
114+ "test_browser"
115+ ) === "Playwright"
116+ ) {
123117 expected = expectedMap . webkit ;
124118 } else if ( / \b \d + ( \. \d + ) + s a f a r i / i. test ( userAgent ) ) {
125119 expected = expectedMap . safari ;
You can’t perform that action at this time.
0 commit comments