diff options
author | Oleg <markelog@gmail.com> | 2012-12-17 18:17:39 +0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-12-20 22:08:32 -0500 |
commit | c8c6ab6924b48832bfc2b94d40887b2f1b6c891e (patch) | |
tree | 9185c82c268d03c84da96ef7773594c562774d5c /test/unit/support.js | |
parent | 00bbbe207555d3aa9d7716bb9fc6d4e4f4bcbf1e (diff) | |
download | jquery-c8c6ab6924b48832bfc2b94d40887b2f1b6c891e.tar.gz jquery-c8c6ab6924b48832bfc2b94d40887b2f1b6c891e.zip |
Fix #12569. Improve feature detect for event bubbling. Close gh-1076.
Diffstat (limited to 'test/unit/support.js')
-rw-r--r-- | test/unit/support.js | 121 |
1 files changed, 110 insertions, 11 deletions
diff --git a/test/unit/support.js b/test/unit/support.js index 8d4ac21bc..94a871ee9 100644 --- a/test/unit/support.js +++ b/test/unit/support.js @@ -7,7 +7,7 @@ test("boxModel", function() { }); if ( jQuery.css ) { - testIframeWithCallback( "body background is not lost if set prior to loading jQuery (#9238)", "support/bodyBackground.html", function( color, support ) { + testIframeWithCallback( "body background is not lost if set prior to loading jQuery (#9239)", "support/bodyBackground.html", function( color, support ) { expect( 2 ); var i, passed = true, @@ -29,6 +29,7 @@ if ( jQuery.css ) { strictEqual( jQuery.support[ i ], support[ i ], "Unexpected property: " + i ); } } + ok( passed, "Same support properties" ); }); } @@ -44,13 +45,12 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo }); (function() { - - var userAgent = window.navigator.userAgent, - expected; + var expected, + userAgent = window.navigator.userAgent; // These tests do not have to stay // They are here to help with upcoming support changes for 1.8 - if ( /chrome\/19\.0/i.test(userAgent) ) { + if ( /chrome/i.test( userAgent ) ) { expected = { "leadingWhitespace":true, "tbody":true, @@ -83,7 +83,106 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo "cors":true, "doesNotIncludeMarginInBodyOffset":true }; - } else if ( /msie 8\.0/i.test(userAgent) ) { + } else if ( /opera/i.test( userAgent ) ) { + expected = { + "leadingWhitespace":true, + "tbody":true, + "htmlSerialize":true, + "style":true, + "hrefNormalized":true, + "opacity":true, + "cssFloat":true, + "checkOn":true, + "optSelected":true, + "getSetAttribute":true, + "enctype":true, + "html5Clone":true, + "submitBubbles":true, + "changeBubbles":true, + "focusinBubbles":false, + "deleteExpando":true, + "noCloneEvent":true, + "inlineBlockNeedsLayout":false, + "shrinkWrapBlocks":false, + "reliableMarginRight":true, + "noCloneChecked":true, + "optDisabled":true, + "radioValue":false, + "checkClone":true, + "appendChecked":true, + "boxModel":true, + "reliableHiddenOffsets":true, + "ajax":true, + "cors":true, + "doesNotIncludeMarginInBodyOffset":true + }; + } else if ( /msie 10\.0/i.test( userAgent ) ) { + expected = { + "leadingWhitespace":true, + "tbody":true, + "htmlSerialize":true, + "style":true, + "hrefNormalized":true, + "opacity":true, + "cssFloat":true, + "checkOn":true, + "optSelected":false, + "getSetAttribute":true, + "enctype":true, + "html5Clone":true, + "submitBubbles":true, + "changeBubbles":true, + "focusinBubbles":true, + "deleteExpando":true, + "noCloneEvent":true, + "inlineBlockNeedsLayout":false, + "shrinkWrapBlocks":false, + "reliableMarginRight":true, + "noCloneChecked":false, + "optDisabled":true, + "radioValue":false, + "checkClone":true, + "appendChecked":true, + "boxModel":true, + "reliableHiddenOffsets":true, + "ajax":true, + "cors":true, + "doesNotIncludeMarginInBodyOffset":true + }; + } else if ( /msie 9\.0/i.test( userAgent ) ) { + expected = { + "leadingWhitespace":true, + "tbody":true, + "htmlSerialize":true, + "style":true, + "hrefNormalized":true, + "opacity":true, + "cssFloat":true, + "checkOn":true, + "optSelected":false, + "getSetAttribute":true, + "enctype":true, + "html5Clone":true, + "submitBubbles":true, + "changeBubbles":true, + "focusinBubbles":true, + "deleteExpando":true, + "noCloneEvent":true, + "inlineBlockNeedsLayout":false, + "shrinkWrapBlocks":false, + "reliableMarginRight":true, + "noCloneChecked":false, + "optDisabled":true, + "radioValue":false, + "checkClone":true, + "appendChecked":true, + "boxModel":true, + "reliableHiddenOffsets":true, + "ajax":true, + "cors":false, + "doesNotIncludeMarginInBodyOffset":true + }; + } else if ( /msie 8\.0/i.test( userAgent ) ) { expected = { "leadingWhitespace":false, "tbody":true, @@ -116,7 +215,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo "cors":false, "doesNotIncludeMarginInBodyOffset":true }; - } else if ( /msie 7\.0/i.test(userAgent) ) { + } else if ( /msie 7\.0/i.test( userAgent ) ) { expected = { "ajax": true, "appendChecked": false, @@ -149,7 +248,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo "tbody": false, "style": false }; - } else if ( /msie 6\.0/i.test(userAgent) ) { + } else if ( /msie 6\.0/i.test( userAgent ) ) { expected = { "leadingWhitespace":false, "tbody":false, @@ -182,7 +281,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo "cors":false, "doesNotIncludeMarginInBodyOffset":true }; - } else if ( /5\.1\.1 safari/i.test(userAgent) ) { + } else if ( /5\.1\.1 safari/i.test( userAgent ) ) { expected = { "leadingWhitespace":true, "tbody":true, @@ -215,7 +314,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo "cors":true, "doesNotIncludeMarginInBodyOffset":true }; - } else if ( /firefox\/3\.6/i.test(userAgent) ) { + } else if ( /firefox/i.test( userAgent ) ) { expected = { "leadingWhitespace":true, "tbody":true, @@ -227,7 +326,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo "checkOn":true, "optSelected":true, "getSetAttribute":true, - "enctype":false, + "enctype":true, "html5Clone":true, "submitBubbles":true, "changeBubbles":true, |