mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Tests: Disable/relax a few tests failing in Android 2.3
Fixes gh-1785
This commit is contained in:
parent
01fb17be63
commit
704de8180f
@ -305,9 +305,15 @@ function testAppend( valueObj, assert ) {
|
|||||||
assert.equal( jQuery( "<div/>" ).append( valueObj( "option<area/>" ) )[ 0 ].childNodes.length, 2, "HTML-string with leading text should be processed correctly" );
|
assert.equal( jQuery( "<div/>" ).append( valueObj( "option<area/>" ) )[ 0 ].childNodes.length, 2, "HTML-string with leading text should be processed correctly" );
|
||||||
}
|
}
|
||||||
|
|
||||||
QUnit.test( "append(String|Element|Array<Element>|jQuery)", function( assert ) {
|
// Support: Android 2.3 only
|
||||||
testAppend( manipulationBareObj, assert );
|
// Android 2.3 fails a lot of these tests and we accept it.
|
||||||
} );
|
// See https://github.com/jquery/jquery/issues/1785
|
||||||
|
QUnit[ /android 2\.3/i.test( navigator.userAgent ) ? "skip" : "test" ](
|
||||||
|
"append(String|Element|Array<Element>|jQuery)",
|
||||||
|
function( assert ) {
|
||||||
|
testAppend( manipulationBareObj, assert );
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
QUnit.test( "append(Function)", function( assert ) {
|
QUnit.test( "append(Function)", function( assert ) {
|
||||||
testAppend( manipulationFunctionReturningObj, assert );
|
testAppend( manipulationFunctionReturningObj, assert );
|
||||||
|
@ -466,10 +466,26 @@ testIframe( "offset/scroll", "scroll", function( $, win, doc, assert ) {
|
|||||||
|
|
||||||
// test jQuery using parent window/document
|
// test jQuery using parent window/document
|
||||||
// jQuery reference here is in the iframe
|
// jQuery reference here is in the iframe
|
||||||
|
// Support: Android 2.3 only
|
||||||
|
// Android 2.3 is sometimes off by a few pixels.
|
||||||
window.scrollTo( 0, 0 );
|
window.scrollTo( 0, 0 );
|
||||||
assert.equal( $( window ).scrollTop(), 0, "jQuery(window).scrollTop() other window" );
|
if ( /android 2\.3/i.test( navigator.userAgent ) ) {
|
||||||
|
assert.ok(
|
||||||
|
Math.abs( $( window ).scrollTop() ) < 5,
|
||||||
|
"jQuery(window).scrollTop() other window"
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
assert.equal( $( window ).scrollTop(), 0, "jQuery(window).scrollTop() other window" );
|
||||||
|
}
|
||||||
assert.equal( $( window ).scrollLeft(), 0, "jQuery(window).scrollLeft() other window" );
|
assert.equal( $( window ).scrollLeft(), 0, "jQuery(window).scrollLeft() other window" );
|
||||||
assert.equal( $( document ).scrollTop(), 0, "jQuery(window).scrollTop() other document" );
|
if ( /android 2\.3/i.test( navigator.userAgent ) ) {
|
||||||
|
assert.ok(
|
||||||
|
Math.abs( $( window ).scrollTop() ) < 5,
|
||||||
|
"jQuery(window).scrollTop() other document"
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
assert.equal( $( document ).scrollTop(), 0, "jQuery(window).scrollTop() other document" );
|
||||||
|
}
|
||||||
assert.equal( $( document ).scrollLeft(), 0, "jQuery(window).scrollLeft() other document" );
|
assert.equal( $( document ).scrollLeft(), 0, "jQuery(window).scrollLeft() other document" );
|
||||||
|
|
||||||
// Tests scrollTop/Left with empty jquery objects
|
// Tests scrollTop/Left with empty jquery objects
|
||||||
|
@ -841,9 +841,9 @@ testIframeWithCallback(
|
|||||||
"boxSizing": true,
|
"boxSizing": true,
|
||||||
"boxSizingReliable": true,
|
"boxSizingReliable": true,
|
||||||
"change": true,
|
"change": true,
|
||||||
"checkClone": false,
|
"checkClone": true,
|
||||||
"checkOn": false,
|
"checkOn": false,
|
||||||
"clearCloneStyle": true,
|
"clearCloneStyle": false,
|
||||||
"cors": true,
|
"cors": true,
|
||||||
"createHTMLDocument": true,
|
"createHTMLDocument": true,
|
||||||
"cssFloat": true,
|
"cssFloat": true,
|
||||||
@ -860,15 +860,15 @@ testIframeWithCallback(
|
|||||||
"noCloneChecked": true,
|
"noCloneChecked": true,
|
||||||
"noCloneEvent": true,
|
"noCloneEvent": true,
|
||||||
"opacity": true,
|
"opacity": true,
|
||||||
"optDisabled": true,
|
"optDisabled": false,
|
||||||
"optSelected": true,
|
"optSelected": true,
|
||||||
"ownFirst": true,
|
"ownFirst": true,
|
||||||
"pixelMarginRight": false,
|
"pixelMarginRight": true,
|
||||||
"pixelPosition": false,
|
"pixelPosition": false,
|
||||||
"radioValue": true,
|
"radioValue": true,
|
||||||
"reliableHiddenOffsets": true,
|
"reliableHiddenOffsets": true,
|
||||||
"reliableMarginRight": true,
|
"reliableMarginRight": false,
|
||||||
"reliableMarginLeft": false,
|
"reliableMarginLeft": true,
|
||||||
"shrinkWrapBlocks": false,
|
"shrinkWrapBlocks": false,
|
||||||
"style": true,
|
"style": true,
|
||||||
"submit": true,
|
"submit": true,
|
||||||
|
Loading…
Reference in New Issue
Block a user