]> source.dussan.org Git - jquery.git/commitdiff
Tests: Fix tests added in gh-5233
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 27 Mar 2023 20:54:35 +0000 (22:54 +0200)
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 27 Mar 2023 20:54:35 +0000 (22:54 +0200)
test/unit/css.js

index 16edd50ba7e5a1d5c4b2a34c214d6ebc16ee6579..e81ca150c75826c5431ded46a8e0dac23973613a 100644 (file)
@@ -1234,8 +1234,6 @@ QUnit.test( "Do not append px (trac-9548, trac-12990, gh-2792, gh-5179)", functi
        // 'WebkitAspectRatio' which interferes with this test.
        if ( $div.css( "-webkit-aspect-ratio" ) !== "auto" ) {
                $div.css( "aspect-ratio", 2 );
-               console.log( "getComputedStyle( $div[ 0 ] ).aspectRatio",
-                       getComputedStyle( $div[ 0 ] ).aspectRatio );
                window.div = $div[ 0 ];
                if ( $div.css( "aspect-ratio" ) !== undefined ) {
                        assert.equal( $div.css( "aspect-ratio" ), "2 / 1",
@@ -1248,11 +1246,15 @@ QUnit.test( "Do not append px (trac-9548, trac-12990, gh-2792, gh-5179)", functi
        }
 
        $div.css( "border-image-slice", 2 );
-       if ( $div.css( "border-image-slice" ) !== undefined ) {
+       if ( $div.css( "border-image-slice" ) !== undefined &&
+
+                       // Support: Firefox <=48-54 only
+                       // Older Firefox serializes 'border-image-slice' differently.
+                       !/firefox\/48\./i.test( navigator.userAgent ) ) {
                assert.equal( $div.css( "border-image-slice" ), "2",
                        "Does not append px to 'border-image-slice'" );
        } else {
-               assert.ok( true, "No support for 'border-image-slice' CSS property" );
+               assert.ok( true, "No or broken support for 'border-image-slice' CSS property" );
        }
 
        $div.css( "column-count", 1 );