diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2021-11-15 18:40:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-15 18:40:58 +0100 |
commit | e9f77267d00f5d323a8d52bbacdd8d31b265154a (patch) | |
tree | 6f8ff82954ea57a20ca1066bca71fded956d766a /test | |
parent | a51eec74846e2875345e16c737edcc76481f0e34 (diff) | |
download | jquery-e9f77267d00f5d323a8d52bbacdd8d31b265154a.tar.gz jquery-e9f77267d00f5d323a8d52bbacdd8d31b265154a.zip |
Tests: Disable CSS Custom Properties tests in old Safari/iOS
Safari 9.1 & iOS 9.3 support CSS custom properties but that support
is buggy which crashes our tests. Disable those tests there.
See https://caniuse.com/css-variables
Closes gh-4966
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/css.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/unit/css.js b/test/unit/css.js index 84f8c381c..e0bff5868 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -1732,6 +1732,8 @@ QUnit.test( "Do not throw on frame elements from css method (#15098)", function( ( function() { var supportsCssVars, + oldSafari = /iphone os 9_/i.test( navigator.userAgent ) || + /\b9\.\d+(\.\d+)* safari/i.test( navigator.userAgent ), elem = jQuery( "<div>" ).appendTo( document.body ), div = elem[ 0 ]; @@ -1739,7 +1741,15 @@ QUnit.test( "Do not throw on frame elements from css method (#15098)", function( supportsCssVars = !!getComputedStyle( div ).getPropertyValue( "--prop" ); elem.remove(); - QUnit[ supportsCssVars ? "test" : "skip" ]( "css(--customProperty)", function( assert ) { + QUnit[ + + // Support: iOS 9.3 only, Safari 9.1 only + // Safari 9.1 & iOS 9.3 support CSS custom properties but that support + // is buggy which crashes our tests. + supportsCssVars && !oldSafari ? + "test" : + "skip" + ]( "css(--customProperty)", function( assert ) { jQuery( "#qunit-fixture" ).append( "<style>\n" + " .test__customProperties {\n" + |