]> source.dussan.org Git - jquery.git/commitdiff
Revert "Misc: Drop support for older browsers; update support comments"
authorTimmy Willison <timmywillisn@gmail.com>
Tue, 22 Dec 2015 18:03:11 +0000 (13:03 -0500)
committerTimmy Willison <timmywillisn@gmail.com>
Wed, 6 Jan 2016 19:05:11 +0000 (14:05 -0500)
This reverts commit 90d7cc1d8b2ea7ac75f0eacb42439349c9c73278.

39 files changed:
README.md
src/.jshintrc
src/ajax.js
src/ajax/parseJSON.js
src/ajax/script.js
src/ajax/xhr.js
src/attributes/attr.js
src/attributes/prop.js
src/attributes/support.js
src/attributes/val.js
src/core.js
src/core/init.js
src/core/ready.js
src/css.js
src/css/curCSS.js
src/css/support.js
src/data/var/acceptData.js
src/dimensions.js
src/effects.js
src/event.js
src/manipulation.js
src/manipulation/buildFragment.js
src/manipulation/support.js
src/manipulation/wrapMap.js
src/offset.js
src/support.js
test/data/css/cssWidthBeforeDocReady.html
test/data/dimensions/documentSmall.html
test/data/testsuite.css
test/unit/ajax.js
test/unit/attributes.js
test/unit/core.js
test/unit/css.js
test/unit/effects.js
test/unit/event.js
test/unit/manipulation.js
test/unit/offset.js
test/unit/selector.js
test/unit/support.js

index 3c1b2f355294dfe4554dd0ea1ddcd4ca43c46971..79dfb49426b972e5e25897c8b0f0e5834326671f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ In the spirit of open source software development, jQuery always encourages comm
 Environments in which to use jQuery
 --------------------------------------
 
