aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2015-12-22 13:03:11 -0500
committerTimmy Willison <timmywillisn@gmail.com>2016-01-06 14:05:11 -0500
commite3c89685095cfabdd1060b5d9cb57a62f60b7f2f (patch)
tree5f64b9a32e6f1add52364f1638c86c7671cc41cf /test
parentf21d43a1146256379d7f5b7cb537ed59aeebdeb4 (diff)
downloadjquery-e3c89685095cfabdd1060b5d9cb57a62f60b7f2f.tar.gz
jquery-e3c89685095cfabdd1060b5d9cb57a62f60b7f2f.zip
Revert "Misc: Drop support for older browsers; update support comments"
This reverts commit 90d7cc1d8b2ea7ac75f0eacb42439349c9c73278.
Diffstat (limited to 'test')
-rw-r--r--test/data/css/cssWidthBeforeDocReady.html1
-rw-r--r--test/data/dimensions/documentSmall.html10
-rw-r--r--test/data/testsuite.css12
-rw-r--r--test/unit/ajax.js18
-rw-r--r--test/unit/attributes.js17
-rw-r--r--test/unit/core.js2
-rw-r--r--test/unit/css.js37
-rw-r--r--test/unit/effects.js356
-rw-r--r--test/unit/event.js47
-rw-r--r--test/unit/manipulation.js20
-rw-r--r--test/unit/offset.js83
-rw-r--r--test/unit/selector.js6
-rw-r--r--test/unit/support.js396
13 files changed, 720 insertions, 285 deletions
diff --git a/test/data/css/cssWidthBeforeDocReady.html b/test/data/css/cssWidthBeforeDocReady.html
index c45b6811a..3bdd1b5ab 100644
--- a/test/data/css/cssWidthBeforeDocReady.html
+++ b/test/data/css/cssWidthBeforeDocReady.html
@@ -5,6 +5,7 @@
<style>
#test {
-webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
box-sizing: border-box;
width: 100px;
height: 100px;
diff --git a/test/data/dimensions/documentSmall.html b/test/data/dimensions/documentSmall.html
index 2f79d7f93..63e1c2a8f 100644
--- a/test/data/dimensions/documentSmall.html
+++ b/test/data/dimensions/documentSmall.html
@@ -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>
diff --git a/test/data/testsuite.css b/test/data/testsuite.css
index de5f3fb00..d9909ddcc 100644
--- a/test/data/testsuite.css
+++ b/test/data/testsuite.css
@@ -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; }
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index 11cb902d2..9abc5e613 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -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(
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index 9f8502d5d..be905cfd6 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -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 );
diff --git a/test/unit/core.js b/test/unit/core.js
index 9714b8685..81fbd4e54 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -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 );
diff --git a/test/unit/css.js b/test/unit/css.js
index df4b800f0..adfc46cb8 100644
--- a/test/unit/css.js
+++ b/test/unit/css.js
@@ -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 ) ];
} );
}
diff --git a/test/unit/effects.js b/test/unit/effects.js
index 78dbe9dca..c1d67b651 100644
--- a/test/unit/effects.js
+++ b/test/unit/effects.js
@@ -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;' />" );
diff --git a/test/unit/event.js b/test/unit/event.js
index ab768439f..525a72d13 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -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();
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js
index 76b40997c..ead4e0755 100644
--- a/test/unit/manipulation.js
+++ b/test/unit/manipulation.js
@@ -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" );
}
} );
diff --git a/test/unit/offset.js b/test/unit/offset.js
index 7a8624a92..0a311be30 100644
--- a/test/unit/offset.js
+++ b/test/unit/offset.js
@@ -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 );
diff --git a/test/unit/selector.js b/test/unit/selector.js
index ed0d508ca..b330d4226 100644
--- a/test/unit/selector.js
+++ b/test/unit/selector.js
@@ -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" ] );
diff --git a/test/unit/support.js b/test/unit/support.js
index df2e7e595..41e45c59c 100644
--- a/test/unit/support.js
+++ b/test/unit/support.js
@@ -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
};
}