diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2023-04-05 00:44:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-05 00:44:01 +0200 |
commit | 1a4d87afa08a68d81c38172ca10941e25633c323 (patch) | |
tree | a36da9894d111d20dce631bce0b0546231ae50c6 /test | |
parent | 7bb48a0290a20594ea2a5a7b5772e0410a67164c (diff) | |
download | jquery-1a4d87afa08a68d81c38172ca10941e25633c323.tar.gz jquery-1a4d87afa08a68d81c38172ca10941e25633c323.zip |
Tests: Indicate Chrome 112 & Safari 16.4 pass the cssHas support test (3.x version)
Chrome 112 & Safari 16.4 introduce two changes:
* `:has()` is non-forgiving
* `CSS.supports( "selector(...)" )` parses everything in a non-forgiving way
We no longer care about the latter but the former means the `cssHas` support
test now passes.
Closes gh-5226
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/support.js | 102 |
1 files changed, 76 insertions, 26 deletions
diff --git a/test/unit/support.js b/test/unit/support.js index 5be7491e6..db9eda662 100644 --- a/test/unit/support.js +++ b/test/unit/support.js @@ -130,7 +130,7 @@ testIframe( sortDetached: true, sortStable: true }, - chrome: { + chrome_111: { ajax: true, boxSizingReliable: true, checkClone: true, @@ -154,7 +154,31 @@ testIframe( sortDetached: true, sortStable: true }, - safari: { + chrome: { + ajax: true, + boxSizingReliable: true, + checkClone: true, + checkOn: true, + clearCloneStyle: true, + cssHas: true, + cors: true, + createHTMLDocument: true, + disconnectedMatch: true, + getById: true, + noCloneChecked: true, + option: true, + optSelected: true, + pixelBoxStyles: true, + pixelPosition: true, + radioValue: true, + reliableMarginLeft: true, + reliableTrDimensions: true, + scope: true, + scrollboxSize: true, + sortDetached: true, + sortStable: true + }, + safari_16_3: { ajax: true, boxSizingReliable: true, checkClone: true, @@ -178,7 +202,7 @@ testIframe( sortDetached: true, sortStable: true }, - webkit: { + safari: { ajax: true, boxSizingReliable: true, checkClone: true, @@ -202,7 +226,7 @@ testIframe( sortDetached: true, sortStable: true }, - firefox_60: { + webkit: { ajax: true, boxSizingReliable: true, checkClone: true, @@ -219,14 +243,14 @@ testIframe( pixelBoxStyles: true, pixelPosition: true, radioValue: true, - reliableMarginLeft: false, + reliableMarginLeft: true, reliableTrDimensions: true, scope: true, scrollboxSize: true, sortDetached: true, sortStable: true }, - firefox_102: { + firefox_60: { ajax: true, boxSizingReliable: true, checkClone: true, @@ -243,8 +267,8 @@ testIframe( pixelBoxStyles: true, pixelPosition: true, radioValue: true, - reliableMarginLeft: true, - reliableTrDimensions: false, + reliableMarginLeft: false, + reliableTrDimensions: true, scope: true, scrollboxSize: true, sortDetached: true, @@ -370,7 +394,7 @@ testIframe( sortDetached: true, sortStable: true }, - ios: { + ios_15_4_16_3: { ajax: true, boxSizingReliable: true, checkClone: true, @@ -394,6 +418,30 @@ testIframe( sortDetached: true, sortStable: true }, + ios: { + ajax: true, + boxSizingReliable: true, + checkClone: true, + checkOn: true, + clearCloneStyle: true, + cssHas: true, + cors: true, + createHTMLDocument: true, + disconnectedMatch: true, + getById: true, + noCloneChecked: true, + option: true, + optSelected: true, + pixelBoxStyles: true, + pixelPosition: true, + radioValue: true, + reliableMarginLeft: true, + reliableTrDimensions: true, + scope: true, + scrollboxSize: true, + sortDetached: true, + sortStable: true + }, android: { ajax: true, boxSizingReliable: true, @@ -440,36 +488,36 @@ testIframe( } } - if ( /edge\//i.test( userAgent ) ) { + if ( /\bedge\//i.test( userAgent ) ) { expected = expectedMap.edge; - } else if ( /msie 9\.0/i.test( userAgent ) ) { + } else if ( /\bmsie 9\.0/i.test( userAgent ) ) { expected = expectedMap.ie_9; - } else if ( /(msie 10\.0|trident\/7\.0)/i.test( userAgent ) ) { + } else if ( /\b(?:msie 10\.0|trident\/7\.0)/i.test( userAgent ) ) { expected = expectedMap.ie_10_11; - } else if ( /chrome/i.test( userAgent ) ) { + } else if ( /\b(?:headless)?chrome\/(?:10\d|11[01])\b/i.test( userAgent ) ) { + expected = expectedMap.chrome_111; + } else if ( /\b(?:headless)?chrome\//i.test( userAgent ) ) { // Catches Chrome on Android as well (i.e. the default // Android browser on Android >= 4.4). expected = expectedMap.chrome; - } else if ( /\b(?:9|10)\.\d+(\.\d+)* safari/i.test( userAgent ) ) { - expected = expectedMap.safari_9_10; - } else if ( /firefox\/[456]\d\b/i.test( userAgent ) ) { + } else if ( /\bfirefox\/[456]\d\b/i.test( userAgent ) ) { expected = expectedMap.firefox_60; - } else if ( /firefox\/(?:[789]\d|102)\b/i.test( userAgent ) ) { - expected = expectedMap.firefox_102; - } else if ( /firefox/i.test( userAgent ) ) { + } else if ( /\bfirefox\//i.test( userAgent ) ) { expected = expectedMap.firefox; - } else if ( /android 4\.[0-3]/i.test( userAgent ) ) { + } else if ( /\bandroid 4\.[0-3]/i.test( userAgent ) ) { expected = expectedMap.android; - } else if ( /iphone os 7_/i.test( userAgent ) ) { + } else if ( /\biphone os 7_/i.test( userAgent ) ) { expected = expectedMap.ios_7; - } else if ( /iphone os 8_/i.test( userAgent ) ) { + } else if ( /\biphone os 8_/i.test( userAgent ) ) { expected = expectedMap.ios_8; - } else if ( /iphone os (?:9|10)_/i.test( userAgent ) ) { + } else if ( /\biphone os (?:9|10)_/i.test( userAgent ) ) { expected = expectedMap.ios_9_10; - } else if ( /iphone os (?:1[1234]_|15_[0123])/i.test( userAgent ) ) { + } else if ( /\biphone os (?:1[1234]_|15_[0123])/i.test( userAgent ) ) { expected = expectedMap.ios_11_15_3; - } else if ( /(?:iphone|ipad);.*(?:iphone)? os \d+_/i.test( userAgent ) ) { + } else if ( /\biphone os (?:15_|16_[0123])/i.test( userAgent ) ) { + expected = expectedMap.ios_15_4_16_3; + } else if ( /\b(?:iphone|ipad);.*(?:iphone)? os \d+_/i.test( userAgent ) ) { expected = expectedMap.ios; } else if ( typeof URLSearchParams !== "undefined" && @@ -483,7 +531,9 @@ testIframe( ) === "Playwright" ) { expected = expectedMap.webkit; - } else if ( /\b\d+(\.\d+)+ safari/i.test( userAgent ) ) { + } else if ( /\bversion\/(?:15|16\.[0123])(?:\.\d+)* safari/i.test( userAgent ) ) { + expected = expectedMap.safari_16_3; + } else if ( /\bversion\/\d+(?:\.\d+)+ safari/i.test( userAgent ) ) { expected = expectedMap.safari; } |