2011-05-10 10:23:53 +00:00
|
|
|
module("support", { teardown: moduleTeardown });
|
|
|
|
|
2013-09-02 17:21:09 +00:00
|
|
|
function getComputedSupport( support ) {
|
|
|
|
var prop,
|
|
|
|
result = {};
|
|
|
|
|
|
|
|
for ( prop in support ) {
|
|
|
|
if ( typeof support[ prop ] === "function" ) {
|
|
|
|
result[ prop ] = support[ prop ]();
|
|
|
|
} else {
|
|
|
|
result[ prop ] = support[ prop ];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2013-09-11 20:03:40 +00:00
|
|
|
var computedSupport = getComputedSupport( jQuery.support );
|
|
|
|
|
2013-02-03 18:54:38 +00:00
|
|
|
test( "zoom of doom (#13089)", function() {
|
|
|
|
expect( 1 );
|
|
|
|
|
2013-09-02 17:21:09 +00:00
|
|
|
if ( computedSupport.inlineBlockNeedsLayout ) {
|
2013-02-03 18:54:38 +00:00
|
|
|
ok( document.body.style.zoom, "Added a zoom to the body (#11048, #12869)" );
|
|
|
|
} else {
|
|
|
|
ok( !document.body.style.zoom, "No zoom added to the body" );
|
|
|
|
}
|
|
|
|
});
|
2013-09-11 22:23:17 +00:00
|
|
|
|
2012-06-11 01:54:16 +00:00
|
|
|
if ( jQuery.css ) {
|
2012-12-17 14:17:39 +00:00
|
|
|
testIframeWithCallback( "body background is not lost if set prior to loading jQuery (#9239)", "support/bodyBackground.html", function( color, support ) {
|
2012-06-11 01:54:16 +00:00
|
|
|
expect( 2 );
|
2013-08-15 18:15:49 +00:00
|
|
|
var okValue = {
|
|
|
|
"#000000": true,
|
|
|
|
"rgb(0, 0, 0)": true
|
|
|
|
};
|
2012-06-11 01:54:16 +00:00
|
|
|
ok( okValue[ color ], "color was not reset (" + color + ")" );
|
2011-10-31 22:24:34 +00:00
|
|
|
|
2013-08-15 18:15:49 +00:00
|
|
|
stop();
|
|
|
|
// Run doc ready tests as well
|
|
|
|
jQuery(function() {
|
2013-09-02 17:21:09 +00:00
|
|
|
deepEqual( jQuery.extend( {}, support ), computedSupport, "Same support properties" );
|
2013-08-15 18:15:49 +00:00
|
|
|
start();
|
|
|
|
});
|
2012-06-11 01:54:16 +00:00
|
|
|
});
|
|
|
|
}
|
2011-08-04 22:56:49 +00:00
|
|
|
|
2013-03-04 04:20:25 +00:00
|
|
|
testIframeWithCallback( "A non-1 zoom on body doesn't cause WebKit to fail box-sizing test", "support/boxSizing.html", function( boxSizing ) {
|
|
|
|
expect( 1 );
|
2013-09-02 17:21:09 +00:00
|
|
|
equal( boxSizing, computedSupport.boxSizing, "box-sizing properly detected on page with non-1 body zoom" );
|
2013-03-04 04:20:25 +00:00
|
|
|
});
|
|
|
|
|
2012-08-19 21:41:43 +00:00
|
|
|
testIframeWithCallback( "A background on the testElement does not cause IE8 to crash (#9823)", "support/testElementCrash.html", function() {
|
2013-02-08 05:20:33 +00:00
|
|
|
expect( 1 );
|
2011-08-04 22:56:49 +00:00
|
|
|
ok( true, "IE8 does not crash" );
|
|
|
|
});
|
2011-11-17 19:48:27 +00:00
|
|
|
|
2012-10-16 16:22:31 +00:00
|
|
|
testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlocks", "support/shrinkWrapBlocks.html", function( shrinkWrapBlocks ) {
|
|
|
|
expect( 1 );
|
2013-09-02 17:21:09 +00:00
|
|
|
strictEqual( shrinkWrapBlocks, computedSupport.shrinkWrapBlocks, "jQuery.support.shrinkWrapBlocks properties are the same" );
|
2012-10-16 16:22:31 +00:00
|
|
|
});
|
|
|
|
|
2013-10-30 12:20:38 +00:00
|
|
|
|
|
|
|
// This test checkes CSP only for browsers with "Content-Security-Policy" header support
|
|
|
|
// i.e. no old WebKit or old Firefox
|
|
|
|
testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Security/CSP) restrictions",
|
|
|
|
"support/csp.php",
|
|
|
|
function( support ) {
|
|
|
|
expect( 2 );
|
|
|
|
deepEqual( jQuery.extend( {}, support ), computedSupport, "No violations of CSP polices" );
|
|
|
|
|
|
|
|
stop();
|
|
|
|
|
|
|
|
supportjQuery.get( "data/support/csp.log" ).done(function( data ) {
|
|
|
|
equal( data, "", "No log request should be sent" );
|
|
|
|
supportjQuery.get( "data/support/csp-clean.php" ).done( start );
|
|
|
|
});
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2012-06-11 11:59:34 +00:00
|
|
|
(function() {
|
2013-11-10 23:43:18 +00:00
|
|
|
var expected,
|
2012-12-17 14:17:39 +00:00
|
|
|
userAgent = window.navigator.userAgent;
|
2012-06-11 11:59:34 +00:00
|
|
|
|
2012-12-17 14:17:39 +00:00
|
|
|
if ( /chrome/i.test( userAgent ) ) {
|
2011-11-17 19:48:27 +00:00
|
|
|
expected = {
|
2013-09-02 17:21:09 +00:00
|
|
|
"ajax": true,
|
|
|
|
"appendChecked": true,
|
|
|
|
"boxSizing": true,
|
|
|
|
"boxSizingReliable": true,
|
|
|
|
"changeBubbles": true,
|
|
|
|
"checkClone": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"checkOn": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"clearCloneStyle": true,
|
|
|
|
"cors": true,
|
|
|
|
"cssFloat": true,
|
|
|
|
"deleteExpando": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"enctype": true,
|
|
|
|
"focusinBubbles": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"getSetAttribute": true,
|
|
|
|
"hrefNormalized": true,
|
|
|
|
"html5Clone": true,
|
|
|
|
"htmlSerialize": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"inlineBlockNeedsLayout": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"input": true,
|
|
|
|
"leadingWhitespace": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"noCloneChecked": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"noCloneEvent": true,
|
|
|
|
"opacity": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"optDisabled": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"optSelected": true,
|
|
|
|
"ownLast": false,
|
2013-11-10 23:43:18 +00:00
|
|
|
"pixelPosition": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"radioValue": true,
|
|
|
|
"reliableHiddenOffsets": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"reliableMarginRight": true,
|
|
|
|
"shrinkWrapBlocks": false,
|
|
|
|
"style": true,
|
|
|
|
"submitBubbles": true,
|
|
|
|
"tbody": true
|
2011-11-17 19:48:27 +00:00
|
|
|
};
|
2012-12-21 04:12:32 +00:00
|
|
|
} else if ( /opera.*version\/12\.1/i.test( userAgent ) ) {
|
2012-12-17 14:17:39 +00:00
|
|
|
expected = {
|
2013-09-02 17:21:09 +00:00
|
|
|
"ajax": true,
|
|
|
|
"appendChecked": true,
|
|
|
|
"boxSizing": true,
|
|
|
|
"boxSizingReliable": true,
|
|
|
|
"changeBubbles": true,
|
|
|
|
"checkClone": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"checkOn": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"clearCloneStyle": true,
|
|
|
|
"cors": true,
|
|
|
|
"cssFloat": true,
|
|
|
|
"deleteExpando": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"enctype": true,
|
|
|
|
"focusinBubbles": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"getSetAttribute": true,
|
|
|
|
"hrefNormalized": true,
|
|
|
|
"html5Clone": true,
|
|
|
|
"htmlSerialize": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"inlineBlockNeedsLayout": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"input": true,
|
|
|
|
"leadingWhitespace": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"noCloneChecked": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"noCloneEvent": true,
|
|
|
|
"opacity": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"optDisabled": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"optSelected": true,
|
|
|
|
"ownLast": false,
|
|
|
|
"pixelPosition": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"radioValue": false,
|
|
|
|
"reliableHiddenOffsets": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"reliableMarginRight": true,
|
|
|
|
"shrinkWrapBlocks": false,
|
|
|
|
"style": true,
|
|
|
|
"submitBubbles": true,
|
|
|
|
"tbody": true
|
2012-12-17 14:17:39 +00:00
|
|
|
};
|
|
|
|
} else if ( /msie 10\.0/i.test( userAgent ) ) {
|
|
|
|
expected = {
|
2013-09-02 17:21:09 +00:00
|
|
|
"ajax": true,
|
|
|
|
"appendChecked": true,
|
|
|
|
"boxSizing": true,
|
|
|
|
"boxSizingReliable": false,
|
|
|
|
"changeBubbles": true,
|
|
|
|
"checkClone": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"checkOn": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"clearCloneStyle": false,
|
|
|
|
"cors": true,
|
|
|
|
"cssFloat": true,
|
|
|
|
"deleteExpando": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"enctype": true,
|
|
|
|
"focusinBubbles": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"getSetAttribute": true,
|
|
|
|
"hrefNormalized": true,
|
|
|
|
"html5Clone": true,
|
|
|
|
"htmlSerialize": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"inlineBlockNeedsLayout": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"input": true,
|
|
|
|
"leadingWhitespace": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"noCloneChecked": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"noCloneEvent": true,
|
|
|
|
"opacity": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"optDisabled": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"optSelected": false,
|
|
|
|
"ownLast": false,
|
|
|
|
"pixelPosition": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"radioValue": false,
|
|
|
|
"reliableHiddenOffsets": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"reliableMarginRight": true,
|
|
|
|
"shrinkWrapBlocks": false,
|
|
|
|
"style": true,
|
|
|
|
"submitBubbles": true,
|
|
|
|
"tbody": true
|
2012-12-17 14:17:39 +00:00
|
|
|
};
|
|
|
|
} else if ( /msie 9\.0/i.test( userAgent ) ) {
|
|
|
|
expected = {
|
2013-09-02 17:21:09 +00:00
|
|
|
"ajax": true,
|
|
|
|
"appendChecked": true,
|
|
|
|
"boxSizing": true,
|
|
|
|
"boxSizingReliable": false,
|
|
|
|
"changeBubbles": true,
|
|
|
|
"checkClone": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"checkOn": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"clearCloneStyle": false,
|
|
|
|
"cors": false,
|
|
|
|
"cssFloat": true,
|
|
|
|
"deleteExpando": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"enctype": true,
|
|
|
|
"focusinBubbles": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"getSetAttribute": true,
|
|
|
|
"hrefNormalized": true,
|
|
|
|
"html5Clone": true,
|
|
|
|
"htmlSerialize": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"inlineBlockNeedsLayout": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"input": true,
|
|
|
|
"leadingWhitespace": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"noCloneChecked": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"noCloneEvent": true,
|
|
|
|
"opacity": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"optDisabled": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"optSelected": false,
|
|
|
|
"ownLast": false,
|
|
|
|
"pixelPosition": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"radioValue": false,
|
|
|
|
"reliableHiddenOffsets": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"reliableMarginRight": true,
|
|
|
|
"shrinkWrapBlocks": false,
|
|
|
|
"style": true,
|
|
|
|
"submitBubbles": true,
|
|
|
|
"tbody": true
|
2012-12-17 14:17:39 +00:00
|
|
|
};
|
|
|
|
} else if ( /msie 8\.0/i.test( userAgent ) ) {
|
2011-11-17 19:48:27 +00:00
|
|
|
expected = {
|
2013-09-02 17:21:09 +00:00
|
|
|
"ajax": true,
|
|
|
|
"appendChecked": true,
|
|
|
|
"boxSizing": true,
|
|
|
|
"boxSizingReliable": true,
|
|
|
|
"changeBubbles": false,
|
|
|
|
"checkClone": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"checkOn": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"clearCloneStyle": true,
|
|
|
|
"cors": false,
|
|
|
|
"cssFloat": false,
|
|
|
|
"deleteExpando": false,
|
2013-08-04 23:59:02 +00:00
|
|
|
"enctype": true,
|
|
|
|
"focusinBubbles": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"getSetAttribute": true,
|
|
|
|
"hrefNormalized": true,
|
|
|
|
"html5Clone": false,
|
|
|
|
"htmlSerialize": false,
|
2013-08-04 23:59:02 +00:00
|
|
|
"inlineBlockNeedsLayout": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"input": false,
|
|
|
|
"leadingWhitespace": false,
|
2013-08-04 23:59:02 +00:00
|
|
|
"noCloneChecked": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"noCloneEvent": false,
|
|
|
|
"opacity": false,
|
2013-08-04 23:59:02 +00:00
|
|
|
"optDisabled": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"optSelected": false,
|
|
|
|
"ownLast": true,
|
|
|
|
"pixelPosition": false,
|
2013-08-04 23:59:02 +00:00
|
|
|
"radioValue": false,
|
|
|
|
"reliableHiddenOffsets": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"reliableMarginRight": true,
|
|
|
|
"shrinkWrapBlocks": false,
|
|
|
|
"style": false,
|
|
|
|
"submitBubbles": false,
|
|
|
|
"tbody": true
|
2011-11-17 19:48:27 +00:00
|
|
|
};
|
2012-12-17 14:17:39 +00:00
|
|
|
} else if ( /msie 7\.0/i.test( userAgent ) ) {
|
2011-11-17 19:48:27 +00:00
|
|
|
expected = {
|
|
|
|
"ajax": true,
|
|
|
|
"appendChecked": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"boxSizing": false,
|
|
|
|
"boxSizingReliable": true,
|
2011-11-17 19:48:27 +00:00
|
|
|
"changeBubbles": false,
|
2013-09-11 22:23:17 +00:00
|
|
|
"checkClone": true,
|
2011-11-17 19:48:27 +00:00
|
|
|
"checkOn": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"clearCloneStyle": true,
|
2011-11-17 19:48:27 +00:00
|
|
|
"cors": false,
|
|
|
|
"cssFloat": false,
|
|
|
|
"deleteExpando": false,
|
|
|
|
"enctype": true,
|
|
|
|
"focusinBubbles": true,
|
|
|
|
"getSetAttribute": false,
|
|
|
|
"hrefNormalized": false,
|
|
|
|
"html5Clone": false,
|
|
|
|
"htmlSerialize": false,
|
|
|
|
"inlineBlockNeedsLayout": true,
|
2013-09-11 22:23:17 +00:00
|
|
|
"input": true,
|
2011-11-17 19:48:27 +00:00
|
|
|
"leadingWhitespace": false,
|
|
|
|
"noCloneChecked": false,
|
|
|
|
"noCloneEvent": false,
|
|
|
|
"opacity": false,
|
|
|
|
"optDisabled": true,
|
|
|
|
"optSelected": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"ownLast": true,
|
|
|
|
"pixelPosition": false,
|
2011-11-17 19:48:27 +00:00
|
|
|
"radioValue": false,
|
|
|
|
"reliableHiddenOffsets": false,
|
|
|
|
"reliableMarginRight": true,
|
|
|
|
"shrinkWrapBlocks": false,
|
2013-01-08 01:49:36 +00:00
|
|
|
"style": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"submitBubbles": false,
|
|
|
|
"tbody": false
|
2011-11-17 19:48:27 +00:00
|
|
|
};
|
2012-12-17 14:17:39 +00:00
|
|
|
} else if ( /msie 6\.0/i.test( userAgent ) ) {
|
2011-11-17 19:48:27 +00:00
|
|
|
expected = {
|
2013-09-02 17:21:09 +00:00
|
|
|
"ajax": true,
|
|
|
|
"appendChecked": false,
|
|
|
|
"boxSizing": false,
|
|
|
|
"boxSizingReliable": true,
|
|
|
|
"changeBubbles": false,
|
2013-09-11 22:23:17 +00:00
|
|
|
"checkClone": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"checkOn": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"clearCloneStyle": true,
|
|
|
|
"cors": false,
|
|
|
|
"cssFloat": false,
|
|
|
|
"deleteExpando": false,
|
2013-08-04 23:59:02 +00:00
|
|
|
"enctype": true,
|
|
|
|
"focusinBubbles": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"getSetAttribute": false,
|
|
|
|
"hrefNormalized": false,
|
|
|
|
"html5Clone": false,
|
|
|
|
"htmlSerialize": false,
|
2013-08-04 23:59:02 +00:00
|
|
|
"inlineBlockNeedsLayout": true,
|
2013-09-11 22:23:17 +00:00
|
|
|
"input": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"leadingWhitespace": false,
|
2013-08-04 23:59:02 +00:00
|
|
|
"noCloneChecked": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"noCloneEvent": false,
|
|
|
|
"opacity": false,
|
2013-08-04 23:59:02 +00:00
|
|
|
"optDisabled": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"optSelected": false,
|
|
|
|
"ownLast": true,
|
|
|
|
"pixelPosition": false,
|
2013-08-04 23:59:02 +00:00
|
|
|
"radioValue": false,
|
|
|
|
"reliableHiddenOffsets": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"reliableMarginRight": true,
|
|
|
|
"shrinkWrapBlocks": true,
|
|
|
|
"style": false,
|
|
|
|
"submitBubbles": false,
|
|
|
|
"tbody": false
|
2011-11-17 19:48:27 +00:00
|
|
|
};
|
2013-09-02 17:21:09 +00:00
|
|
|
} else if ( /6\.0\.\d+ safari/i.test( userAgent ) ) {
|
2011-11-17 19:48:27 +00:00
|
|
|
expected = {
|
2013-09-02 17:21:09 +00:00
|
|
|
"ajax": true,
|
|
|
|
"appendChecked": true,
|
|
|
|
"boxSizing": true,
|
|
|
|
"boxSizingReliable": true,
|
|
|
|
"changeBubbles": true,
|
|
|
|
"checkClone": true,
|
|
|
|
"checkOn": true,
|
|
|
|
"clearCloneStyle": true,
|
|
|
|
"cors": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"cssFloat": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"deleteExpando": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"enctype": true,
|
|
|
|
"focusinBubbles": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"getSetAttribute": true,
|
|
|
|
"hrefNormalized": true,
|
|
|
|
"html5Clone": true,
|
|
|
|
"htmlSerialize": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"inlineBlockNeedsLayout": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"input": true,
|
|
|
|
"leadingWhitespace": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"noCloneChecked": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"noCloneEvent": true,
|
|
|
|
"opacity": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"optDisabled": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"optSelected": true,
|
|
|
|
"ownLast": false,
|
|
|
|
"pixelPosition": false,
|
2013-08-04 23:59:02 +00:00
|
|
|
"radioValue": true,
|
|
|
|
"reliableHiddenOffsets": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"reliableMarginRight": true,
|
|
|
|
"shrinkWrapBlocks": false,
|
|
|
|
"style": true,
|
|
|
|
"submitBubbles": true,
|
|
|
|
"tbody": true
|
2011-11-17 19:48:27 +00:00
|
|
|
};
|
2013-09-11 01:36:18 +00:00
|
|
|
} else if ( /5\.1\.1 safari/i.test( userAgent ) ) {
|
|
|
|
expected = {
|
|
|
|
"ajax": true,
|
|
|
|
"appendChecked": false,
|
|
|
|
"boxSizing": true,
|
|
|
|
"boxSizingReliable": true,
|
|
|
|
"changeBubbles": true,
|
|
|
|
"checkClone": false,
|
|
|
|
"checkOn": false,
|
|
|
|
"clearCloneStyle": true,
|
|
|
|
"cors": true,
|
|
|
|
"cssFloat": true,
|
|
|
|
"deleteExpando": true,
|
|
|
|
"enctype": true,
|
|
|
|
"focusinBubbles": false,
|
|
|
|
"getSetAttribute": true,
|
|
|
|
"hrefNormalized": true,
|
|
|
|
"html5Clone": true,
|
|
|
|
"htmlSerialize": true,
|
|
|
|
"inlineBlockNeedsLayout": false,
|
2013-09-11 22:23:17 +00:00
|
|
|
"input": true,
|
2013-09-11 01:36:18 +00:00
|
|
|
"leadingWhitespace": true,
|
|
|
|
"noCloneChecked": true,
|
|
|
|
"noCloneEvent": true,
|
|
|
|
"opacity": true,
|
|
|
|
"optDisabled": true,
|
|
|
|
"optSelected": true,
|
|
|
|
"ownLast": false,
|
|
|
|
"pixelPosition": false,
|
|
|
|
"radioValue": true,
|
|
|
|
"reliableHiddenOffsets": true,
|
|
|
|
"reliableMarginRight": true,
|
|
|
|
"shrinkWrapBlocks": false,
|
|
|
|
"style": true,
|
|
|
|
"submitBubbles": true,
|
|
|
|
"tbody": true
|
|
|
|
};
|
2012-12-17 14:17:39 +00:00
|
|
|
} else if ( /firefox/i.test( userAgent ) ) {
|
2011-11-17 19:48:27 +00:00
|
|
|
expected = {
|
2013-09-02 17:21:09 +00:00
|
|
|
"ajax": true,
|
|
|
|
"appendChecked": true,
|
|
|
|
"boxSizing": true,
|
2013-11-10 23:43:18 +00:00
|
|
|
"boxSizingReliable": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"changeBubbles": true,
|
|
|
|
"checkClone": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"checkOn": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"clearCloneStyle": true,
|
|
|
|
"cors": true,
|
|
|
|
"cssFloat": true,
|
|
|
|
"deleteExpando": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"enctype": true,
|
|
|
|
"focusinBubbles": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"getSetAttribute": true,
|
|
|
|
"hrefNormalized": true,
|
|
|
|
"html5Clone": true,
|
|
|
|
"htmlSerialize": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"inlineBlockNeedsLayout": false,
|
2013-09-02 17:21:09 +00:00
|
|
|
"input": true,
|
|
|
|
"leadingWhitespace": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"noCloneChecked": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"noCloneEvent": true,
|
|
|
|
"opacity": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"optDisabled": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"optSelected": true,
|
|
|
|
"ownLast": false,
|
|
|
|
"pixelPosition": true,
|
2013-08-04 23:59:02 +00:00
|
|
|
"radioValue": true,
|
|
|
|
"reliableHiddenOffsets": true,
|
2013-09-02 17:21:09 +00:00
|
|
|
"reliableMarginRight": true,
|
|
|
|
"shrinkWrapBlocks": false,
|
|
|
|
"style": true,
|
|
|
|
"submitBubbles": true,
|
|
|
|
"tbody": true
|
2011-11-17 19:48:27 +00:00
|
|
|
};
|
2012-06-11 11:59:34 +00:00
|
|
|
}
|
|
|
|
|
2012-06-11 17:04:44 +00:00
|
|
|
if ( expected ) {
|
2013-08-04 23:59:02 +00:00
|
|
|
test( "Verify that the support tests resolve as expected per browser", function() {
|
2013-09-02 17:21:09 +00:00
|
|
|
var i, prop,
|
|
|
|
j = 0;
|
|
|
|
|
|
|
|
for ( prop in computedSupport ) {
|
|
|
|
j++;
|
|
|
|
}
|
|
|
|
|
|
|
|
expect( j );
|
2012-10-15 18:09:03 +00:00
|
|
|
|
2013-09-02 17:21:09 +00:00
|
|
|
for ( i in expected ) {
|
2012-06-11 17:04:44 +00:00
|
|
|
if ( jQuery.ajax || i !== "ajax" && i !== "cors" ) {
|
2013-09-02 17:21:09 +00:00
|
|
|
equal( computedSupport[i], expected[i],
|
|
|
|
"jQuery.support['" + i + "']: " + computedSupport[i] +
|
|
|
|
", expected['" + i + "']: " + expected[i]);
|
2012-11-01 04:40:27 +00:00
|
|
|
} else {
|
|
|
|
ok( true, "no ajax; skipping jQuery.support['" + i + "']" );
|
2012-06-11 17:04:44 +00:00
|
|
|
}
|
2012-06-11 11:59:34 +00:00
|
|
|
}
|
2012-06-11 17:04:44 +00:00
|
|
|
});
|
|
|
|
}
|
2012-06-11 11:59:34 +00:00
|
|
|
|
|
|
|
})();
|