Tests: Switch background image from online file to local 1x1.jpg

Also, remove unused `expected` property in `css` test cases.

Closes gh-4866
This commit is contained in:
Timo Tijhof 2021-05-24 17:23:50 +01:00 committed by GitHub
parent e539bac79e
commit 482f846203
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 19 deletions

View File

@ -113,7 +113,7 @@ div#fx-tests div.noback {
#nothiddendivchild.prct { font-size: 150%; } #nothiddendivchild.prct { font-size: 150%; }
/* #9239 Attach a background to the body( avoid crashes in removing the test element in support ) */ /* #9239 Attach a background to the body( avoid crashes in removing the test element in support ) */
body, div { background: url(https://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif) no-repeat -1000px 0; } body, div { background: url(1x1.jpg) no-repeat -1000px 0; }
/* #10501 */ /* #10501 */
section { background:#f0f; display:block; } section { background:#f0f; display:block; }

View File

@ -1557,40 +1557,32 @@ QUnit.test(
var done = assert.async(); var done = assert.async();
var styles = [ { var styles = [ {
name: "backgroundAttachment", name: "backgroundAttachment",
value: [ "fixed" ], value: [ "fixed" ]
expected: [ "scroll" ]
}, { }, {
name: "backgroundColor", name: "backgroundColor",
value: [ "rgb(255, 0, 0)", "rgb(255,0,0)", "#ff0000" ], value: [ "rgb(255, 0, 0)", "rgb(255,0,0)", "#ff0000" ]
expected: [ "transparent" ]
}, { }, {
// Firefox returns auto's value // Firefox returns auto's value
name: "backgroundImage", name: "backgroundImage",
value: [ "url('test.png')", "url(" + baseURL + "test.png)", "url(\"" + baseURL + "test.png\")" ], value: [ "url('test.png')", "url(" + baseURL + "test.png)", "url(\"" + baseURL + "test.png\")" ]
expected: [ "none", "url(\"https://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif\")" ]
}, { }, {
name: "backgroundPosition", name: "backgroundPosition",
value: [ "5% 5%" ], value: [ "5% 5%" ]
expected: [ "0% 0%", "-1000px 0px", "-1000px 0%" ]
}, { }, {
// Firefox returns no-repeat // Firefox returns no-repeat
name: "backgroundRepeat", name: "backgroundRepeat",
value: [ "repeat-y" ], value: [ "repeat-y" ]
expected: [ "repeat", "no-repeat" ]
}, { }, {
name: "backgroundClip", name: "backgroundClip",
value: [ "padding-box" ], value: [ "padding-box" ]
expected: [ "border-box" ]
}, { }, {
name: "backgroundOrigin", name: "backgroundOrigin",
value: [ "content-box" ], value: [ "content-box" ]
expected: [ "padding-box" ]
}, { }, {
name: "backgroundSize", name: "backgroundSize",
value: [ "80px 60px" ], value: [ "80px 60px" ]
expected: [ "auto auto" ]
} ]; } ];
jQuery.each( styles, function( index, style ) { jQuery.each( styles, function( index, style ) {
@ -1599,8 +1591,6 @@ QUnit.test(
source = $source[ 0 ], source = $source[ 0 ],
$children = $source.children(); $children = $source.children();
style.expected = style.expected.concat( [ "", "auto" ] );
if ( source.style[ style.name ] === undefined ) { if ( source.style[ style.name ] === undefined ) {
assert.ok( true, style.name + ": style isn't supported and therefore not an issue" ); assert.ok( true, style.name + ": style isn't supported and therefore not an issue" );
assert.ok( true ); assert.ok( true );