-- [Browser support](http://jquery.com/browser-support/) differs between the master branch and the compat branch. Specifically, the master branch does not support legacy browsers such as IE8. The jQuery team continues to provide support for legacy browsers on the compat branch. Use the latest compat release if support for those browsers is required. See [browser support](http://jquery.com/browser-support/) for more info.
+- [Browser support](http://jquery.com/browser-support/) differs between the master branch and the compat branch. Specifically, the master branch does not support legacy browsers such as IE6-8. The jQuery team continues to provide support for legacy browsers on the compat branch. Use the latest compat release if support for those browsers is required. See [browser support](http://jquery.com/browser-support/) for more info.
 - To use jQuery in Node, browser extensions, and other non-browser environments, use only master branch releases given the name "jquery" rather than "jquery-compat". The compat branch does not support these environments.
 
 
index f1a2eb53e757829a4d8af51f0a419e20e12f91ac..1ba47a2617126c879640564f35267c4ac38c2d94 100644 (file)
@@ -10,6 +10,7 @@
        "undef": true,
        "unused": true,
 
+       "evil": true,
        "sub": true,
 
        // Support: IE < 10, Android < 4.1
index e92c29c7569c4b3d9e3790e8860589063f61427c..45e8cfe217765317689bdd68295db8f0b2ec5d1e 100644 (file)
@@ -5,6 +5,7 @@ define( [
        "./ajax/var/location",
        "./ajax/var/nonce",
        "./ajax/var/rquery",
+
        "./core/init",
        "./ajax/parseJSON",
        "./ajax/parseXML",
@@ -68,7 +69,7 @@ function addToPrefiltersOrTransports( structure ) {
                        while ( ( dataType = dataTypes[ i++ ] ) ) {
 
                                // Prepend if requested
-                               if ( dataType[ 0 ] === "+" ) {
+                               if ( dataType.charAt( 0 ) === "+" ) {
                                        dataType = dataType.slice( 1 ) || "*";
                                        ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
 
@@ -264,7 +265,7 @@ function ajaxConvert( s, response, jqXHR, isSuccess ) {
                                if ( conv !== true ) {
 
                                        // Unless errors are allowed to bubble, catch and return them
-                                       if ( conv && s.throws ) {
+                                       if ( conv && s[ "throws" ] ) { // jscs:ignore requireDotNotation
                                                response = conv( response );
                                        } else {
                                                try {
@@ -520,7 +521,7 @@ jQuery.extend( {
                jqXHR.error = jqXHR.fail;
 
                // Remove hash character (#7531: and string promotion)
-               // Add protocol if not provided (prefilters might expect it)
+               // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
                // Handle falsy url in the settings object (#10093: consistency with old signature)
                // We also use the url parameter if available
                s.url = ( ( url || s.url || location.href ) + "" ).replace( rhash, "" )
@@ -536,12 +537,12 @@ jQuery.extend( {
                if ( s.crossDomain == null ) {
                        urlAnchor = document.createElement( "a" );
 
-                       // Support: IE8-11+
+                       // Support: IE6-11+
                        // IE throws exception if url is malformed, e.g. http://example.com:80x/
                        try {
                                urlAnchor.href = s.url;
 
-                               // Support: IE8-11+
+                               // Support: IE6-11+
                                // Anchor's host property isn't correctly set when s.url is relative
                                urlAnchor.href = urlAnchor.href;
                                s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
@@ -650,9 +651,9 @@ jQuery.extend( {
                strAbort = "abort";
 
                // Install callbacks on deferreds
-               for ( i in { success: 1, error: 1, complete: 1 } ) {
-                       jqXHR[ i ]( s[ i ] );
-               }
+               completeDeferred.add( s.complete );
+               jqXHR.done( s.success );
+               jqXHR.fail( s.error );
 
                // Get transport
                transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
index 11918b06d6817bc7b258d96e94bf361b98fe70b4..34efb79b215adf64f71a7f568dd328d192c2de4a 100644 (file)
@@ -2,10 +2,50 @@ define( [
        "../core"
 ], function( jQuery ) {
 
-// Support: Android 2.3
-// Workaround failure to string-cast null input
+var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
+
 jQuery.parseJSON = function( data ) {
-       return JSON.parse( data + "" );
+
+       // Attempt to parse using the native JSON parser first
+       if ( window.JSON && window.JSON.parse ) {
+
+               // Support: Android 2.3
+               // Workaround failure to string-cast null input
+               return window.JSON.parse( data + "" );
+       }
+
+       var requireNonComma,
+               depth = null,
+               str = jQuery.trim( data + "" );
+
+       // Guard against invalid (and possibly dangerous) input by ensuring that nothing remains
+       // after removing valid tokens
+       return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {
+
+               // Force termination if we see a misplaced comma
+               if ( requireNonComma && comma ) {
+                       depth = 0;
+               }
+
+               // Perform no more replacements after returning to outermost depth
+               if ( depth === 0 ) {
+                       return token;
+               }
+
+               // Commas must not follow "[", "{", or ","
+               requireNonComma = open || comma;
+
+               // Determine new depth
+               // array/object open ("[" or "{"): depth += true - false (increment)
+               // array/object close ("]" or "}"): depth += false - true (decrement)
+               // other cases ("," or primitive): depth += true - true (numeric cast)
+               depth += !close - !open;
+
+               // Remove this token
+               return "";
+       } ) ) ?
+               ( Function( "return " + str ) )() :
+               jQuery.error( "Invalid JSON: " + data );
 };
 
 return jQuery.parseJSON;
index d6094f5208a4ccf240991e48ba08eee1171329cc..9167b04620fc08c347b60c5dbfbf59c52729eae5 100644 (file)
@@ -85,8 +85,9 @@ jQuery.ajaxTransport( "script", function( s ) {
                                        }
                                };
 
+                               // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
                                // Use native DOM manipulation to avoid our domManip AJAX trickery
-                               head.appendChild( script );
+                               head.insertBefore( script, head.firstChild );
                        },
 
                        abort: function() {
index 5e34d38127011563e095816ef6be3bccea3492ce..6502d24c26ffdc9a61b164a21913a6491e20aff7 100644 (file)
@@ -9,7 +9,7 @@ define( [
 // (This is still attached to ajaxSettings for backward compatibility)
 jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
 
-       // Support: IE8
+       // Support: IE6-IE8
        function() {
 
                // XHR cannot access local files, always use ActiveX for that case
@@ -17,7 +17,7 @@ jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
                        return createActiveXHR();
                }
 
-               // Support: IE 10-11
+               // Support: IE 9-11
                // IE seems to error on cross-domain PATCH requests when ActiveX XHR
                // is used. In IE 9+ always use the native XHR.
                // Note: this condition won't catch Edge as it doesn't define
@@ -172,6 +172,11 @@ if ( xhrSupported ) {
 
                                                // If we're in sync mode we fire the callback
                                                callback();
+                                       } else if ( xhr.readyState === 4 ) {
+
+                                               // (IE6 & IE7) if it's in cache and has been
+                                               // retrieved directly we need to fire the callback
+                                               window.setTimeout( callback );
                                        } else {
 
                                                // Register the callback, but delay it in case `xhr.send` throws
index 125e094d9b82273d3d3ca065cad75c6b82b6e590..127c418f9e06d02ff4d165b2f12714e9ecbf9d20 100644 (file)
@@ -7,9 +7,10 @@ define( [
        "../selector"
 ], function( jQuery, access, support, rnotwhite ) {
 
-var boolHook,
+var nodeHook, boolHook,
        attrHandle = jQuery.expr.attrHandle,
        ruseDefault = /^(?:checked|selected)$/i,
+       getSetAttribute = support.getSetAttribute,
        getSetInput = support.input;
 
 jQuery.fn.extend( {
@@ -44,7 +45,7 @@ jQuery.extend( {
                if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
                        name = name.toLowerCase();
                        hooks = jQuery.attrHooks[ name ] ||
-                               ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
+                               ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
                }
 
                if ( value !== undefined ) {
@@ -104,7 +105,7 @@ jQuery.extend( {
                                if ( jQuery.expr.match.bool.test( name ) ) {
 
                                        // Set corresponding property to false
-                                       if ( getSetInput || !ruseDefault.test( name ) ) {
+                                       if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
                                                elem[ propName ] = false;
 
                                        // Support: IE<9
@@ -113,9 +114,13 @@ jQuery.extend( {
                                                elem[ jQuery.camelCase( "default-" + name ) ] =
                                                        elem[ propName ] = false;
                                        }
+
+                               // See #9699 for explanation of this approach (setting first, then removal)
+                               } else {
+                                       jQuery.attr( elem, name, "" );
                                }
 
-                               elem.removeAttribute( name );
+                               elem.removeAttribute( getSetAttribute ? name : propName );
                        }
                }
        }
@@ -128,8 +133,10 @@ boolHook = {
 
                        // Remove boolean attributes when set to false
                        jQuery.removeAttr( elem, name );
-               } else if ( getSetInput || !ruseDefault.test( name ) ) {
-                       elem.setAttribute( jQuery.propFix[ name ] || name, name );
+               } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
+
+                       // IE<8 needs the *property* name
+                       elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
 
                } else {
 
@@ -144,7 +151,7 @@ boolHook = {
 jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
        var getter = attrHandle[ name ] || jQuery.find.attr;
 
-       if ( getSetInput || !ruseDefault.test( name ) ) {
+       if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
                attrHandle[ name ] = function( elem, name, isXML ) {
                        var ret, handle;
                        if ( !isXML ) {
@@ -171,16 +178,89 @@ jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name )
 } );
 
 // fix oldIE attroperties
-if ( !getSetInput ) {
+if ( !getSetInput || !getSetAttribute ) {
        jQuery.attrHooks.value = {
-               set: function( elem, value ) {
+               set: function( elem, value, name ) {
                        if ( jQuery.nodeName( elem, "input" ) ) {
 
                                // Does not return so that setAttribute is also used
                                elem.defaultValue = value;
+                       } else {
+
+                               // Use nodeHook if defined (#1954); otherwise setAttribute is fine
+                               return nodeHook && nodeHook.set( elem, value, name );
+                       }
+               }
+       };
+}
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+       // Use this for any attribute in IE6/7
+       // This fixes almost every IE6/7 issue
+       nodeHook = {
+               set: function( elem, value, name ) {
+
+                       // Set the existing or create a new attribute node
+                       var ret = elem.getAttributeNode( name );
+                       if ( !ret ) {
+                               elem.setAttributeNode(
+                                       ( ret = elem.ownerDocument.createAttribute( name ) )
+                               );
+                       }
+
+                       ret.value = value += "";
+
+                       // Break association with cloned elements by also using setAttribute (#9646)
+                       if ( name === "value" || value === elem.getAttribute( name ) ) {
+                               return value;
+                       }
+               }
+       };
+
+       // Some attributes are constructed with empty-string values when not defined
+       attrHandle.id = attrHandle.name = attrHandle.coords =
+               function( elem, name, isXML ) {
+                       var ret;
+                       if ( !isXML ) {
+                               return ( ret = elem.getAttributeNode( name ) ) && ret.value !== "" ?
+                                       ret.value :
+                                       null;
                        }
+               };
+
+       // Fixing value retrieval on a button requires this module
+       jQuery.valHooks.button = {
+               get: function( elem, name ) {
+                       var ret = elem.getAttributeNode( name );
+                       if ( ret && ret.specified ) {
+                               return ret.value;
+                       }
+               },
+               set: nodeHook.set
+       };
+
+       // Set contenteditable to false on removals(#10429)
+       // Setting to empty string throws an error as an invalid value
+       jQuery.attrHooks.contenteditable = {
+               set: function( elem, value, name ) {
+                       nodeHook.set( elem, value === "" ? false : value, name );
                }
        };
+
+       // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+       // This is for removals
+       jQuery.each( [ "width", "height" ], function( i, name ) {
+               jQuery.attrHooks[ name ] = {
+                       set: function( elem, value ) {
+                               if ( value === "" ) {
+                                       elem.setAttribute( name, "auto" );
+                                       return value;
+                               }
+                       }
+               };
+       } );
 }
 
 if ( !support.style ) {
index 3eb5d8261c10d73d75611497e3a5575198229ec0..7672ce4f8f675f17a029d367d4631b445fea4956 100644 (file)
@@ -85,6 +85,23 @@ jQuery.extend( {
        }
 } );
 
+// Some attributes require a special call on IE
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !support.hrefNormalized ) {
+
+       // href/src property should get the full normalized URL (#10299/#12915)
+       jQuery.each( [ "href", "src" ], function( i, name ) {
+               jQuery.propHooks[ name ] = {
+                       get: function( elem ) {
+                               return elem.getAttribute( name, 4 );
+                       }
+               };
+       } );
+}
+
+// Support: Safari, IE9+
+// mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
 if ( !support.optSelected ) {
        jQuery.propHooks.selected = {
                get: function( elem ) {
@@ -118,4 +135,9 @@ jQuery.each( [
        jQuery.propFix[ this.toLowerCase() ] = this;
 } );
 
+// IE6/7 call enctype encoding
+if ( !support.enctype ) {
+       jQuery.propFix.enctype = "encoding";
+}
+
 } );
index 5e2de2ae2b5939da293ab4efec832c7bbe682b12..2292ab77db7ce2a36352e31f7993fd61a17103d4 100644 (file)
@@ -11,7 +11,10 @@ define( [
                opt = select.appendChild( document.createElement( "option" ) );
 
        // Setup
-       div.innerHTML = "  <link/><a href='/a'>a</a>";
+       div = document.createElement( "div" );
+       div.setAttribute( "className", "t" );
+       div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+       a = div.getElementsByTagName( "a" )[ 0 ];
 
        // Support: Windows Web Apps (WWA)
        // `type` must use .setAttribute for WWA (#14901)
@@ -23,18 +26,28 @@ define( [
        // First batch of tests.
        a.style.cssText = "top:1px";
 
+       // Test setAttribute on camelCase class.
+       // If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+       support.getSetAttribute = div.className !== "t";
+
        // Get the style information from getAttribute
        // (IE uses .cssText instead)
        support.style = /top/.test( a.getAttribute( "style" ) );
 
+       // Make sure that URLs aren't manipulated
+       // (IE normalizes it by default)
+       support.hrefNormalized = a.getAttribute( "href" ) === "/a";
+
        // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
        support.checkOn = !!input.value;
 
-       // Support: IE8-11+
        // Make sure that a selected-by-default option has a working selected property.
-       // (IE defaults to false instead of true if it's in an optgroup)
+       // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
        support.optSelected = opt.selected;
 
+       // Tests for enctype support on a form (#6743)
+       support.enctype = !!document.createElement( "form" ).enctype;
+
        // Make sure that the options inside disabled selects aren't marked as disabled
        // (WebKit marks them as disabled)
        select.disabled = true;
index 7af79cfefc6714717f2262c323dc308c072452ac..d4ed96f3150fcdb2e56a88b257d0f35288163d32 100644 (file)
@@ -78,10 +78,13 @@ jQuery.extend( {
        valHooks: {
                option: {
                        get: function( elem ) {
+                               var val = jQuery.find.attr( elem, "value" );
+                               return val != null ?
+                                       val :
 
-                               // Support: IE<11
-                               // option.value not trimmed (#14858)
-                               return jQuery.trim( elem.value );
+                                       // Support: IE10-11+
+                                       // option.text throws exceptions (#14686, #14858)
+                                       jQuery.trim( jQuery.text( elem ) );
                        }
                },
                select: {
@@ -100,8 +103,7 @@ jQuery.extend( {
                                for ( ; i < max; i++ ) {
                                        option = options[ i ];
 
-                                       // Support: IE<10
-                                       // IE8-9 doesn't update selected after form reset (#2551)
+                                       // oldIE doesn't update selected after form reset (#2551)
                                        if ( ( option.selected || i === index ) &&
 
                                                        // Don't return options that are disabled or in a disabled optgroup
@@ -135,11 +137,24 @@ jQuery.extend( {
 
                                while ( i-- ) {
                                        option = options[ i ];
-                                       if (
-                                               option.selected =
-                                                       jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
-                                       ) {
-                                               optionSet = true;
+
+                                       if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0 ) {
+
+                                               // Support: IE6
+                                               // When new option element is added to select box we need to
+                                               // force reflow of newly added node in order to workaround delay
+                                               // of initialization properties
+                                               try {
+                                                       option.selected = optionSet = true;
+
+                                               } catch ( _ ) {
+
+                                                       // Will be executed only in IE6
+                                                       option.scrollHeight;
+                                               }
+
+                                       } else {
+                                               option.selected = false;
                                        }
                                }
 
index b7425d277c89b5f2d249dbaf610d14c9a611fe0a..c000e5339c57e57648614960c5b04cff7fffe728 100644 (file)
@@ -285,7 +285,6 @@ jQuery.extend( {
                        typeof obj;
        },
 
-       // Evaluates a script in a global context
        // Workarounds based on findings by Jim Driscoll
        // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
        globalEval: function( data ) {
@@ -295,11 +294,7 @@ jQuery.extend( {
                        // We use an anonymous function so that context is window
                        // rather than jQuery in Firefox
                        ( window.execScript || function( data ) {
-
-                               // jscs:disable
-                               window[ "eval" ].call( window, data );
-                               // jscs:enable
-
+                               window[ "eval" ].call( window, data ); // jscs:ignore requireDotNotation
                        } )( data );
                }
        },
index 6225d15e41015b91ced54b66e9f20ca3ee0c2fa7..fbd87d4e89bb5869dd31bc6297aa349ba9be8f50 100644 (file)
@@ -28,8 +28,8 @@ var rootjQuery,
 
                // Handle HTML strings
                if ( typeof selector === "string" ) {
-                       if ( selector[ 0 ] === "<" &&
-                               selector[ selector.length - 1 ] === ">" &&
+                       if ( selector.charAt( 0 ) === "<" &&
+                               selector.charAt( selector.length - 1 ) === ">" &&
                                selector.length >= 3 ) {
 
                                // Assume that strings that start and end with <> are HTML and skip the regex check
@@ -75,9 +75,17 @@ var rootjQuery,
                                } else {
                                        elem = document.getElementById( match[ 2 ] );
 
-                                       if ( elem ) {
+                                       // Check parentNode to catch when Blackberry 4.6 returns
+                                       // nodes that are no longer in the document #6963
+                                       if ( elem && elem.parentNode ) {
 
-                                               // Inject the element directly into the jQuery object
+                                               // Handle the case where IE and Opera return items
+                                               // by name instead of ID
+                                               if ( elem.id !== match[ 2 ] ) {
+                                                       return rootjQuery.find( selector );
+                                               }
+
+                                               // Otherwise, we inject the element directly into the jQuery object
                                                this.length = 1;
                                                this[ 0 ] = elem;
                                        }
index 2371eba3af973940887e5cd3cb56fefb5587a725..49c1da20292259e80cb5f08b18f2704c46876442 100644 (file)
@@ -69,7 +69,6 @@ function detach() {
                document.removeEventListener( "DOMContentLoaded", completed );
                window.removeEventListener( "load", completed );
 
-       // Support: IE<9
        } else {
                document.detachEvent( "onreadystatechange", completed );
                window.detachEvent( "onload", completed );
@@ -116,7 +115,6 @@ jQuery.ready.promise = function( obj ) {
                        // A fallback to window.onload, that will always work
                        window.addEventListener( "load", completed );
 
-               // Support: IE<9
                // If IE event model is used
                } else {
 
@@ -125,6 +123,36 @@ jQuery.ready.promise = function( obj ) {
 
                        // A fallback to window.onload, that will always work
                        window.attachEvent( "onload", completed );
+
+                       // If IE and not a frame
+                       // continually check to see if the document is ready
+                       var top = false;
+
+                       try {
+                               top = window.frameElement == null && document.documentElement;
+                       } catch ( e ) {}
+
+                       if ( top && top.doScroll ) {
+                               ( function doScrollCheck() {
+                                       if ( !jQuery.isReady ) {
+
+                                               try {
+
+                                                       // Use the trick by Diego Perini
+                                                       // http://javascript.nwbox.com/IEContentLoaded/
+                                                       top.doScroll( "left" );
+                                               } catch ( e ) {
+                                                       return window.setTimeout( doScrollCheck, 50 );
+                                               }
+
+                                               // detach all dom ready events
+                                               detach();
+
+                                               // and execute any waiting functions
+                                               jQuery.ready();
+                                       }
+                               } )();
+                       }
                }
        }
        return readyList.promise( obj );
index b48fe0a3b3d47ae2e787ec4be07141aa7e8f5090..610267d44e192469c4cd480414a36d9024a90a2a 100644 (file)
@@ -41,7 +41,7 @@ var
                fontWeight: "400"
        },
 
-       cssPrefixes = [ "Webkit", "Moz", "ms" ],
+       cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
        emptyStyle = document.createElement( "div" ).style;
 
 // BuildExclude
@@ -56,7 +56,7 @@ function vendorPropName( name ) {
        }
 
        // check for vendor prefixed names
-       var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
+       var capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),
                i = cssPrefixes.length;
 
        while ( i-- ) {
@@ -183,7 +183,8 @@ function getWidthOrHeight( elem, name, extra ) {
        var valueIsBorderBox = true,
                val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
                styles = getStyles( elem ),
-               isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+               isBorderBox = support.boxSizing &&
+                       jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
 
        // Support: IE11 only
        // In IE 11 fullscreen elements inside of an iframe have
@@ -329,7 +330,7 @@ jQuery.extend( {
                        if ( !hooks || !( "set" in hooks ) ||
                                ( value = hooks.set( elem, value, extra ) ) !== undefined ) {
 
-                               // Support: IE<9
+                               // Support: IE
                                // Swallow errors from 'invalid' CSS values (#5509)
                                try {
                                        style[ name ] = value;
@@ -409,7 +410,8 @@ jQuery.each( [ "height", "width" ], function( i, name ) {
                                        elem,
                                        name,
                                        extra,
-                                       jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+                                       support.boxSizing &&
+                                               jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
                                        styles
                                ) : 0
                        );
@@ -466,7 +468,6 @@ if ( !support.opacity ) {
        };
 }
 
-// Support: Android 2.3
 jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
        function( elem, computed ) {
                if ( computed ) {
index 078cff6e1df1ddb9f539260eb39072b32653daab..67fc27525031a24db5800d49d9b7488ae5a5ab8e 100644 (file)
@@ -42,9 +42,11 @@ if ( window.getComputedStyle ) {
                        }
 
                        // A tribute to the "awesome hack by Dean Edwards"
-                       // Android Browser returns percentage for some values,
-                       // but width seems to be reliably pixels.
-                       // This is against the CSSOM draft spec:
+                       // Chrome < 17 and Safari 5.0 uses "computed value"
+                       // instead of "used value" for margin-right
+                       // Safari 5.1.7 (at least) returns percentage for a larger set of values,
+                       // but width seems to be reliably pixels
+                       // this is against the CSSOM draft spec:
                        // http://dev.w3.org/csswg/cssom/#resolved-values
                        if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
 
@@ -64,7 +66,7 @@ if ( window.getComputedStyle ) {
                        }
                }
 
-               // Support: IE9-11+
+               // Support: IE
                // IE returns zIndex value as an integer.
                return ret === undefined ?
                        ret :
@@ -118,7 +120,7 @@ if ( window.getComputedStyle ) {
                        }
                }
 
-               // Support: IE<9
+               // Support: IE
                // IE returns zIndex value as an integer.
                return ret === undefined ?
                        ret :
index be39dabb9c6ccd9fe457644bd8ebca42c40103f9..97d6d4aa1a3e1a1958f41eca1cefffb11150e2da 100644 (file)
@@ -36,6 +36,11 @@ define( [
        div.innerHTML = "";
        container.appendChild( div );
 
+       // Support: Firefox<29, Android 2.3
+       // Vendor-prefix box-sizing
+       support.boxSizing = div.style.boxSizing === "" || div.style.MozBoxSizing === "" ||
+               div.style.WebkitBoxSizing === "";
+
        jQuery.extend( support, {
                reliableHiddenOffsets: function() {
                        if ( pixelPositionVal == null ) {
@@ -133,8 +138,8 @@ define( [
 
                                // Support: Android 2.3
                                // Vendor-prefix box-sizing
-                               "-webkit-box-sizing:content-box;box-sizing:content-box;" +
-                               "display:block;margin:0;border:0;padding:0";
+                               "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
+                               "box-sizing:content-box;display:block;margin:0;border:0;padding:0";
                        contents.style.marginRight = contents.style.width = "0";
                        div.style.width = "1px";
 
@@ -144,7 +149,7 @@ define( [
                        div.removeChild( contents );
                }
 
-               // Support: IE<9
+               // Support: IE8
                // Check if table cells still have offsetWidth/Height when they are set
                // to display:none and there are still other visible table cells in a
                // table row; if so, offsetWidth/Height are not reliable for use when
index 76c74337cd39d6c38aaa9ba733a1d15efeec5262..99c61d5fedef4e86b66a91ef91d07610c64104e2 100644 (file)
@@ -1,4 +1,6 @@
-define( function() {
+define( [
+       "../../core"
+], function( jQuery ) {
 
 /**
  * Determines whether an object can have data
index 24ab4e92136ffc27140a36b4f40c368bb37dd3db..0095cb9c67e8f76abb48d18edb8f54d1652d9a7c 100644 (file)
@@ -31,7 +31,7 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
 
                                        // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
                                        // whichever is greatest
-                                       // unfortunately, this causes bug #3838 in IE8 only,
+                                       // unfortunately, this causes bug #3838 in IE6/8 only,
                                        // but there is currently no good, small way to fix it.
                                        return Math.max(
                                                elem.body[ "scroll" + name ], doc[ "scroll" + name ],
index 1241a2f99a9a8ab21634ec23e80b210c57112be4..d286e5565246cfecb5d48a69956e826d88c7d18a 100644 (file)
@@ -1,22 +1,22 @@
 define( [
        "./core",
-       "./var/document",
+       "./support",
        "./var/rcssNum",
        "./var/rnotwhite",
        "./css/var/cssExpand",
        "./css/var/isHidden",
        "./css/adjustCSS",
        "./css/defaultDisplay",
-       "./var/document",
 
+       "./var/document",
        "./core/init",
        "./effects/Tween",
        "./queue",
        "./css",
        "./deferred",
        "./traversing"
-], function( jQuery, document, rcssNum, rnotwhite, cssExpand,
-       isHidden, adjustCSS, defaultDisplay ) {
+], function( jQuery, support, rcssNum, rnotwhite,
+       cssExpand, isHidden, adjustCSS, defaultDisplay ) {
 
 var
        fxNow, timerId,
@@ -120,7 +120,14 @@ function defaultPrefilter( elem, props, opts ) {
                        jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
 
                if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
-                       style.display = "inline-block";
+
+                       // inline-level elements accept inline-block;
+                       // block-level elements need to be inline with layout
+                       if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) {
+                               style.display = "inline-block";
+                       } else {
+                               style.zoom = 1;
+                       }
                }
        }
 
index f7af220832dbdc89c6f6cc36051d4909993e47d3..8f6fd9f0c36dc57c2a114677084d0a9ef5e3a663 100644 (file)
@@ -411,9 +411,8 @@ jQuery.event = {
                        ) {
 
                                // Call a native DOM method on the target with the same name name as the event.
+                               // Can't use an .isFunction() check here because IE6/7 fails that test.
                                // Don't do default actions on window, that's where global variables be (#6170)
-                               // Support: IE<9
-                               // Can't use an .isFunction() check here because IE8 fails that test.
                                if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
 
                                        // Don't re-trigger an onFOO event when we call its FOO() method
@@ -763,7 +762,7 @@ jQuery.removeEvent = document.removeEventListener ?
 
                if ( elem.detachEvent ) {
 
-                       // #8545, #7054, preventing memory leaks for custom events in IE8
+                       // #8545, #7054, preventing memory leaks for custom events in IE6-8
                        // detachEvent needed property on element, by name of that event,
                        // to properly expose it to GC
                        if ( typeof elem[ name ] === "undefined" ) {
index da2e055f4f85621b3ba64f69986fadf3f86e45fd..f73a9db571bdd8acf857f6b315b9191670683d1d 100644 (file)
@@ -44,6 +44,7 @@ var rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
        safeFragment = createSafeFragment( document ),
        fragmentDiv = safeFragment.appendChild( document.createElement( "div" ) );
 
+// Support: IE<8
 // Manipulating tables requires a tbody
 function manipulationTarget( elem, content ) {
        return jQuery.nodeName( elem, "table" ) &&
@@ -106,6 +107,7 @@ function fixCloneNodeIssues( src, dest ) {
 
        nodeName = dest.nodeName.toLowerCase();
 
+       // IE6-8 copies events bound via attachEvent when using cloneNode.
        if ( !support.noCloneEvent && dest[ jQuery.expando ] ) {
                data = jQuery._data( dest );
 
@@ -117,26 +119,46 @@ function fixCloneNodeIssues( src, dest ) {
                dest.removeAttribute( jQuery.expando );
        }
 
-       // Support: IE<9
        // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
        if ( nodeName === "script" && dest.text !== src.text ) {
                disableScript( dest ).text = src.text;
                restoreScript( dest );
 
-       // Support: IE<9
-       // IE8 fails to persist the checked state of a cloned checkbox
-       // or radio button.
+       // IE6-10 improperly clones children of object elements using classid.
+       // IE10 throws NoModificationAllowedError if parent is null, #12132.
+       } else if ( nodeName === "object" ) {
+               if ( dest.parentNode ) {
+                       dest.outerHTML = src.outerHTML;
+               }
+
+               // This path appears unavoidable for IE9. When cloning an object
+               // element in IE9, the outerHTML strategy above is not sufficient.
+               // If the src has innerHTML and the destination does not,
+               // copy the src.innerHTML into the dest.innerHTML. #10324
+               if ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) {
+                       dest.innerHTML = src.innerHTML;
+               }
+
        } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
-               dest.checked = src.checked;
 
-       // Support: IE<9
-       // IE8 fails to return the selected option to the default selected
+               // IE6-8 fails to persist the checked state of a cloned checkbox
+               // or radio button. Worse, IE6-7 fail to give the cloned element
+               // a checked appearance if the defaultChecked value isn't also set
+
+               dest.defaultChecked = dest.checked = src.checked;
+
+               // IE6-7 get confused and end up setting the value of a cloned
+               // checkbox/radio button to an empty string instead of "on"
+               if ( dest.value !== src.value ) {
+                       dest.value = src.value;
+               }
+
+       // IE6-8 fails to return the selected option to the default selected
        // state when cloning options
        } else if ( nodeName === "option" ) {
                dest.defaultSelected = dest.selected = src.defaultSelected;
 
-       // Support: IE<9
-       // IE8 fails to set the defaultValue to the correct value when
+       // IE6-8 fails to set the defaultValue to the correct value when
        // cloning other types of input fields
        } else if ( nodeName === "input" || nodeName === "textarea" ) {
                dest.defaultValue = src.defaultValue;
@@ -547,8 +569,7 @@ jQuery.each( {
                        elems = i === last ? this : this.clone( true );
                        jQuery( insert[ i ] )[ original ]( elems );
 
-                       // Support: IE<9, Android<4.1, PhantomJS<2
-                       // .get() because push.apply(_, arraylike) throws on ancient WebKit
+                       // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
                        push.apply( ret, elems.get() );
                }
 
index 0e7958f2382d9901f84ccbb7e6f057f018321eb1..df58bc898ae2cd7e752e0d37fda6d08c8fe51297 100644 (file)
@@ -1,5 +1,6 @@
 define( [
        "../core",
+       "./var/rcheckableType",
        "./var/rtagName",
        "./var/rscriptType",
        "./var/rleadingWhitespace",
@@ -8,18 +9,26 @@ define( [
        "./getAll",
        "./setGlobalEval",
        "./support"
-], function( jQuery, rtagName, rscriptType, rleadingWhitespace,
+], function( jQuery, rcheckableType, rtagName, rscriptType, rleadingWhitespace,
        createSafeFragment, wrapMap, getAll, setGlobalEval, support ) {
 
-var rhtml = /<|&#?\w+;/;
+var rhtml = /<|&#?\w+;/,
+       rtbody = /<tbody/i;
+
+function fixDefaultChecked( elem ) {
+       if ( rcheckableType.test( elem.type ) ) {
+               elem.defaultChecked = elem.checked;
+       }
+}
 
 function buildFragment( elems, context, scripts, selection, ignored ) {
        var j, elem, contains,
-               tmp, tag, wrap,
+               tmp, tag, tbody, wrap,
                l = elems.length,
 
                // Ensure a safe fragment
                safe = createSafeFragment( context ),
+
                nodes = [],
                i = 0;
 
@@ -43,6 +52,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
                                // Deserialize a standard representation
                                tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
                                wrap = wrapMap[ tag ] || wrapMap._default;
+
                                tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
 
                                // Descend through wrappers to the right content
@@ -56,6 +66,28 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
                                        nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[ 0 ] ) );
                                }
 
+                               // Remove IE's autoinserted <tbody> from table fragments
+                               if ( !support.tbody ) {
+
+                                       // String was a <table>, *may* have spurious <tbody>
+                                       elem = tag === "table" && !rtbody.test( elem ) ?
+                                               tmp.firstChild :
+
+                                               // String was a bare <thead> or <tfoot>
+                                               wrap[ 1 ] === "<table>" && !rtbody.test( elem ) ?
+                                                       tmp :
+                                                       0;
+
+                                       j = elem && elem.childNodes.length;
+                                       while ( j-- ) {
+                                               if ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), "tbody" ) &&
+                                                       !tbody.childNodes.length ) {
+
+                                                       elem.removeChild( tbody );
+                                               }
+                                       }
+                               }
+
                                jQuery.merge( nodes, tmp.childNodes );
 
                                // Fix #12392 for WebKit and IE > 9
@@ -77,6 +109,12 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
                safe.removeChild( tmp );
        }
 
+       // Reset defaultChecked for any radios and checkboxes
+       // about to be appended to the DOM in IE 6/7 (#8060)
+       if ( !support.appendChecked ) {
+               jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
+       }
+
        i = 0;
        while ( ( elem = nodes[ i++ ] ) ) {
 
@@ -85,6 +123,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
                        if ( ignored ) {
                                ignored.push( elem );
                        }
+
                        continue;
                }
 
index 8feb7aca3e50dcf40055435a3b75e3384fe2fee5..4147a33aa3cb0aa4a14e99b70850ef26dd0dd366 100644 (file)
@@ -10,11 +10,15 @@ define( [
                input = document.createElement( "input" );
 
        // Setup
-       div.innerHTML = "  <link/><a href='/a'></a>";
+       div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
 
        // IE strips leading whitespace when .innerHTML is used
        support.leadingWhitespace = div.firstChild.nodeType === 3;
 
+       // Make sure that tbody elements aren't automatically inserted
+       // IE will insert them into empty tables
+       support.tbody = !div.getElementsByTagName( "tbody" ).length;
+
        // Make sure that link elements get serialized correctly by innerHTML
        // This requires a wrapper element in IE
        support.htmlSerialize = !!div.getElementsByTagName( "link" ).length;
@@ -24,8 +28,15 @@ define( [
        support.html5Clone =
                document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>";
 
+       // Check if a disconnected checkbox will retain its checked
+       // value of true after appended to the DOM (IE6/7)
+       input.type = "checkbox";
+       input.checked = true;
+       fragment.appendChild( input );
+       support.appendChecked = input.checked;
+
        // Make sure textarea (and checkbox) defaultValue is properly cloned
-       // Support: IE8-IE11+
+       // Support: IE6-IE11+
        div.innerHTML = "<textarea>x</textarea>";
        support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
 
@@ -34,14 +45,15 @@ define( [
 
        // Support: Windows Web Apps (WWA)
        // `name` and `type` must use .setAttribute for WWA (#14901)
+       input = document.createElement( "input" );
        input.setAttribute( "type", "radio" );
        input.setAttribute( "checked", "checked" );
        input.setAttribute( "name", "t" );
 
        div.appendChild( input );
 
-       // Support: Android<4.2
-       // Older WebKit doesn't clone checked state correctly in fragments
+       // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
+       // old WebKit doesn't clone checked state correctly in fragments
        support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
 
        // Support: IE<9
index 4bde1df4fc32455a35539a2dafb4d8793b5be0e0..d40685aad203ecfb1ff0334705f1de06f5500fbe 100644 (file)
@@ -7,13 +7,15 @@ var wrapMap = {
        option: [ 1, "<select multiple='multiple'>", "</select>" ],
        legend: [ 1, "<fieldset>", "</fieldset>" ],
        area: [ 1, "<map>", "</map>" ],
+
+       // Support: IE8
        param: [ 1, "<object>", "</object>" ],
        thead: [ 1, "<table>", "</table>" ],
        tr: [ 2, "<table><tbody>", "</tbody></table>" ],
        col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
        td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
 
-       // IE8 can't serialize link, script, style, or any html5 (NoScope) tags,
+       // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
        // unless wrapped in a div with non-breaking characters in front of it.
        _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
 };
index b7dbdf5619ac3620f520c58d4a576adccc45a6e2..9160f7e8891c4f8baf0816f85315bf2c6fede15f 100644 (file)
@@ -105,7 +105,11 @@ jQuery.fn.extend( {
                        return box;
                }
 
-               box = elem.getBoundingClientRect();
+               // If we don't have gBCR, just use 0,0 rather than error
+               // BlackBerry 5, iOS 3 (original iPhone)
+               if ( typeof elem.getBoundingClientRect !== "undefined" ) {
+                       box = elem.getBoundingClientRect();
+               }
                win = getWindow( doc );
                return {
                        top: box.top  + ( win.pageYOffset || docElem.scrollTop )  - ( docElem.clientTop  || 0 ),
index 97b3587da14afd92a833621b2b74c36504569fc8..71ac60f19a43e7a40bb4cef0322654666c1e0d78 100644 (file)
@@ -1,10 +1,11 @@
 define( [
        "./core",
        "./var/support",
+       "./var/document",
        "./core/init", // Needed for hasOwn support test
        // This is listed as a dependency for build order, but it's still optional in builds
        "./core/ready"
-], function( jQuery, support ) {
+], function( jQuery, support, document ) {
 
 // Support: IE<9
 // Iteration over object's inherited properties before its own
@@ -15,5 +16,48 @@ for ( i in jQuery( support ) ) {
 support.ownFirst = i === "0";
 
 // Note: most support tests are defined in their respective modules.
+// false until the test is run
+support.inlineBlockNeedsLayout = false;
 
+// Execute ASAP in case we need to set body.style.zoom
+jQuery( function() {
+
+       // Minified: var a,b,c,d
+       var val, div, body, container;
+
+       body = document.getElementsByTagName( "body" )[ 0 ];
+       if ( !body || !body.style ) {
+
+               // Return for frameset docs that don't have a body
+               return;
+       }
+
+       // Setup
+       div = document.createElement( "div" );
+       container = document.createElement( "div" );
+       container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
+       body.appendChild( container ).appendChild( div );
+
+       if ( typeof div.style.zoom !== "undefined" ) {
+
+               // Support: IE<8
+               // Check if natively block-level elements act like inline-block
+               // elements when setting their display to 'inline' and giving
+               // them layout
+               div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";
+
+               support.inlineBlockNeedsLayout = val = div.offsetWidth === 3;
+               if ( val ) {
+
+                       // Prevent IE 6 from affecting layout for positioned elements #11048
+                       // Prevent IE from shrinking the body in IE 7 mode #12869
+                       // Support: IE<8
+                       body.style.zoom = 1;
+               }
+       }
+
+       body.removeChild( container );
+} );
+
+return support;
 } );
index c45b6811aca76194d94fb25d4e44cdae5fa7f62f..3bdd1b5ab5bfe79be9b0d0d21ad2bbd89579d7c6 100644 (file)
@@ -5,6 +5,7 @@
        <style>
                #test {
                        -webkit-box-sizing: border-box;
+                       -moz-box-sizing: border-box;
                        box-sizing: border-box;
                        width: 100px;
                        height: 100px;
index 2f79d7f93a17cb471b0ddb161237a97829ac485a..63e1c2a8ffce8e32c6fc13d25f17bbe0f09a7f63 100644 (file)
@@ -2,6 +2,16 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" id="html">
 <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+       <style>
+               html {
+                       /**
+                        * we need to null out border-width, because it causes bug #3838
+                        * and until we drop IE6, this test will fail in IE6 if we didn't
+                        * special case this situation.
+                        **/
+                       border-width: 0;
+               }
+       </style>
 </head>
 <body>
        <div>
index de5f3fb0081397c7ef3d635f1d9bb8a044a6cb05..d9909ddcca720db8f31554a16c86362f87cac1e3 100644 (file)
@@ -1,7 +1,7 @@
 /* for testing opacity set in styles in IE */
 ol#empty {
        opacity: 0;
-       -ms-filter: "Alpha(opacity=0) progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffff0000', EndColorStr='#ffffffff')";
+       filter:Alpha(opacity=0) progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffff0000', EndColorStr='#ffffffff');
 }
 
 div#fx-tests h4 {
@@ -47,7 +47,7 @@ div.largeheight {
 }
 
 div.largeopacity {
-       -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=100)";
+       filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
 }
 
 div.medwidth {
@@ -60,7 +60,7 @@ div.medheight {
 
 div.medopacity {
        opacity: 0.5;
-       -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=50)";
+       filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);
 }
 
 div.nowidth {
@@ -73,7 +73,7 @@ div.noheight {
 
 div.noopacity {
        opacity: 0;
-       -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=0)";
+       filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
 }
 
 div.hidden {
@@ -143,8 +143,8 @@ dfn { display: none; }
 /* #9239 Attach a background to the body( avoid crashes in removing the test element in support ) */
 body, div { background: url(http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif) no-repeat -1000px 0; }
 
-/* #6652 Remove -ms-filter: "alpha(opacity=100)" after animation */
-#t6652 div { -ms-filter: "alpha(opacity=50)"; }
+/* #6652 REMOVE FILTER:ALPHA(OPACITY=100) AFTER ANIMATION */
+#t6652 div { filter: alpha(opacity=50); }
 
 /* #10501 */
 section { background:#f0f; display:block; }
index 11cb902d2b9b6886470f5175cb6f825340c3521f..9abc5e61338909e10a78b1fc7edfe42874204b0a 100644 (file)
@@ -1,8 +1,8 @@
-var isIE8 = /msie 8\.0/i.test( window.navigator.userAgent );
+var isoldIE = /msie [876]\.0/i.test( window.navigator.userAgent );
 
 QUnit.module( "ajax", {
        setup: function() {
-               if ( !isIE8 ) {
+               if ( !isoldIE ) {
                        return;
                }
 
@@ -52,7 +52,7 @@ QUnit.module( "ajax", {
        );
 
        ajaxTest( "jQuery.ajax() - success callbacks", 8, function( assert ) {
-           return {
+               return {
                        setup: addGlobalEvents( "ajaxStart ajaxStop ajaxSend ajaxComplete ajaxSuccess", assert ),
                        url: url( "data/name.html" ),
                        beforeSend: function() {
@@ -820,7 +820,7 @@ QUnit.module( "ajax", {
                                                "jsonpCallback option is set back to default in callbacks"
                                        );
 
-                                       if ( isIE8 ) {
+                                       if ( isoldIE ) {
                                                assert.ok( true, "IE8 can't remove property from the window" );
 
                                        } else {
@@ -1417,8 +1417,8 @@ QUnit.module( "ajax", {
                };
        } );
 
-       test( "#11743 - jQuery.ajax() - script, throws exception", 1, function() {
-               throws( function() {
+       QUnit.test( "#11743 - jQuery.ajax() - script, throws exception", 1, function(assert) {
+               assert.throws( function() {
                        jQuery.ajax( {
                                url: "data/badjson.js",
                                dataType: "script",
@@ -1430,10 +1430,10 @@ QUnit.module( "ajax", {
                                // Global events get confused by the exception
                                global: false,
                                success: function() {
-                                       ok( false, "Success." );
+                                       assert.ok( false, "Success." );
                                },
                                error: function() {
-                                       ok( false, "Error." );
+                                       assert.ok( false, "Error." );
                                }
                        } );
                }, "exception bubbled" );
@@ -1656,7 +1656,7 @@ QUnit.module( "ajax", {
                        url: url( "data/ajax/content-type.php" ),
                        data: {
                                "content-type": "test/jsontest",
-                               "response": JSON.stringify( { test: "test" } )
+                               "response": "{ \"test\": \"test\" }"
                        },
                        success: function( result ) {
                                assert.strictEqual(
index 9f8502d5d196f995256c782a9ab78657bdb2be89..be905cfd6b5f9ded14aeab075a95a92d03b5207b 100644 (file)
@@ -46,7 +46,11 @@ QUnit.test( "jQuery.propFix integrity test", function( assert ) {
                "contenteditable": "contentEditable"
        };
 
-       assert.deepEqual( props, jQuery.propFix, "jQuery.propFix passes integrity check" );
+       if ( !jQuery.support.enctype ) {
+               props.enctype = "encoding";
+       }
+
+       deepEqual( props, jQuery.propFix, "jQuery.propFix passes integrity check" );
 } );
 
 QUnit.test( "attr(String)", function( assert ) {
@@ -588,11 +592,12 @@ QUnit.test( "removeAttr(String)", function( assert ) {
                assert.ok( false, "Removing contenteditable threw an error (#10429)" );
        }
 
-       $first = jQuery( "<div Case='mixed'></div>" );
-       assert.equal( $first.attr( "Case" ), "mixed", "case of attribute doesn't matter" );
-       $first.removeAttr( "Case" );
-       assert.equal( $first.attr( "Case" ), undefined, "mixed-case attribute was removed" );
-} );
+       $first = jQuery("<div Case='mixed'></div>");
+       equal( $first.attr("Case"), "mixed", "case of attribute doesn't matter" );
+       $first.removeAttr("Case");
+       // IE 6/7 return empty string here, not undefined
+       ok( !$first.attr("Case"), "mixed-case attribute was removed" );
+});
 
 QUnit.test( "removeAttr(String) in XML", function( assert ) {
        assert.expect( 7 );
index 9714b8685a12ca21b95d595a85b7900a36b68c8c..81fbd4e54bfac64de321670bce6702db932da553 100644 (file)
@@ -1541,7 +1541,7 @@ QUnit.test("jQuery.parseHTML", function( assert ) {
        assert.equal( jQuery.parseHTML( "<td><td>" )[ 1 ].parentNode.nodeType, 11, "parentNode should be documentFragment" );
 } );
 
-if ( jQuery.support.createHTMLDocument ) {
+if ( jQuery.support.createHTMLDocument && !/opera.*version\/12\.1/i.test( navigator.userAgent ) ) {
        QUnit.asyncTest( "jQuery.parseHTML", function( assert ) {
                assert.expect( 1 );
 
index df4b800f0a5136742cdd75736b1d5911ac6c565f..adfc46cb8a2861619a7432b50bc7de544997bca8 100644 (file)
@@ -209,7 +209,7 @@ QUnit.test( "css() explicit and relative values", function( assert ) {
 } );
 
 QUnit.test( "css() non-px relative values (gh-1711)", function( assert ) {
-       assert.expect( 17 );
+       assert.expect( 16 );
 
        var cssCurrent,
                units = {},
@@ -271,7 +271,10 @@ QUnit.test( "css() non-px relative values (gh-1711)", function( assert ) {
        add( "lineHeight",  30, "pc" );
        add( "lineHeight",   1, "cm" );
        add( "lineHeight", -20, "mm" );
-       add( "lineHeight",  50,  "%" );
+
+       // Opera 12 does something funky for this one
+       // Just disabling for 1.12
+       // add( "lineHeight",  50,  "%" );
 } );
 
 QUnit.test( "css(String, Object)", function( assert ) {
@@ -530,7 +533,7 @@ QUnit.test( "show();", function( assert ) {
 
        assert.expect( 18 );
 
-       var hiddendiv, div, pass, test;
+       var hiddendiv, div, pass, old, test;
        hiddendiv = jQuery( "div.hidden" );
 
        assert.equal( jQuery.css( hiddendiv[ 0 ], "display" ), "none", "hiddendiv is display: none" );
@@ -553,7 +556,9 @@ QUnit.test( "show();", function( assert ) {
        assert.ok( pass, "Show" );
 
        // #show-tests * is set display: none in CSS
-       jQuery( "#qunit-fixture" ).append( "<div id='show-tests'><div><p><a href='#'></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>" );
+       jQuery( "#qunit-fixture" ).append( "<div id='show-tests'><div><p><a href='#'></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div><table id='test-table'></table>" );
+       old = jQuery( "#test-table" ).show().css( "display" ) !== "table";
+       jQuery( "#test-table" ).remove();
 
        test = {
                "div": "block",
@@ -562,14 +567,14 @@ QUnit.test( "show();", function( assert ) {
                "code": "inline",
                "pre": "block",
                "span": "inline",
-               "table": "table",
-               "thead": "table-header-group",
-               "tbody": "table-row-group",
-               "tr": "table-row",
-               "th": "table-cell",
-               "td": "table-cell",
+               "table": old ? "block" : "table",
+               "thead": old ? "block" : "table-header-group",
+               "tbody": old ? "block" : "table-row-group",
+               "tr": old ? "block" : "table-row",
+               "th": old ? "block" : "table-cell",
+               "td": old ? "block" : "table-cell",
                "ul": "block",
-               "li": "list-item"
+               "li": old ? "block" : "list-item"
        };
 
        jQuery.each( test, function( selector, expected ) {
@@ -1021,13 +1026,13 @@ QUnit.test( "css opacity consistency across browsers (#12685)", function( assert
                fixture = jQuery( "#qunit-fixture" );
 
        // Append style element
-       jQuery( "<style>.opacityWithSpaces_t12685 { opacity: 0.1; -ms-filter: 'alpha(opacity = 10)'; } .opacityNoSpaces_t12685 { opacity: 0.2; -ms-filter: 'alpha(opacity=20)'; }</style>" ).appendTo( fixture );
+       jQuery( "<style>.opacityWithSpaces_t12685 { opacity: 0.1; filter: alpha(opacity = 10); } .opacityNoSpaces_t12685 { opacity: 0.2; filter: alpha(opacity=20); }</style>" ).appendTo( fixture );
 
        el = jQuery( "<div class='opacityWithSpaces_t12685'></div>" ).appendTo( fixture );
 
-       assert.equal( Math.round( el.css( "opacity" ) * 100 ), 10, "opacity from style sheet (-ms-filter:alpha with spaces)" );
+       assert.equal( Math.round( el.css( "opacity" ) * 100 ), 10, "opacity from style sheet (filter:alpha with spaces)" );
        el.removeClass( "opacityWithSpaces_t12685" ).addClass( "opacityNoSpaces_t12685" );
-       assert.equal( Math.round( el.css( "opacity" ) * 100 ), 20, "opacity from style sheet (-ms-filter:alpha without spaces)" );
+       assert.equal( Math.round( el.css( "opacity" ) * 100 ), 20, "opacity from style sheet (filter:alpha without spaces)" );
        el.css( "opacity", 0.3 );
        assert.equal( Math.round( el.css( "opacity" ) * 100 ), 30, "override opacity" );
        el.css( "opacity", "" );
@@ -1275,7 +1280,7 @@ QUnit.test( "Do not throw on frame elements from css method (#15098)", function(
        }
 } );
 
-QUnit.test( "get upper case alpha opacity in IE8", function( assert ) {
+QUnit[/msie 8\.0/.test(navigator.userAgent) ? "test" : "skip"]( "get upper case alpha opacity in IE8", function( assert ) {
        assert.expect( 1 );
 
        var div = document.createElement( "div" ),
@@ -1295,7 +1300,7 @@ QUnit.test( "get upper case alpha opacity in IE8", function( assert ) {
        function resetCssPropsFor( name ) {
                delete jQuery.cssProps[ name ];
                jQuery.each( vendorPrefixes, function( index, prefix ) {
-                       delete jQuery.cssProps[ prefix + name[ 0 ].toUpperCase() + name.slice( 1 ) ];
+                       delete jQuery.cssProps[ prefix + name.charAt( 0 ).toUpperCase() + name.slice( 1 ) ];
                } );
        }
 
index 78dbe9dca66742b9e59a52da85506ed12fa3018a..c1d67b6513a2dd0b1394ea8025a2fa421072e135 100644 (file)
@@ -24,7 +24,7 @@ QUnit.test( "sanity check", function( assert ) {
        assert.equal( jQuery( "#dl:visible, #qunit-fixture:visible, #foo:visible" ).length, 3, "QUnit state is correct for testing effects" );
 } );
 
-test( "show() basic", 2, function() {
+QUnit.test( "show() basic", 2, function() {
        var div,
                hiddendiv = jQuery( "div.hidden" );
 
@@ -42,8 +42,8 @@ test( "show() basic", 2, function() {
        QUnit.expectJqData( this, hiddendiv, "olddisplay" );
 } );
 
-test( "show()", 27, function() {
-       var div, speeds, test,
+QUnit.test( "show()", 27, function() {
+       var div, speeds, test, old,
                displaysActual, displaysExpected,
                hiddendiv = jQuery( "div.hidden" );
 
@@ -93,7 +93,11 @@ test( "show()", 27, function() {
        QUnit.expectJqData( this, div, "olddisplay" );
 
        // #show-tests * is set display: none in CSS
-       jQuery( "#qunit-fixture" ).append( "<div id='show-tests'><div><p><a href='#'></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>" );
+       jQuery( "#qunit-fixture" )
+               .append( "<div id='show-tests'><div><p><a href='#'></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div><table id='test-table'></table>" );
+
+       old = jQuery( "#test-table" ).show().css( "display" ) !== "table";
+       jQuery( "#test-table" ).remove();
 
        test = {
                "div": "block",
@@ -102,14 +106,14 @@ test( "show()", 27, function() {
                "code": "inline",
                "pre": "block",
                "span": "inline",
-               "table": "table",
-               "thead": "table-header-group",
-               "tbody": "table-row-group",
-               "tr": "table-row",
-               "th": "table-cell",
-               "td": "table-cell",
+               "table": old ? "block" : "table",
+               "thead": old ? "block" : "table-header-group",
+               "tbody": old ? "block" : "table-row-group",
+               "tr": old ? "block" : "table-row",
+               "th": old ? "block" : "table-cell",
+               "td": old ? "block" : "table-cell",
                "ul": "block",
-               "li": "list-item"
+               "li": old ? "block" : "list-item"
        };
 
        jQuery.each( test, function( selector, expected ) {
@@ -124,31 +128,35 @@ test( "show()", 27, function() {
        jQuery( "<div>test</div> text <span>test</span>" ).hide().remove();
 } );
 
-test( "show(Number) - other displays", function() {
+QUnit.test( "show(Number) - other displays", function() {
        expect( 15 );
 
        // #show-tests * is set display: none in CSS
-       jQuery( "#qunit-fixture" ).append( "<div id='show-tests'><div><p><a href='#'></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>" );
+       jQuery( "#qunit-fixture" ).append( "<div id='show-tests'><div><p><a href='#'></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div><table id='test-table'></table>" );
+
+       var test,
+               old = jQuery("#test-table").show().css("display") !== "table";
+       jQuery("#test-table").remove();
 
        // Note: inline elements are expected to be inline-block
        // because we're showing width/height
        // Can't animate width/height inline
        // See #14344
-       var test = {
+       test = {
                "div": "block",
                "p": "block",
                "a": "inline-block",
                "code": "inline-block",
                "pre": "block",
                "span": "inline-block",
-               "table": "table",
-               "thead": "table-header-group",
-               "tbody": "table-row-group",
-               "tr": "table-row",
-               "th": "table-cell",
-               "td": "table-cell",
+               "table": old ? "block" : "table",
+               "thead": old ? "block" : "table-header-group",
+               "tbody": old ? "block" : "table-row-group",
+               "tr": old ? "block" : "table-row",
+               "th": old ? "block" : "table-cell",
+               "td": old ? "block" : "table-cell",
                "ul": "block",
-               "li": "list-item"
+               "li": old ? "block" : "list-item"
        };
 
        jQuery.each( test, function( selector, expected ) {
@@ -162,7 +170,7 @@ test( "show(Number) - other displays", function() {
 } );
 
 // Supports #7397
-test( "Persist correct display value", function() {
+QUnit.test( "Persist correct display value", function() {
        expect( 3 );
 
        // #show-tests * is set display: none in CSS
@@ -194,7 +202,7 @@ test( "Persist correct display value", function() {
        QUnit.expectJqData( this, $span, "olddisplay" );
 } );
 
-test( "animate(Hash, Object, Function)", function() {
+QUnit.test( "animate(Hash, Object, Function)", function() {
        expect( 1 );
        var hash = { opacity: "show" },
                hashCopy = jQuery.extend( {}, hash );
@@ -203,7 +211,7 @@ test( "animate(Hash, Object, Function)", function() {
        } );
 } );
 
-test( "animate relative values", function() {
+QUnit.test( "animate relative values", function() {
 
        var value = 40,
                clock = this.clock,
@@ -242,7 +250,7 @@ test( "animate relative values", function() {
        } );
 } );
 
-test( "animate negative height", function() {
+QUnit.test( "animate negative height", function() {
        expect( 1 );
        jQuery( "#foo" ).animate( { height: -100 }, 100, function() {
                equal( this.offsetHeight, 0, "Verify height." );
@@ -250,7 +258,7 @@ test( "animate negative height", function() {
        this.clock.tick( 100 );
 } );
 
-test( "animate negative margin", function() {
+QUnit.test( "animate negative margin", function() {
        expect( 1 );
        jQuery( "#foo" ).animate( { "marginTop": -100 }, 100, function() {
                equal( jQuery( this ).css( "marginTop" ), "-100px", "Verify margin." );
@@ -258,7 +266,7 @@ test( "animate negative margin", function() {
        this.clock.tick( 100 );
 } );
 
-test( "animate negative margin with px", function() {
+QUnit.test( "animate negative margin with px", function() {
        expect( 1 );
        jQuery( "#foo" ).animate( { marginTop: "-100px" }, 100, function() {
                equal( jQuery( this ).css( "marginTop" ), "-100px", "Verify margin." );
@@ -266,7 +274,7 @@ test( "animate negative margin with px", function() {
        this.clock.tick( 100 );
 } );
 
-test( "animate negative padding", function() {
+QUnit.test( "animate negative padding", function() {
        expect( 1 );
        jQuery( "#foo" ).animate( { "paddingBottom": -100 }, 100, function() {
                equal( jQuery( this ).css( "paddingBottom" ), "0px", "Verify paddingBottom." );
@@ -274,42 +282,59 @@ test( "animate negative padding", function() {
        this.clock.tick( 100 );
 } );
 
-test( "animate block as inline width/height", function() {
+QUnit.test( "animate block as inline width/height", function() {
        expect( 3 );
 
-       var span = jQuery( "<span>" ).css( "display", "inline-block" ).appendTo( "body" );
+       var span = jQuery("<span>").css("display", "inline-block").appendTo("body"),
+               expected = span.css("display");
 
        span.remove();
 
-       jQuery( "#foo" ).css( { display: "inline", width: "", height: "" } ).animate( { width: 42, height: 42 }, 100, function() {
-               equal( jQuery( this ).css( "display" ), "inline-block", "inline-block was set on non-floated inline element when animating width/height" );
-               equal( this.offsetWidth, 42, "width was animated" );
-               equal( this.offsetHeight, 42, "height was animated" );
-       } );
+       if ( jQuery.support.inlineBlockNeedsLayout || expected === "inline-block" ) {
+
+               jQuery("#foo").css({ display: "inline", width: "", height: "" }).animate({ width: 42, height: 42 }, 100, function() {
+                       equal( jQuery(this).css("display"), jQuery.support.inlineBlockNeedsLayout ? "inline" : "inline-block", "inline-block was set on non-floated inline element when animating width/height" );
+                       equal( this.offsetWidth, 42, "width was animated" );
+                       equal( this.offsetHeight, 42, "height was animated" );
+               });
 
+       // Browser doesn't support inline-block
+       } else {
+               ok( true, "Browser doesn't support inline-block" );
+               ok( true, "Browser doesn't support inline-block" );
+               ok( true, "Browser doesn't support inline-block" );
+       }
        this.clock.tick( 100 );
 } );
 
-test( "animate native inline width/height", function() {
+QUnit.test( "animate native inline width/height", function() {
        expect( 3 );
 
-       var span = jQuery( "<span>" ).css( "display", "inline-block" ).appendTo( "body" );
+       var span = jQuery("<span>").css("display", "inline-block").appendTo("body"),
+               expected = span.css("display");
 
        span.remove();
 
-       jQuery( "#foo" ).css( { display: "", width: "", height: "" } )
-               .append( "<span>text</span>" )
-               .children( "span" )
-                       .animate( { width: 42, height: 42 }, 100, function() {
-                               equal( jQuery( this ).css( "display" ), "inline-block", "inline-block was set on non-floated inline element when animating width/height" );
-                               equal( this.offsetWidth, 42, "width was animated" );
-                               equal( this.offsetHeight, 42, "height was animated" );
-                       } );
-
+       if ( jQuery.support.inlineBlockNeedsLayout || expected === "inline-block" ) {
+               jQuery("#foo").css({ display: "", width: "", height: "" })
+                       .append("<span>text</span>")
+                       .children("span")
+                               .animate({ width: 42, height: 42 }, 100, function() {
+                                       equal( jQuery(this).css("display"), "inline-block", "inline-block was set on non-floated inline element when animating width/height" );
+                                       equal( this.offsetWidth, 42, "width was animated" );
+                                       equal( this.offsetHeight, 42, "height was animated" );
+                               });
+
+       // Browser doesn't support inline-block
+       } else {
+               ok( true, "Browser doesn't support inline-block" );
+               ok( true, "Browser doesn't support inline-block" );
+               ok( true, "Browser doesn't support inline-block" );
+       }
        this.clock.tick( 100 );
 } );
 
-test( "animate block width/height", function() {
+QUnit.test( "animate block width/height", function() {
        expect( 3 );
 
        jQuery( "<div>" ).appendTo( "#qunit-fixture" ).css( {
@@ -336,47 +361,56 @@ test( "animate block width/height", function() {
        this.clock.tick( 100 );
 } );
 
-test( "animate table width/height", function() {
+QUnit.test("animate table width/height", function() {
        expect( 1 );
 
+       var displayMode = jQuery( "#table" ).css( "display" ) !== "table" ? "block" : "table";
+
        jQuery( "#table" ).animate( { width: 42, height: 42 }, 100, function() {
-               equal( jQuery( this ).css( "display" ), "table", "display mode is correct" );
+               equal( jQuery( this ).css( "display" ), displayMode, "display mode is correct" );
        } );
        this.clock.tick( 100 );
 } );
 
-test( "animate table-row width/height", function() {
+QUnit.test("animate table-row width/height", function() {
        expect( 3 );
-       var tr = jQuery( "#table" )
+       var displayMode,
+               tr = jQuery( "#table" )
                        .attr( { "cellspacing": 0, "cellpadding": 0, "border": 0 } )
                        .html( "<tr style='height:42px;'><td style='padding:0;'><div style='width:20px;height:20px;'></div></td></tr>" )
                        .find( "tr" );
 
+       // IE<8 uses "block" instead of the correct display type
+       displayMode = tr.css( "display" ) !== "table-row" ? "block" : "table-row";
+
        tr.animate( { width: 10, height: 10 }, 100, function() {
-               equal( jQuery( this ).css( "display" ), "table-row", "display mode is correct" );
+               equal( jQuery( this ).css( "display" ), displayMode, "display mode is correct" );
                equal( this.offsetWidth, 20, "width animated to shrink wrap point" );
                equal( this.offsetHeight, 20, "height animated to shrink wrap point" );
        } );
        this.clock.tick( 100 );
 } );
 
-test( "animate table-cell width/height", function() {
+QUnit.test( "animate table-cell width/height", function() {
        expect( 3 );
-
-       var td = jQuery( "#table" )
-                       .attr( { "cellspacing": 0, "cellpadding": 0, "border": 0 } )
+       var displayMode,
+               td = jQuery( "#table" )
+                       .attr({ "cellspacing": 0, "cellpadding": 0, "border": 0 })
                        .html( "<tr><td style='width:42px;height:42px;padding:0;'><div style='width:20px;height:20px;'></div></td></tr>" )
                        .find( "td" );
 
+       // IE<8 uses "block" instead of the correct display type
+       displayMode = td.css( "display" ) !== "table-cell" ? "block" : "table-cell";
+
        td.animate( { width: 10, height: 10 }, 100, function() {
-               equal( jQuery( this ).css( "display" ), "table-cell", "display mode is correct" );
+               equal( jQuery( this ).css( "display" ), displayMode, "display mode is correct" );
                equal( this.offsetWidth, 20, "width animated to shrink wrap point" );
                equal( this.offsetHeight, 20, "height animated to shrink wrap point" );
        } );
        this.clock.tick( 100 );
 } );
 
-test( "animate percentage(%) on width/height", function() {
+QUnit.test( "animate percentage(%) on width/height", function() {
        expect( 2 );
 
        var $div = jQuery( "<div style='position:absolute;top:-999px;left:-999px;width:60px;height:60px;'><div style='width:50%;height:50%;'></div></div>" )
@@ -390,7 +424,7 @@ test( "animate percentage(%) on width/height", function() {
        this.clock.tick( 20 );
 } );
 
-test( "animate resets overflow-x and overflow-y when finished", function() {
+QUnit.test( "animate resets overflow-x and overflow-y when finished", function() {
        expect( 2 );
        jQuery( "#foo" )
                .css( { display: "block", width: 20, height: 20, overflowX: "visible", overflowY: "auto" } )
@@ -402,7 +436,7 @@ test( "animate resets overflow-x and overflow-y when finished", function() {
 } );
 
 /* // This test ends up being flaky depending upon the CPU load
-test("animate option (queue === false)", function () {
+QUnit.test("animate option (queue === false)", function () {
        expect(1);
        stop();
 
@@ -422,7 +456,7 @@ test("animate option (queue === false)", function () {
 });
 */
 
-test( "animate option { queue: false }", function() {
+QUnit.test( "animate option { queue: false }", function() {
        expect( 2 );
        var foo = jQuery( "#foo" );
 
@@ -440,7 +474,7 @@ test( "animate option { queue: false }", function() {
        equal( foo.queue().length, 0, "Queue is empty" );
 } );
 
-test( "animate option { queue: true }", function() {
+QUnit.test( "animate option { queue: true }", function() {
        expect( 2 );
        var foo = jQuery( "#foo" );
 
@@ -460,7 +494,7 @@ test( "animate option { queue: true }", function() {
        this.clock.tick( 10 );
 } );
 
-test( "animate option { queue: 'name' }", function() {
+QUnit.test( "animate option { queue: 'name' }", function() {
        expect( 5 );
        var foo = jQuery( "#foo" ),
                origWidth = parseFloat( foo.css( "width" ) ),
@@ -492,7 +526,7 @@ test( "animate option { queue: 'name' }", function() {
 
 } );
 
-test( "animate with no properties", function() {
+QUnit.test( "animate with no properties", function() {
        expect( 2 );
 
        var foo,
@@ -514,7 +548,7 @@ test( "animate with no properties", function() {
        this.clock.tick( 100 );
 } );
 
-test( "animate duration 0", function() {
+QUnit.test( "animate duration 0", function() {
        expect( 11 );
 
        var $elem,
@@ -564,7 +598,7 @@ test( "animate duration 0", function() {
        $elem.remove();
 } );
 
-test( "animate hyphenated properties", function() {
+QUnit.test( "animate hyphenated properties", function() {
        expect( 1 );
 
        jQuery( "#foo" )
@@ -578,7 +612,7 @@ test( "animate hyphenated properties", function() {
 
 } );
 
-test( "animate non-element", function() {
+QUnit.test( "animate non-element", function() {
        expect( 1 );
 
        var obj = { test: 0 };
@@ -589,7 +623,7 @@ test( "animate non-element", function() {
        this.clock.tick( 200 );
 } );
 
-test( "stop()", function() {
+QUnit.test( "stop()", function() {
        expect( 4 );
 
        var $one, $two,
@@ -629,7 +663,7 @@ test( "stop()", function() {
        this.clock.tick( 100 );
 } );
 
-test( "stop() - several in queue", function() {
+QUnit.test( "stop() - several in queue", function() {
        expect( 5 );
 
        var nw, $foo = jQuery( "#foo" );
@@ -659,7 +693,7 @@ test( "stop() - several in queue", function() {
        equal( $foo.queue().length, 0, "0 in the queue" );
 } );
 
-test( "stop(clearQueue)", function() {
+QUnit.test( "stop(clearQueue)", function() {
        expect( 4 );
 
        var $foo = jQuery( "#foo" ),
@@ -683,7 +717,7 @@ test( "stop(clearQueue)", function() {
        equal( nw, $foo.css( "width" ), "The animation didn't continue" );
 } );
 
-test( "stop(clearQueue, gotoEnd)", function() {
+QUnit.test( "stop(clearQueue, gotoEnd)", function() {
        expect( 1 );
 
        var $foo = jQuery( "#foo" ),
@@ -712,7 +746,7 @@ test( "stop(clearQueue, gotoEnd)", function() {
        $foo.stop( true );
 } );
 
-test( "stop( queue, ..., ... ) - Stop single queues", function() {
+QUnit.test( "stop( queue, ..., ... ) - Stop single queues", function() {
        expect( 3 );
        var saved,
                foo = jQuery( "#foo" ).css( { width: 200, height: 200 } );
@@ -743,10 +777,10 @@ test( "stop( queue, ..., ... ) - Stop single queues", function() {
                queue: "height"
        } ).dequeue( "height" ).stop( "height", false, false );
        saved = parseFloat( foo.css( "height" ) );
-        this.clock.tick( 500 );
+       this.clock.tick( 500 );
 } );
 
-test( "toggle()", function() {
+QUnit.test( "toggle()", function() {
        expect( 6 );
        var x = jQuery( "#foo" );
        ok( x.is( ":visible" ), "is visible" );
@@ -763,7 +797,7 @@ test( "toggle()", function() {
        ok( x.is( ":visible" ), "is visible again" );
 } );
 
-test( "jQuery.fx.prototype.cur() - <1.8 Back Compat", 7, function() {
+QUnit.test( "jQuery.fx.prototype.cur() - <1.8 Back Compat", 7, function() {
        var div = jQuery( "<div></div>" ).appendTo( "#qunit-fixture" ).css( {
                        color: "#ABC",
                        border: "5px solid black",
@@ -817,7 +851,7 @@ test( "jQuery.fx.prototype.cur() - <1.8 Back Compat", 7, function() {
        jQuery( div ).remove();
 } );
 
-test( "Overflow and Display", function() {
+QUnit.test( "Overflow and Display", function() {
        expect( 4 );
 
        var
@@ -896,7 +930,7 @@ jQuery.each( {
                        return 0;
                }
        }, function( tn, t ) {
-               test( fn + " to " + tn, function() {
+               QUnit.test( fn + " to " + tn, function() {
                        var num, anim,
                                elem = jQuery.makeTest( fn + " to " + tn ),
                                t_w = t( elem, "width" ),
@@ -1013,12 +1047,12 @@ jQuery.each( {
        } );
 } );
 
-test( "Effects chaining", function() {
+QUnit.test( "Effects chaining", function() {
        var remaining = 16,
                props = [ "opacity", "height", "width", "display", "overflow" ],
                setup = function( name, selector ) {
                        var $el = jQuery( selector );
-                       return $el.data( getProps( $el[ 0 ] ) ).data( "name", name );
+                       return $el.data( getProps( $el[0] ) ).data( "name", name );
                },
                assert = function() {
                        var data = jQuery.data( this ),
@@ -1041,39 +1075,39 @@ test( "Effects chaining", function() {
 
        setup( ".fadeOut().fadeIn()", "#fadein div" ).fadeOut( "fast" ).fadeIn( "fast", assert );
        setup( ".fadeIn().fadeOut()", "#fadeout div" ).fadeIn( "fast" ).fadeOut( "fast", assert );
-       setup( ".hide().show()", "#show div" ).hide( "fast" ).show( "fast", assert );
-       setup( ".show().hide()", "#hide div" ).show( "fast" ).hide( "fast", assert );
-       setup( ".show().hide(easing)", "#easehide div" ).show( "fast" ).hide( "fast", "linear", assert );
-       setup( ".toggle().toggle() - in", "#togglein div" ).toggle( "fast" ).toggle( "fast", assert );
-       setup( ".toggle().toggle() - out", "#toggleout div" ).toggle( "fast" ).toggle( "fast", assert );
-       setup( ".toggle().toggle(easing) - out", "#easetoggleout div" ).toggle( "fast" ).toggle( "fast", "linear", assert );
-       setup( ".slideDown().slideUp()", "#slidedown div" ).slideDown( "fast" ).slideUp( "fast", assert );
-       setup( ".slideUp().slideDown()", "#slideup div" ).slideUp( "fast" ).slideDown( "fast", assert );
-       setup( ".slideUp().slideDown(easing)", "#easeslideup div" ).slideUp( "fast" ).slideDown( "fast", "linear", assert );
-       setup( ".slideToggle().slideToggle() - in", "#slidetogglein div" ).slideToggle( "fast" ).slideToggle( "fast", assert );
-       setup( ".slideToggle().slideToggle() - out", "#slidetoggleout div" ).slideToggle( "fast" ).slideToggle( "fast", assert );
+       setup( ".hide().show()", "#show div" ).hide("fast").show( "fast", assert );
+       setup( ".show().hide()", "#hide div" ).show("fast").hide( "fast", assert );
+       setup( ".show().hide(easing)", "#easehide div" ).show("fast").hide( "fast", "linear", assert );
+       setup( ".toggle().toggle() - in", "#togglein div" ).toggle("fast").toggle( "fast", assert );
+       setup( ".toggle().toggle() - out", "#toggleout div" ).toggle("fast").toggle( "fast", assert );
+       setup( ".toggle().toggle(easing) - out", "#easetoggleout div" ).toggle("fast").toggle( "fast", "linear", assert );
+       setup( ".slideDown().slideUp()", "#slidedown div" ).slideDown("fast").slideUp( "fast", assert );
+       setup( ".slideUp().slideDown()", "#slideup div" ).slideUp("fast").slideDown( "fast", assert );
+       setup( ".slideUp().slideDown(easing)", "#easeslideup div" ).slideUp("fast").slideDown( "fast", "linear", assert );
+       setup( ".slideToggle().slideToggle() - in", "#slidetogglein div" ).slideToggle("fast").slideToggle( "fast", assert );
+       setup( ".slideToggle().slideToggle() - out", "#slidetoggleout div" ).slideToggle("fast").slideToggle( "fast", assert );
        setup( ".fadeToggle().fadeToggle() - in", "#fadetogglein div" ).fadeToggle( "fast" ).fadeToggle( "fast", assert );
        setup( ".fadeToggle().fadeToggle() - out", "#fadetoggleout div" ).fadeToggle( "fast" ).fadeToggle( "fast", assert );
        setup( ".fadeTo(0.5).fadeTo(1.0, easing)", "#fadeto div" ).fadeTo( "fast", 0.5 ).fadeTo( "fast", 1.0, "linear", assert );
-        this.clock.tick( 400 );
+       this.clock.tick( 400 );
 } );
 
 jQuery.makeTest = function( text ) {
-        var elem = jQuery( "<div></div>" )
-                .attr( "id", "test" + jQuery.makeTest.id++ )
-                .addClass( "box" );
+       var elem = jQuery( "<div></div>" )
+               .attr( "id", "test" + jQuery.makeTest.id++ )
+               .addClass( "box" );
 
-        jQuery( "<h4></h4>" )
-                .text( text )
-                .appendTo( "#fx-tests" )
-                .after( elem );
+       jQuery( "<h4></h4>" )
+               .text( text )
+               .appendTo( "#fx-tests" )
+               .after( elem );
 
-        return elem;
+       return elem;
 };
 
 jQuery.makeTest.id = 1;
 
-test( "jQuery.show('fast') doesn't clear radio buttons (bug #1095)", function() {
+QUnit.test( "jQuery.show('fast') doesn't clear radio buttons (bug #1095)", function() {
        expect( 4 );
 
        var $checkedtest = jQuery( "#checkedtest" );
@@ -1086,7 +1120,7 @@ test( "jQuery.show('fast') doesn't clear radio buttons (bug #1095)", function()
        this.clock.tick( 200 );
 } );
 
-test( "interrupt toggle", function() {
+QUnit.test( "interrupt toggle", function() {
        expect( 24 );
 
        var env = this,
@@ -1148,7 +1182,7 @@ test( "interrupt toggle", function() {
        // FIXME untangle the set timeouts
 } );
 
-test( "animate with per-property easing", function() {
+QUnit.test( "animate with per-property easing", function() {
 
        expect( 5 );
 
@@ -1188,7 +1222,7 @@ test( "animate with per-property easing", function() {
        this.clock.tick( 400 );
 } );
 
-test( "animate with CSS shorthand properties", function() {
+QUnit.test( "animate with CSS shorthand properties", function() {
        expect( 11 );
 
        var easeAnimation_count = 0,
@@ -1234,7 +1268,7 @@ test( "animate with CSS shorthand properties", function() {
                this.clock.tick( 400 );
 } );
 
-test( "hide hidden elements, with animation (bug #7141)", function() {
+QUnit.test( "hide hidden elements, with animation (bug #7141)", function() {
        expect( 3 );
 
        var div = jQuery( "<div style='display:none'></div>" ).appendTo( "#qunit-fixture" );
@@ -1248,7 +1282,7 @@ test( "hide hidden elements, with animation (bug #7141)", function() {
        this.clock.tick( 10 );
 } );
 
-test( "animate unit-less properties (#4966)", 2, function() {
+QUnit.test( "animate unit-less properties (#4966)", 2, function() {
        var div = jQuery( "<div style='z-index: 0; position: absolute;'></div>" ).appendTo( "#qunit-fixture" );
        equal( div.css( "z-index" ), "0", "z-index is 0" );
        div.animate( { zIndex: 2 }, function() {
@@ -1257,7 +1291,7 @@ test( "animate unit-less properties (#4966)", 2, function() {
        this.clock.tick( 400 );
 } );
 
-test( "animate properties missing px w/ opacity as last (#9074)", 2, function() {
+QUnit.test( "animate properties missing px w/ opacity as last (#9074)", 2, function() {
        expect( 6 );
        var ml, l,
                div = jQuery( "<div style='position: absolute; margin-left: 0; left: 0px;'></div>" )
@@ -1284,7 +1318,7 @@ test( "animate properties missing px w/ opacity as last (#9074)", 2, function()
        div.stop().remove();
 } );
 
-test( "callbacks should fire in correct order (#9100)", function() {
+QUnit.test( "callbacks should fire in correct order (#9100)", function() {
        expect( 1 );
 
        var a = 1,
@@ -1304,7 +1338,7 @@ test( "callbacks should fire in correct order (#9100)", function() {
        this.clock.tick( 20 );
 } );
 
-test( "callbacks that throw exceptions will be removed (#5684)", function() {
+QUnit.test( "callbacks that throw exceptions will be removed (#5684)", function() {
        expect( 2 );
 
        var foo = jQuery( "#foo" );
@@ -1332,7 +1366,7 @@ test( "callbacks that throw exceptions will be removed (#5684)", function() {
 
 } );
 
-test( "animate will scale margin properties individually", function() {
+QUnit.test( "animate will scale margin properties individually", function() {
        expect( 2 );
 
        var foo = jQuery( "#foo" ).css( {
@@ -1357,7 +1391,7 @@ test( "animate will scale margin properties individually", function() {
        } );
 } );
 
-test( "Do not append px to 'fill-opacity' #9548", 1, function() {
+QUnit.test( "Do not append px to 'fill-opacity' #9548", 1, function() {
        var $div = jQuery( "<div>" ).appendTo( "#qunit-fixture" );
 
        $div.css( "fill-opacity", 0 ).animate( { "fill-opacity": 1.0 }, 0, function() {
@@ -1372,7 +1406,7 @@ test( "Do not append px to 'fill-opacity' #9548", 1, function() {
        } );
 } );
 
-test( "line-height animates correctly (#13855)", 12, function() {
+QUnit.test( "line-height animates correctly (#13855)", 12, function() {
        var t0,
                clock = this.clock,
                longDuration = 2000,
@@ -1434,7 +1468,7 @@ clock.tick( 50 );
 } );
 
 // Start 1.8 Animation tests
-test( "jQuery.Animation( object, props, opts )", 4, function() {
+QUnit.test( "jQuery.Animation( object, props, opts )", 4, function() {
        var animation,
                testObject = {
                        "foo": 0,
@@ -1459,7 +1493,7 @@ test( "jQuery.Animation( object, props, opts )", 4, function() {
        this.clock.tick( 10 );
 } );
 
-test( "Animate Option: step: function( percent, tween )", 1, function() {
+QUnit.test( "Animate Option: step: function( percent, tween )", 1, function() {
        var counter = {};
        jQuery( "#foo" ).animate( {
                prop1: 1,
@@ -1485,7 +1519,7 @@ test( "Animate Option: step: function( percent, tween )", 1, function() {
        this.clock.tick( 10 );
 } );
 
-test( "Animate callbacks have correct context", 2, function() {
+QUnit.test( "Animate callbacks have correct context", 2, function() {
        var foo = jQuery( "#foo" );
        foo.animate( {
                height: 10
@@ -1500,7 +1534,7 @@ test( "Animate callbacks have correct context", 2, function() {
        this.clock.tick( 10 );
 } );
 
-test( "User supplied callback called after show when fx off (#8892)", 2, function() {
+QUnit.test( "User supplied callback called after show when fx off (#8892)", 2, function() {
        var foo = jQuery( "#foo" );
        jQuery.fx.off = true;
        foo.hide();
@@ -1514,7 +1548,7 @@ test( "User supplied callback called after show when fx off (#8892)", 2, functio
        this.clock.tick( 1000 );
 } );
 
-test( "animate should set display for disconnected nodes", function() {
+QUnit.test( "animate should set display for disconnected nodes", function() {
        expect( 18 );
 
        var env = this,
@@ -1563,10 +1597,10 @@ test( "animate should set display for disconnected nodes", function() {
                        jQuery.fn[ name ].apply( this, opt.concat( callback ) );
                } );
        } );
-        clock.tick( 400 );
+       clock.tick( 400 );
 } );
 
-test( "Animation callback should not show animated element as :animated (#7157)", 1, function() {
+QUnit.test( "Animation callback should not show animated element as :animated (#7157)", 1, function() {
        var foo = jQuery( "#foo" );
 
        foo.animate( {
@@ -1577,7 +1611,7 @@ test( "Animation callback should not show animated element as :animated (#7157)"
        this.clock.tick( 100 );
 } );
 
-test( "Initial step callback should show element as :animated (#14623)", 1, function() {
+QUnit.test( "Initial step callback should show element as :animated (#14623)", 1, function() {
        var foo = jQuery( "#foo" );
 
        foo.animate( {
@@ -1592,7 +1626,7 @@ test( "Initial step callback should show element as :animated (#14623)", 1, func
        foo.stop();
 } );
 
-test( "hide called on element within hidden parent should set display to none (#10045)", 3, function() {
+QUnit.test( "hide called on element within hidden parent should set display to none (#10045)", 3, function() {
        var hidden = jQuery( ".hidden" ),
                elems = jQuery( "<div>hide</div><div>hide0</div><div>hide1</div>" );
 
@@ -1612,7 +1646,7 @@ test( "hide called on element within hidden parent should set display to none (#
        this.clock.tick( 10 );
 } );
 
-test( "hide, fadeOut and slideUp called on element width height and width = 0 should set display to none", 5, function() {
+QUnit.test( "hide, fadeOut and slideUp called on element width height and width = 0 should set display to none", 5, function() {
        var foo = jQuery( "#foo" ),
                i = 0,
                elems = jQuery();
@@ -1641,7 +1675,7 @@ test( "hide, fadeOut and slideUp called on element width height and width = 0 sh
        this.clock.tick( 400 );
 } );
 
-test( "hide should not leave hidden inline elements visible (#14848)", 2, function() {
+QUnit.test( "hide should not leave hidden inline elements visible (#14848)", 2, function() {
        var el = jQuery( "#simon1" );
 
        el.hide( 1, function() {
@@ -1654,7 +1688,7 @@ test( "hide should not leave hidden inline elements visible (#14848)", 2, functi
        this.clock.tick( 100 );
 } );
 
-test( "Handle queue:false promises", 10, function() {
+QUnit.test( "Handle queue:false promises", 10, function() {
        var foo = jQuery( "#foo" ).clone().addBack(),
                step = 1;
 
@@ -1705,7 +1739,7 @@ test( "Handle queue:false promises", 10, function() {
        this.clock.tick( 10 );
 } );
 
-test( "multiple unqueued and promise", 4, function() {
+QUnit.test( "multiple unqueued and promise", 4, function() {
        var foo = jQuery( "#foo" ),
                step = 1;
        foo.animate( {
@@ -1738,7 +1772,7 @@ test( "multiple unqueued and promise", 4, function() {
        this.clock.tick( 1000 );
 } );
 
-test( "animate does not change start value for non-px animation (#7109)", 1, function() {
+QUnit.test( "animate does not change start value for non-px animation (#7109)", 1, function() {
        var parent = jQuery( "<div><div></div></div>" ).css( { width: 284, height: 1 } ).appendTo( "#qunit-fixture" ),
                child = parent.children().css( { fontSize: "98.6in", width: "0.01em", height: 1 } ),
                actual = parseFloat( child.css( "width" ) ),
@@ -1758,7 +1792,7 @@ test( "animate does not change start value for non-px animation (#7109)", 1, fun
        this.clock.tick( 10 );
 } );
 
-test( "non-px animation handles non-numeric start (#11971)", 2, function() {
+QUnit.test( "non-px animation handles non-numeric start (#11971)", 2, function() {
        var foo = jQuery( "#foo" ),
                initial = foo.css( "backgroundPositionX" );
 
@@ -1875,7 +1909,7 @@ QUnit.test( "Animation callbacks (#11797)", function( assert ) {
        this.clock.tick( 10 );
 } );
 
-test( "Animate properly sets overflow hidden when animating width/height (#12117)", 8, function() {
+QUnit.test( "Animate properly sets overflow hidden when animating width/height (#12117)", 8, function() {
        jQuery.each( [ "height", "width" ], function( _, prop ) {
                jQuery.each( [ 100, 0 ], function( _, value ) {
                        var div = jQuery( "<div>" ).css( "overflow", "auto" ),
@@ -1891,7 +1925,7 @@ test( "Animate properly sets overflow hidden when animating width/height (#12117
        } );
 } );
 
-test( "Each tick of the timer loop uses a fresh time (#12837)", function() {
+QUnit.test( "Each tick of the timer loop uses a fresh time (#12837)", function() {
        var lastVal,
                tmp = jQuery( {
                        test: 0
@@ -1916,7 +1950,7 @@ test( "Each tick of the timer loop uses a fresh time (#12837)", function() {
        tmp.stop();
 } );
 
-test( "Animations with 0 duration don't ease (#12273)", 1, function() {
+QUnit.test( "Animations with 0 duration don't ease (#12273)", 1, function() {
        jQuery.easing.test = function() {
                ok( false, "Called easing" );
        };
@@ -1939,7 +1973,7 @@ jQuery.map( [ "toggle", "slideToggle", "fadeToggle" ], function( method ) {
        // this test would look a lot better if we were using something to override
        // the default timers
        var duration = 1500;
-       test( "toggle state tests: " + method + " (#8685)", function() {
+       QUnit.test( "toggle state tests: " + method + " (#8685)", function() {
                function secondToggle() {
                        var stopped = parseFloat( element.css( check ) );
                        tested = false;
@@ -1983,7 +2017,7 @@ jQuery.map( [ "toggle", "slideToggle", "fadeToggle" ], function( method ) {
        } );
 } );
 
-test( "jQuery.fx.start & jQuery.fx.stop hook points", function() {
+QUnit.test( "jQuery.fx.start & jQuery.fx.stop hook points", function() {
        var oldStart = jQuery.fx.start,
                oldStop = jQuery.fx.stop,
                foo = jQuery( { foo: 0 } );
@@ -2012,7 +2046,7 @@ test( "jQuery.fx.start & jQuery.fx.stop hook points", function() {
        jQuery.fx.stop = oldStop;
 } );
 
-test( ".finish() completes all queued animations", function() {
+QUnit.test( ".finish() completes all queued animations", function() {
        var animations = {
                        top: 100,
                        left: 100,
@@ -2047,7 +2081,7 @@ test( ".finish() completes all queued animations", function() {
        jQuery.fx.tick();
 } );
 
-test( ".finish( false ) - unqueued animations", function() {
+QUnit.test( ".finish( false ) - unqueued animations", function() {
        var animations = {
                        top: 100,
                        left: 100,
@@ -2082,7 +2116,7 @@ test( ".finish( false ) - unqueued animations", function() {
        jQuery.fx.tick();
 } );
 
-test( ".finish( \"custom\" ) - custom queue animations", function() {
+QUnit.test( ".finish( \"custom\" ) - custom queue animations", function() {
        var animations = {
                        top: 100,
                        left: 100,
@@ -2121,7 +2155,7 @@ test( ".finish( \"custom\" ) - custom queue animations", function() {
        jQuery.fx.tick();
 } );
 
-test( ".finish() calls finish of custom queue functions", function() {
+QUnit.test( ".finish() calls finish of custom queue functions", function() {
        function queueTester( next, hooks ) {
                hooks.stop = function( gotoEnd ) {
                        inside++;
@@ -2147,7 +2181,7 @@ test( ".finish() calls finish of custom queue functions", function() {
        div.remove();
 } );
 
-test( ".finish() is applied correctly when multiple elements were animated (#13937)", function() {
+QUnit.test( ".finish() is applied correctly when multiple elements were animated (#13937)", function() {
        expect( 3 );
 
        var elems = jQuery( "<a>0</a><a>1</a><a>2</a>" );
@@ -2164,38 +2198,38 @@ test( ".finish() is applied correctly when multiple elements were animated (#139
        this.clock.tick( 1500 );
 } );
 
-test( "slideDown() after stop() (#13483)", 2, function() {
-               var ul = jQuery( "<ul style='height: 100px; display: block;'></ul>" )
-                               .appendTo( "#qunit-fixture" ),
-                       origHeight = ul.height(),
-                       clock = this.clock;
+QUnit.test( "slideDown() after stop() (#13483)", 2, function() {
+       var ul = jQuery( "<ul style='height: 100px; display: block;'></ul>" )
+                       .appendTo( "#qunit-fixture" ),
+               origHeight = ul.height(),
+               clock = this.clock;
+
+       // First test. slideUp() -> stop() in the middle -> slideDown() until the end
+       ul.slideUp( 1000 );
+       clock.tick( 500 );
+       ul.stop( true );
+       ul.slideDown( 1, function() {
+               equal( ul.height(), origHeight, "slideDown() after interrupting slideUp() with stop(). Height must be in original value" );
 
-        // First test. slideUp() -> stop() in the middle -> slideDown() until the end
-               ul.slideUp( 1000 );
+               // Second test. slideDown() -> stop() in the middle -> slideDown() until the end
+               ul.slideUp( 1 );
+               clock.tick( 10 );
+               ul.slideDown( 1000 );
                clock.tick( 500 );
                ul.stop( true );
-               ul.slideDown( 1, function() {
-                               equal( ul.height(), origHeight, "slideDown() after interrupting slideUp() with stop(). Height must be in original value" );
-
-                               // Second test. slideDown() -> stop() in the middle -> slideDown() until the end
-                               ul.slideUp( 1 );
-                               clock.tick( 10 );
-                               ul.slideDown( 1000 );
-                               clock.tick( 500 );
-                               ul.stop( true );
-                               ul.slideDown( 1 );
-                               equal( ul.height(), origHeight, "slideDown() after interrupting slideDown() with stop(). Height must be in original value" );
-
-                               // Cleanup
-                               ul.remove();
-                               clock.tick( 10 );
-
-               } );
+               ul.slideDown( 1 );
+               equal( ul.height(), origHeight, "slideDown() after interrupting slideDown() with stop(). Height must be in original value" );
 
+               // Cleanup
+               ul.remove();
                clock.tick( 10 );
+
+       } );
+
+       clock.tick( 10 );
 } );
 
-test( "Respect display value on inline elements (#14824)", 2, function() {
+QUnit.test( "Respect display value on inline elements (#14824)", 2, function() {
        var clock = this.clock,
                fromStyleSheet = jQuery( "<span id='span-14824' />" ),
                fromStyleAttr = jQuery( "<span style='display: block;' />" );
index ab768439ff2833bf3c7dc3d05732188b7318902d..525a72d13938a4e78968f3a32898c23aeb68dbb8 100644 (file)
@@ -1422,7 +1422,7 @@ QUnit.test( "Submit event can be stopped (#11049)", function( assert ) {
        form.remove();
 } );
 
-// Test beforeunload event only if it supported.
+// Test beforeunload event only if it supported (i.e. not Opera)
 // Support: iOS 7+, Android<4.0
 // iOS & old Android have the window.onbeforeunload field but don't support the beforeunload
 // handler making it impossible to feature-detect the support.
@@ -1430,6 +1430,7 @@ if ( window.onbeforeunload === null &&
        !/(ipad|iphone|ipod|android 2\.3)/i.test( navigator.userAgent ) ) {
        QUnit.asyncTest( "on(beforeunload)", 4, function( assert ) {
                var win,
+                       forIE6 = 0,
                        fired = false,
                        iframe = jQuery( "<iframe src='data/iframe.html' />" );
 
@@ -1443,7 +1444,34 @@ if ( window.onbeforeunload === null &&
 
                        assert.strictEqual( win.onbeforeunload, null, "onbeforeunload property on window object still equals null" );
 
+                       // In old Safari beforeunload event will not fire on iframes
+                       jQuery( win ).on( "unload", function() {
+                               if ( !fired ) {
+                                       ok( true, "This is suppose to be true only in old Safari" );
+                                       checker();
+                               }
+                       } );
+
+                       jQuery( win ).on( "beforeunload", function() {
+
+                               // On iframe in IE6 beforeunload event will not
+                               // fire if event is binded through window object,
+                               // nevertheless, test should continue
+                               window.setTimeout( function() {
+                                       if ( !forIE6 ) {
+                                               checker();
+                                       }
+                               } );
+                       } );
+
                        win.onbeforeunload = function() {
+                               if ( !forIE6 ) {
+                                       forIE6++;
+                                       checker();
+                               }
+                       };
+
+                       function checker() {
                                assert.ok( true, "window.onbeforeunload handler is called" );
                                iframe = jQuery( "<iframe src='data/iframe.html' />" );
 
@@ -1466,7 +1494,7 @@ if ( window.onbeforeunload === null &&
 
                                        win.location.reload();
                                } );
-                       };
+                       }
 
                        win.location.reload();
                } );
@@ -2728,10 +2756,10 @@ QUnit.test( "Inline event result is returned (#13993)", function( assert ) {
 
 QUnit.test( ".off() removes the expando when there's no more data", function( assert ) {
 
-       // Support: IE 8 only
-       // IE 8 gets the expando removed via removeAttribute so the second assertion
+       // Support: IE 6-8
+       // IE 6-8 gets the expando removed via removeAttribute so the second assertion
        // won't be reached.
-       assert.expect( document.documentMode < 9 ? 1 : 2 );
+       assert.expect( /msie [876]\.0/i.test( navigator.userAgent ) ? 1 : 2 );
 
        var key,
                div = jQuery( "<div/>" ).appendTo( "#qunit-fixture" );
@@ -2853,9 +2881,11 @@ QUnit.test( "originalEvent property for IE8", function( assert ) {
 QUnit.test( "originalEvent property for Chrome, Safari, Fx & Edge of simulated event", function( assert ) {
        var userAgent = window.navigator.userAgent;
 
-       if ( !( /firefox/i.test( userAgent ) || /safari/i.test( userAgent ) ) ) {
+       if ( !(/chrome/i.test( userAgent ) ||
+               /firefox/i.test( userAgent ) ||
+               /safari/i.test( userAgent ) ) ) {
                assert.expect( 1 );
-               assert.ok( true, "Assertions should run only in Chrome, Safari, Fx & Edge" );
+               assert.ok( true, "Assertions should run only in Chrome, Safari and FF" );
                return;
        }
 
@@ -2919,8 +2949,7 @@ if ( !( /firefox/i.test( window.navigator.userAgent ) ) ) {
                        $text = jQuery( "#text1" ),
                        $radio = jQuery( "#radio1" ).trigger( "focus" );
 
-               // Support: IE<11
-               // IE8-10 fire focus/blur events asynchronously; this is the resulting mess.
+               // IE6-10 fire focus/blur events asynchronously; this is the resulting mess.
                // IE's browser window must be topmost for this to work properly!!
                QUnit.stop();
                $radio[ 0 ].focus();
index 76b40997c4ac9198c6de888d3e1cfe91c66f14b6..ead4e0755da2381ae49559edf9b573defaff982f 100644 (file)
@@ -529,10 +529,10 @@ QUnit.test( "html(String) with HTML5 (Bug #6485)", function( assert ) {
 
 QUnit.test( "html(String) tag-hyphenated elements (Bug #1987)", function( assert ) {
 
-       // Support: IE8
-       if ( /msie 8\.0/i.test( navigator.userAgent ) ) {
+       // Support: IE6-IE8
+       if ( /msie [876]\.0/i.test( navigator.userAgent ) ) {
                assert.expect( 1 );
-               assert.ok( true, "IE8 doesn't support custom elements" );
+               assert.ok( true, "IE6-8 doesn't support custom elements" );
                return;
        }
 
@@ -2348,22 +2348,22 @@ QUnit.test( "Ensure oldIE creates a new set on appendTo (#8894)", function( asse
        assert.strictEqual( jQuery( "<p/>" ).appendTo( "<div/>" ).end().length, jQuery( "<p>test</p>" ).appendTo( "<div/>" ).end().length, "Elements created with createElement and with createDocumentFragment should be treated alike" );
 } );
 
-test( "html() - script exceptions bubble (#11743)", function() {
+QUnit.test( "html() - script exceptions bubble (#11743)", function( assert ) {
 
-       expect( 2 );
+       assert.expect( 2 );
 
-       throws( function() {
+       assert.throws( function() {
                jQuery( "#qunit-fixture" ).html( "<script>undefined(); ok( false, 'Exception not thrown' );</script>" );
-               ok( false, "Exception ignored" );
+               assert.ok( false, "Exception ignored" );
        }, "Exception bubbled from inline script" );
 
        if ( jQuery.ajax ) {
-               throws( function() {
+               assert.throws( function() {
                        jQuery( "#qunit-fixture" ).html( "<script src='data/badcall.js'></script>" );
-                       ok( false, "Exception ignored" );
+                       assert.ok( false, "Exception ignored" );
                }, "Exception thrown in remote script" );
        } else {
-               ok( true, "No jQuery.ajax" );
+               assert.ok( true, "No jQuery.ajax" );
        }
 } );
 
index 7a8624a923d61bf38a19bb65c85186b99c547592..0a311be306fbfbe4290b7335f22a8002ef91e51e 100644 (file)
@@ -181,16 +181,18 @@ testIframe( "offset/absolute", "absolute", function( $, window, document, assert
 } );
 
 testIframe( "offset/relative", "relative", function( $, window, document, assert ) {
-       assert.expect( 64 );
+       assert.expect( 60 );
 
-       var tests;
+       var ie, tests;
+
+       // IE is collapsing the top margin of 1px; detect and adjust accordingly
+       ie = $("#relative-1").offset().top === 6;
 
        // get offset
        tests = [
-               { "id": "#relative-1",   "top":   7, "left":  7 },
-               { "id": "#relative-1-1", "top":  15, "left": 15 },
-               { "id": "#relative-2",   "top": 142, "left": 27 },
-               { "id": "#relative-2-1",   "top": 149, "left": 52 }
+               { "id": "#relative-1",   "top": ie ?   6 :   7, "left":  7 },
+               { "id": "#relative-1-1", "top": ie ?  13 :  15, "left": 15 },
+               { "id": "#relative-2",   "top": ie ? 141 : 142, "left": 27 }
        ];
        jQuery.each( tests, function() {
                assert.equal( $( this[ "id" ] ).offset().top,  this[ "top" ],  "jQuery('" + this[ "id" ] + "').offset().top" );
@@ -199,10 +201,9 @@ testIframe( "offset/relative", "relative", function( $, window, document, assert
 
        // get position
        tests = [
-               { "id": "#relative-1",   "top":   6, "left":  6 },
-               { "id": "#relative-1-1", "top":   5, "left":  5 },
-               { "id": "#relative-2",   "top": 141, "left": 26 },
-               { "id": "#relative-2-1",   "top": 5, "left": 5 }
+               { "id": "#relative-1",   "top": ie ?   5 :   6, "left":  6 },
+               { "id": "#relative-1-1", "top": ie ?   4 :   5, "left":  5 },
+               { "id": "#relative-2",   "top": ie ? 140 : 141, "left": 26 }
        ];
        jQuery.each( tests, function() {
                assert.equal( $( this[ "id" ] ).position().top,  this[ "top" ],  "jQuery('" + this[ "id" ] + "').position().top" );
@@ -243,14 +244,17 @@ testIframe( "offset/relative", "relative", function( $, window, document, assert
 testIframe( "offset/static", "static", function( $, window, document, assert ) {
        assert.expect( 80 );
 
-       var tests;
+       var ie, tests;
+
+       // IE is collapsing the top margin of 1px; detect and adjust accordingly
+       ie = $("#static-1").offset().top === 6;
 
        // get offset
        tests = [
-               { "id": "#static-1",     "top":  7, "left":  7 },
-               { "id": "#static-1-1",   "top": 15, "left": 15 },
-               { "id": "#static-1-1-1", "top": 23, "left": 23 },
-               { "id": "#static-2", "top": 122, left: 7 }
+               { "id": "#static-1",     "top": ie ?   6 :   7, "left":  7 },
+               { "id": "#static-1-1",   "top": ie ?  13 :  15, "left": 15 },
+               { "id": "#static-1-1-1", "top": ie ?  20 :  23, "left": 23 },
+               { "id": "#static-2", "top": ie ? 121 : 122, left: 7 }
        ];
        jQuery.each( tests, function() {
                assert.equal( $( this[ "id" ] ).offset().top,  this[ "top" ],  "jQuery('" + this[ "id" ] + "').offset().top" );
@@ -259,10 +263,10 @@ testIframe( "offset/static", "static", function( $, window, document, assert ) {
 
        // get position
        tests = [
-               { "id": "#static-1",     "top":  6, "left":  6 },
-               { "id": "#static-1-1",   "top": 14, "left": 14 },
-               { "id": "#static-1-1-1", "top": 22, "left": 22 },
-               { "id": "#static-2", "top": 121, "left": 6 }
+               { "id": "#static-1",     "top": ie ?   5 :   6, "left":  6 },
+               { "id": "#static-1-1",   "top": ie ?  12 :  14, "left": 14 },
+               { "id": "#static-1-1-1", "top": ie ?  19 :  22, "left": 22 },
+               { "id": "#static-2", "top": ie ? 120 : 121, "left": 6 }
        ];
        jQuery.each( tests, function() {
                assert.equal( $( this[ "id" ] ).position().top,  this[ "top" ],  "jQuery('" + this[ "top" ]  + "').position().top" );
@@ -307,22 +311,25 @@ testIframe( "offset/static", "static", function( $, window, document, assert ) {
 testIframe( "offset/fixed", "fixed", function( $, window, document, assert ) {
        assert.expect( 34 );
 
-       var tests, $noTopLeft;
+       var ie, tests, $noTopLeft;
+
+       // IE is collapsing the top margin of 1px; detect and adjust accordingly
+       ie = $("#fixed-1").position().top === 2;
 
        tests = [
                {
                        "id": "#fixed-1",
                        "offsetTop": 1001,
                        "offsetLeft": 1001,
-                       "positionTop": 0,
-                       "positionLeft": 0
+                       "positionTop": ie ? 2 : 0,
+                       "positionLeft": ie ? 2 : 0
                },
                {
                        "id": "#fixed-2",
                        "offsetTop": 1021,
                        "offsetLeft": 1021,
-                       "positionTop": 20,
-                       "positionLeft": 20
+                       "positionTop": ie ? 22 : 20,
+                       "positionLeft": ie ? 22 : 20
                }
        ];
 
@@ -408,7 +415,7 @@ testIframe( "offset/scroll", "scroll", function( $, win, doc, assert ) {
        assert.expect( 28 );
 
        // If we're going to bastardize the tests, let's just DO it
-       var ie = /msie 8/i.test( navigator.userAgent );
+       var ie = /msie [678]/i.test( navigator.userAgent );
 
        if ( ie ) {
                assert.ok( true, "TestSwarm's iframe has hosed this test in oldIE, we surrender" );
@@ -476,12 +483,20 @@ testIframe( "offset/scroll", "scroll", function( $, win, doc, assert ) {
        // Tests position after parent scrolling (#15239)
        $( "#scroll-1" ).scrollTop( 0 );
        $( "#scroll-1" ).scrollLeft( 0 );
-       assert.equal( $( "#scroll-1-1" ).position().top, 6, "jQuery('#scroll-1-1').position().top unaffected by parent scrolling" );
+       if ( ie ) {
+               assert.ok( true, "TestSwarm's iframe has hosed this test in oldIE, we surrender" );
+       } else {
+               assert.equal( $( "#scroll-1-1" ).position().top, 6, "jQuery('#scroll-1-1').position().top unaffected by parent scrolling" );
+       }
        assert.equal( $( "#scroll-1-1" ).position().left, 6, "jQuery('#scroll-1-1').position().left unaffected by parent scrolling" );
 
        $( "#scroll-1" ).scrollTop( 5 );
        $( "#scroll-1" ).scrollLeft( 5 );
-       assert.equal( $( "#scroll-1-1" ).position().top, 6, "jQuery('#scroll-1-1').position().top unaffected by parent scrolling" );
+       if ( ie ) {
+               assert.ok( true, "TestSwarm's iframe has hosed this test in oldIE, we surrender" );
+       } else {
+               assert.equal( $( "#scroll-1-1" ).position().top, 6, "jQuery('#scroll-1-1').position().top unaffected by parent scrolling" );
+       }
        assert.equal( $( "#scroll-1-1" ).position().left, 6, "jQuery('#scroll-1-1').position().left unaffected by parent scrolling" );
 } );
 
@@ -571,14 +586,16 @@ QUnit.test( "fractions (see #7730 and #7885)", function( assert ) {
 QUnit.test( "iframe scrollTop/Left (see gh-1945)", function( assert ) {
        assert.expect( 2 );
 
-       var ifDoc = jQuery( "#iframe" )[ 0 ].contentDocument;
+       var ifDoc = jQuery( "#iframe" )[ 0 ];
+
+       ifDoc = ifDoc.contentDocument || ifDoc.contentWindow.document;
 
        // Mobile Safari and Android 2.3 resize the iframe by its content
        // meaning it's not possible to scroll the iframe only its parent element.
        // It seems (not confirmed) in android 4.0 it's not possible to scroll iframes from the code.
        if ( /iphone os/i.test( navigator.userAgent ) ||
-           /android 2\.3/i.test( navigator.userAgent ) ||
-           /android 4\.0/i.test( navigator.userAgent ) ) {
+               /android 2\.3/i.test( navigator.userAgent ) ||
+               /android 4\.0/i.test( navigator.userAgent ) ) {
                assert.equal( true, true, "Can't scroll iframes in this environment" );
                assert.equal( true, true, "Can't scroll iframes in this environment" );
 
@@ -587,11 +604,11 @@ QUnit.test( "iframe scrollTop/Left (see gh-1945)", function( assert ) {
                // Tests scrollTop/Left with iframes
                jQuery( "#iframe" ).css( "width", "50px" ).css( "height", "50px" );
 
-               // Support: IE8
+               // Support: IE6-8
                // Need a doctype, otherwise IE will scroll it but will still show old values
-               ifDoc.write( "<!DOCTYPE><div style='width: 1000px; height: 1000px;'></div>" );
+               ifDoc.write( "<!DOCTYPE html><div style='width: 1000px; height: 1000px;'></div>" );
 
-               // Support: IE8
+               // Support: IE6-8
                ifDoc.close();
 
                jQuery( ifDoc ).scrollTop( 200 );
index ed0d508ca1f843ff043c3df5e269b4426b11b310..b330d422671eaf5976e4b9b829ed81e3f9c46d71 100644 (file)
@@ -275,7 +275,7 @@ testIframe(
        "selector/html5_selector",
        "attributes - jQuery.attr",
        function( jQuery, window, document, assert ) {
-               assert.expect( 37 );
+               assert.expect( 35 );
 
                /**
                 * Returns an array of elements with the given IDs
@@ -333,10 +333,10 @@ testIframe(
                t( "Attribute Exists", "[indeterminate]",  [] );
                t( "Attribute Exists", "[ismap]",          [ "img1" ] );
                t( "Attribute Exists", "[itemscope]",      [ "div1" ] );
-               t( "Attribute Exists", "[loop]",           [ "video1" ] );
+               // t( "Attribute Exists", "[loop]",           [ "video1" ] ); // IE 6/7 cannot differentiate here. loop is also used on img, input, and marquee tags as well as video/audio. getAttributeNode unfortunately also retrieves the property value.
                t( "Attribute Exists", "[multiple]",       [ "select1" ] );
                t( "Attribute Exists", "[muted]",          [ "audio1" ] );
-               t( "Attribute Exists", "[nohref]",         [ "area1" ] );
+               // t( "Attribute Exists", "[nohref]",         [ "area1" ] ); // IE 6/7 keep this set to false regardless of presence. The attribute node is not retrievable.
                t( "Attribute Exists", "[noresize]",       [ "textarea1" ] );
                t( "Attribute Exists", "[noshade]",        [ "hr1" ] );
                t( "Attribute Exists", "[nowrap]",         [ "td1", "div1" ] );
index df2e7e5953277caa6c8d90e0355a5de1fa01e649..41e45c59c82f192e1d13e0a9660475c5f57274da 100644 (file)
@@ -20,8 +20,12 @@ var computedSupport = getComputedSupport( jQuery.support );
 QUnit.test( "zoom of doom (#13089)", function( assert ) {
        assert.expect( 1 );
 
-       assert.ok( !document.body.style.zoom, "No zoom added to the body" );
-} );
+       if ( computedSupport.inlineBlockNeedsLayout ) {
+               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" );
+       }
+});
 
 if ( jQuery.css ) {
        testIframeWithCallback(
@@ -79,7 +83,9 @@ testIframeWithCallback(
        if ( /edge\//i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
+                       "appendChecked": true,
                        "attributes": true,
+                       "boxSizing": true,
                        "boxSizingReliable": true,
                        "change": true,
                        "checkClone": true,
@@ -89,9 +95,13 @@ testIframeWithCallback(
                        "createHTMLDocument": true,
                        "cssFloat": true,
                        "deleteExpando": true,
+                       "enctype": true,
                        "focusin": false,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
                        "html5Clone": true,
                        "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
                        "input": true,
                        "leadingWhitespace": true,
                        "noCloneChecked": true,
@@ -107,12 +117,55 @@ testIframeWithCallback(
                        "reliableMarginRight": true,
                        "reliableMarginLeft": true,
                        "style": true,
-                       "submit": true
+                       "submit": true,
+                       "tbody": true
+               };
+       } else if ( /opera.*version\/12\.1/i.test( userAgent ) ) {
+               expected = {
+                       "ajax": true,
+                       "appendChecked": true,
+                       "attributes": true,
+                       "boxSizing": true,
+                       "boxSizingReliable": true,
+                       "change": true,
+                       "checkClone": true,
+                       "checkOn": true,
+                       "clearCloneStyle": true,
+                       "cors": true,
+                       "createHTMLDocument": true,
+                       "cssFloat": true,
+                       "deleteExpando": true,
+                       "enctype": true,
+                       "focusin": false,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
+                       "html5Clone": true,
+                       "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
+                       "input": true,
+                       "leadingWhitespace": true,
+                       "noCloneChecked": true,
+                       "noCloneEvent": true,
+                       "opacity": true,
+                       "optDisabled": true,
+                       "optSelected": true,
+                       "ownFirst": true,
+                       "pixelMarginRight": true,
+                       "pixelPosition": true,
+                       "radioValue": false,
+                       "reliableHiddenOffsets": true,
+                       "reliableMarginRight": true,
+                       "reliableMarginLeft": false,
+                       "style": true,
+                       "submit": true,
+                       "tbody": true
                };
        } else if ( /(msie 10\.0|trident\/7\.0)/i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
+                       "appendChecked": true,
                        "attributes": true,
+                       "boxSizing": true,
                        "boxSizingReliable": false,
                        "change": true,
                        "checkClone": true,
@@ -122,9 +175,13 @@ testIframeWithCallback(
                        "createHTMLDocument": true,
                        "cssFloat": true,
                        "deleteExpando": true,
+                       "enctype": true,
                        "focusin": true,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
                        "html5Clone": true,
                        "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
                        "input": true,
                        "leadingWhitespace": true,
                        "noCloneChecked": false,
@@ -140,27 +197,34 @@ testIframeWithCallback(
                        "reliableMarginRight": true,
                        "reliableMarginLeft": true,
                        "style": true,
-                       "submit": true
+                       "submit": true,
+                       "tbody": true
                };
        } else if ( /msie 9\.0/i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
+                       "appendChecked": true,
                        "attributes": true,
-                       "boxSizingReliable": false,
+                       "boxSizing": true,
+                       "boxSizingReliable": true,
                        "change": true,
                        "checkClone": true,
                        "checkOn": true,
                        "clearCloneStyle": false,
-                       "cors": false,
+                       "cors": true,
                        "createHTMLDocument": true,
                        "cssFloat": true,
                        "deleteExpando": true,
-                       "focusin": true,
+                       "enctype": true,
+                       "focusin": false,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
                        "html5Clone": true,
                        "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
                        "input": true,
                        "leadingWhitespace": true,
-                       "noCloneChecked": false,
+                       "noCloneChecked": true,
                        "noCloneEvent": true,
                        "opacity": true,
                        "optDisabled": true,
@@ -168,17 +232,60 @@ testIframeWithCallback(
                        "ownFirst": true,
                        "pixelMarginRight": true,
                        "pixelPosition": true,
-                       "radioValue": false,
+                       "radioValue": true,
                        "reliableHiddenOffsets": true,
                        "reliableMarginRight": true,
                        "reliableMarginLeft": true,
                        "style": true,
-                       "submit": true
+                       "submit": true,
+                       "tbody": true
                };
        } else if ( /msie 8\.0/i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
+                       "appendChecked": true,
+                       "attributes": false,
+                       "boxSizing": true,
+                       "boxSizingReliable": false,
+                       "change": false,
+                       "checkClone": true,
+                       "checkOn": true,
+                       "clearCloneStyle": true,
+                       "cors": false,
+                       "createHTMLDocument": false,
+                       "cssFloat": false,
+                       "deleteExpando": false,
+                       "enctype": true,
+                       "focusin": true,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
+                       "html5Clone": false,
+                       "htmlSerialize": false,
+                       "inlineBlockNeedsLayout": false,
+                       "input": false,
+                       "leadingWhitespace": false,
+                       "noCloneChecked": false,
+                       "noCloneEvent": false,
+                       "opacity": false,
+                       "optDisabled": true,
+                       "optSelected": false,
+                       "ownFirst": false,
+                       "pixelMarginRight": true,
+                       "pixelPosition": false,
+                       "radioValue": false,
+                       "reliableHiddenOffsets": false,
+                       "reliableMarginRight": true,
+                       "reliableMarginLeft": false,
+                       "style": false,
+                       "submit": false,
+                       "tbody": true
+               };
+       } else if ( /msie 7\.0/i.test( userAgent ) ) {
+               expected = {
+                       "ajax": true,
+                       "appendChecked": true,
                        "attributes": false,
+                       "boxSizing": true,
                        "boxSizingReliable": false,
                        "change": false,
                        "checkClone": true,
@@ -188,9 +295,13 @@ testIframeWithCallback(
                        "createHTMLDocument": false,
                        "cssFloat": false,
                        "deleteExpando": false,
+                       "enctype": true,
                        "focusin": true,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
                        "html5Clone": false,
                        "htmlSerialize": false,
+                       "inlineBlockNeedsLayout": false,
                        "input": false,
                        "leadingWhitespace": false,
                        "noCloneChecked": false,
@@ -206,7 +317,48 @@ testIframeWithCallback(
                        "reliableMarginRight": true,
                        "reliableMarginLeft": false,
                        "style": false,
-                       "submit": false
+                       "submit": false,
+                       "tbody": true
+               };
+       } else if ( /msie 6\.0/i.test( userAgent ) ) {
+               expected = {
+                       "ajax": true,
+                       "appendChecked": false,
+                       "attributes": false,
+                       "boxSizing": false,
+                       "boxSizingReliable": false,
+                       "change": false,
+                       "checkClone": false,
+                       "checkOn": true,
+                       "clearCloneStyle": true,
+                       "cors": false,
+                       "createHTMLDocument": false,
+                       "cssFloat": false,
+                       "deleteExpando": false,
+                       "enctype": true,
+                       "focusin": true,
+                       "getSetAttribute": false,
+                       "hrefNormalized": false,
+                       "html5Clone": false,
+                       "htmlSerialize": false,
+                       "inlineBlockNeedsLayout": true,
+                       "input": true,
+                       "leadingWhitespace": false,
+                       "noCloneChecked": false,
+                       "noCloneEvent": false,
+                       "opacity": false,
+                       "optDisabled": true,
+                       "optSelected": false,
+                       "ownFirst": false,
+                       "pixelMarginRight": true,
+                       "pixelPosition": false,
+                       "radioValue": false,
+                       "reliableHiddenOffsets": false,
+                       "reliableMarginRight": true,
+                       "reliableMarginLeft": false,
+                       "style": false,
+                       "submit": false,
+                       "tbody": false
                };
        } else if ( /chrome/i.test( userAgent ) ) {
 
@@ -214,7 +366,9 @@ testIframeWithCallback(
                // Android browser on Android >= 4.4).
                expected = {
                        "ajax": true,
+                       "appendChecked": true,
                        "attributes": true,
+                       "boxSizing": true,
                        "boxSizingReliable": true,
                        "change": true,
                        "checkClone": true,
@@ -224,9 +378,13 @@ testIframeWithCallback(
                        "createHTMLDocument": true,
                        "cssFloat": true,
                        "deleteExpando": true,
+                       "enctype": true,
                        "focusin": false,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
                        "html5Clone": true,
                        "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
                        "input": true,
                        "leadingWhitespace": true,
                        "noCloneChecked": true,
@@ -242,12 +400,15 @@ testIframeWithCallback(
                        "reliableMarginRight": true,
                        "reliableMarginLeft": true,
                        "style": true,
-                       "submit": true
+                       "submit": true,
+                       "tbody": true
                };
        } else if ( /9\.0(\.\d+|) safari/i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
+                       "appendChecked": true,
                        "attributes": true,
+                       "boxSizing": true,
                        "boxSizingReliable": true,
                        "change": true,
                        "checkClone": true,
@@ -257,9 +418,13 @@ testIframeWithCallback(
                        "createHTMLDocument": true,
                        "cssFloat": true,
                        "deleteExpando": true,
+                       "enctype": true,
                        "focusin": false,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
                        "html5Clone": true,
                        "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
                        "input": true,
                        "leadingWhitespace": true,
                        "noCloneChecked": true,
@@ -275,12 +440,15 @@ testIframeWithCallback(
                        "reliableMarginRight": true,
                        "reliableMarginLeft": true,
                        "style": true,
-                       "submit": true
+                       "submit": true,
+                       "tbody": true
                };
        } else if ( /8\.0(\.\d+|) safari/i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
+                       "appendChecked": true,
                        "attributes": true,
+                       "boxSizing": true,
                        "boxSizingReliable": true,
                        "change": true,
                        "checkClone": true,
@@ -290,9 +458,13 @@ testIframeWithCallback(
                        "createHTMLDocument": false,
                        "cssFloat": true,
                        "deleteExpando": true,
+                       "enctype": true,
                        "focusin": false,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
                        "html5Clone": true,
                        "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
                        "input": true,
                        "leadingWhitespace": true,
                        "noCloneChecked": true,
@@ -308,12 +480,95 @@ testIframeWithCallback(
                        "reliableMarginRight": true,
                        "reliableMarginLeft": true,
                        "style": true,
-                       "submit": true
+                       "submit": true,
+                       "tbody": true
+               };
+       } else if ( /5\.[01](\.\d+|) safari/i.test( userAgent ) ) {
+               expected = {
+                       "ajax": true,
+                       "appendChecked": true,
+                       "attributes": true,
+                       "boxSizing": true,
+                       "boxSizingReliable": true,
+                       "change": true,
+                       "checkClone": false,
+                       "checkOn": false,
+                       "clearCloneStyle": true,
+                       "cors": true,
+                       "createHTMLDocument": true,
+                       "cssFloat": true,
+                       "deleteExpando": true,
+                       "enctype": true,
+                       "focusin": false,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
+                       "html5Clone": true,
+                       "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
+                       "input": true,
+                       "leadingWhitespace": true,
+                       "noCloneChecked": true,
+                       "noCloneEvent": true,
+                       "opacity": true,
+                       "optDisabled": true,
+                       "optSelected": true,
+                       "ownFirst": true,
+                       "pixelMarginRight": false,
+                       "pixelPosition": false,
+                       "radioValue": true,
+                       "reliableHiddenOffsets": true,
+                       "reliableMarginRight": true,
+                       "reliableMarginLeft": false,
+                       "style": true,
+                       "submit": true,
+                       "tbody": true
+               };
+       } else if ( /6\.0(\.\d+|) safari/i.test( userAgent ) ) {
+               expected = {
+                       "ajax": true,
+                       "appendChecked": true,
+                       "attributes": true,
+                       "boxSizing": true,
+                       "boxSizingReliable": true,
+                       "change": true,
+                       "checkClone": true,
+                       "checkOn": true,
+                       "clearCloneStyle": true,
+                       "cors": true,
+                       "createHTMLDocument": true,
+                       "cssFloat": true,
+                       "deleteExpando": true,
+                       "enctype": true,
+                       "focusin": false,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
+                       "html5Clone": true,
+                       "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
+                       "input": true,
+                       "leadingWhitespace": true,
+                       "noCloneChecked": true,
+                       "noCloneEvent": true,
+                       "opacity": true,
+                       "optDisabled": true,
+                       "optSelected": true,
+                       "ownFirst": true,
+                       "pixelMarginRight": true,
+                       "pixelPosition": false,
+                       "radioValue": true,
+                       "reliableHiddenOffsets": true,
+                       "reliableMarginRight": true,
+                       "reliableMarginLeft": true,
+                       "style": true,
+                       "submit": true,
+                       "tbody": true
                };
        } else if ( /firefox/i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
+                       "appendChecked": true,
                        "attributes": true,
+                       "boxSizing": true,
                        "boxSizingReliable": true,
                        "change": true,
                        "checkClone": true,
@@ -323,9 +578,13 @@ testIframeWithCallback(
                        "createHTMLDocument": true,
                        "cssFloat": true,
                        "deleteExpando": true,
+                       "enctype": true,
                        "focusin": false,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
                        "html5Clone": true,
                        "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
                        "input": true,
                        "leadingWhitespace": true,
                        "noCloneChecked": true,
@@ -341,12 +600,15 @@ testIframeWithCallback(
                        "reliableMarginRight": true,
                        "reliableMarginLeft": false,
                        "style": true,
-                       "submit": true
+                       "submit": true,
+                       "tbody": true
                };
        } else if ( /iphone os 9_/i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
+                       "appendChecked": true,
                        "attributes": true,
+                       "boxSizing": true,
                        "boxSizingReliable": true,
                        "change": true,
                        "checkClone": true,
@@ -356,10 +618,13 @@ testIframeWithCallback(
                        "createHTMLDocument": true,
                        "cssFloat": true,
                        "deleteExpando": true,
+                       "enctype": true,
                        "focusin": false,
-                       "gBCRDimensions": true,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
                        "html5Clone": true,
                        "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
                        "input": true,
                        "leadingWhitespace": true,
                        "noCloneChecked": true,
@@ -375,12 +640,15 @@ testIframeWithCallback(
                        "reliableMarginRight": true,
                        "reliableMarginLeft": true,
                        "style": true,
-                       "submit": true
+                       "submit": true,
+                       "tbody": true
                };
        } else if ( /iphone os 8_/i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
+                       "appendChecked": true,
                        "attributes": true,
+                       "boxSizing": true,
                        "boxSizingReliable": true,
                        "change": true,
                        "checkClone": true,
@@ -390,9 +658,13 @@ testIframeWithCallback(
                        "createHTMLDocument": false,
                        "cssFloat": true,
                        "deleteExpando": true,
+                       "enctype": true,
                        "focusin": false,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
                        "html5Clone": true,
                        "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
                        "input": true,
                        "leadingWhitespace": true,
                        "noCloneChecked": true,
@@ -408,12 +680,15 @@ testIframeWithCallback(
                        "reliableMarginRight": true,
                        "reliableMarginLeft": true,
                        "style": true,
-                       "submit": true
+                       "submit": true,
+                       "tbody": true
                };
        } else if ( /iphone os 7_/i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
+                       "appendChecked": true,
                        "attributes": true,
+                       "boxSizing": true,
                        "boxSizingReliable": true,
                        "change": true,
                        "checkClone": true,
@@ -423,9 +698,13 @@ testIframeWithCallback(
                        "createHTMLDocument": true,
                        "cssFloat": true,
                        "deleteExpando": true,
+                       "enctype": true,
                        "focusin": false,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
                        "html5Clone": true,
                        "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
                        "input": true,
                        "leadingWhitespace": true,
                        "noCloneChecked": true,
@@ -441,24 +720,31 @@ testIframeWithCallback(
                        "reliableMarginRight": true,
                        "reliableMarginLeft": true,
                        "style": true,
-                       "submit": true
+                       "submit": true,
+                       "tbody": true
                };
-       } else if ( /android 4\.[0-3]/i.test( userAgent ) ) {
+       } else if ( /iphone os 6_/i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
+                       "appendChecked": true,
                        "attributes": true,
+                       "boxSizing": true,
                        "boxSizingReliable": true,
                        "change": true,
-                       "checkClone": false,
-                       "checkOn": false,
+                       "checkClone": true,
+                       "checkOn": true,
                        "clearCloneStyle": true,
                        "cors": true,
                        "createHTMLDocument": true,
                        "cssFloat": true,
                        "deleteExpando": true,
+                       "enctype": true,
                        "focusin": false,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
                        "html5Clone": true,
                        "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
                        "input": true,
                        "leadingWhitespace": true,
                        "noCloneChecked": true,
@@ -467,47 +753,95 @@ testIframeWithCallback(
                        "optDisabled": true,
                        "optSelected": true,
                        "ownFirst": true,
-                       "pixelMarginRight": false,
+                       "pixelMarginRight": true,
                        "pixelPosition": false,
                        "radioValue": true,
                        "reliableHiddenOffsets": true,
                        "reliableMarginRight": true,
-                       "reliableMarginLeft": false,
+                       "reliableMarginLeft": true,
                        "style": true,
-                       "submit": true
+                       "submit": true,
+                       "tbody": true
+               };
+       } else if ( /android 4\.[0-3]/i.test( userAgent ) ) {
+               expected = {
+                       "ajax": true,
+                       "appendChecked": true,
+                       "attributes": true,
+                       "boxSizing": true,
+                       "boxSizingReliable": true,
+                       "change": true,
+                       "checkClone": true,
+                       "checkOn": true,
+                       "clearCloneStyle": false,
+                       "cors": true,
+                       "createHTMLDocument": true,
+                       "cssFloat": true,
+                       "deleteExpando": true,
+                       "enctype": true,
+                       "focusin": false,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
+                       "html5Clone": true,
+                       "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
+                       "input": true,
+                       "leadingWhitespace": true,
+                       "noCloneChecked": true,
+                       "noCloneEvent": true,
+                       "opacity": true,
+                       "optDisabled": true,
+                       "optSelected": false,
+                       "ownFirst": true,
+                       "pixelMarginRight": true,
+                       "pixelPosition": true,
+                       "radioValue": true,
+                       "reliableHiddenOffsets": true,
+                       "reliableMarginRight": true,
+                       "reliableMarginLeft": true,
+                       "style": true,
+                       "submit": true,
+                       "tbody": true
                };
        } else if ( /android 2\.3/i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
+                       "appendChecked": true,
                        "attributes": true,
+                       "boxSizing": true,
                        "boxSizingReliable": true,
                        "change": true,
                        "checkClone": true,
-                       "checkOn": false,
+                       "checkOn": true,
                        "clearCloneStyle": false,
                        "cors": true,
                        "createHTMLDocument": true,
                        "cssFloat": true,
                        "deleteExpando": true,
+                       "enctype": true,
                        "focusin": false,
+                       "getSetAttribute": true,
+                       "hrefNormalized": true,
                        "html5Clone": true,
                        "htmlSerialize": true,
+                       "inlineBlockNeedsLayout": false,
                        "input": true,
                        "leadingWhitespace": true,
                        "noCloneChecked": true,
                        "noCloneEvent": true,
                        "opacity": true,
-                       "optDisabled": false,
-                       "optSelected": true,
+                       "optDisabled": true,
+                       "optSelected": false,
                        "ownFirst": true,
                        "pixelMarginRight": true,
-                       "pixelPosition": false,
+                       "pixelPosition": true,
                        "radioValue": true,
                        "reliableHiddenOffsets": true,
-                       "reliableMarginRight": false,
+                       "reliableMarginRight": true,
                        "reliableMarginLeft": true,
                        "style": true,
-                       "submit": true
+                       "submit": true,
+                       "tbody": true
                };
        }