aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichał Gołębiowski <m.goleb@gmail.com>2014-11-03 19:53:22 +0100
committerMichał Gołębiowski <m.goleb@gmail.com>2014-12-08 21:12:33 +0100
commit90d7cc1d8b2ea7ac75f0eacb42439349c9c73278 (patch)
tree3302e3fce03076b1fe3e91eedba671be42bade69 /test
parenta467f8653a6fab2903148df80ab0ce9f5f4fd04f (diff)
downloadjquery-90d7cc1d8b2ea7ac75f0eacb42439349c9c73278.tar.gz
jquery-90d7cc1d8b2ea7ac75f0eacb42439349c9c73278.zip
Misc: Drop support for older browsers; update support comments
That includes IE<8, Opera 12.x, Firefox<29, Safari<6.0 and some hacks for old Blackberry. Fixes gh-1836 Fixes gh-1701 Refs gh-1815 Refs gh-1820
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/support/shrinkWrapBlocks.html23
-rw-r--r--test/data/testsuite.css12
-rw-r--r--test/unit/ajax.js56
-rw-r--r--test/unit/attributes.js7
-rw-r--r--test/unit/css.js39
-rw-r--r--test/unit/dimensions.js4
-rw-r--r--test/unit/effects.js151
-rw-r--r--test/unit/event.js80
-rw-r--r--test/unit/manipulation.js3
-rw-r--r--test/unit/offset.js53
-rw-r--r--test/unit/selector.js6
-rw-r--r--test/unit/serialize.js6
-rw-r--r--test/unit/support.js273
-rw-r--r--test/unit/wrap.js3
16 files changed, 152 insertions, 575 deletions
diff --git a/test/data/css/cssWidthBeforeDocReady.html b/test/data/css/cssWidthBeforeDocReady.html
index 3bdd1b5ab..c45b6811a 100644
--- a/test/data/css/cssWidthBeforeDocReady.html
+++ b/test/data/css/cssWidthBeforeDocReady.html
@@ -5,7 +5,6 @@
<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 63e1c2a8f..2f79d7f93 100644
--- a/test/data/dimensions/documentSmall.html
+++ b/test/data/dimensions/documentSmall.html
@@ -2,16 +2,6 @@
<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/support/shrinkWrapBlocks.html b/test/data/support/shrinkWrapBlocks.html
deleted file mode 100644
index d781423ec..000000000
--- a/test/data/support/shrinkWrapBlocks.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<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>
- * {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- </style>
-</head>
-<body>
- <div>
- <script src="../../jquery.js"></script>
- </div>
- <script>
- jQuery(function() {
- window.parent.iframeCallback( jQuery.support.shrinkWrapBlocks() );
- });
- </script>
-</body>
-</html>
diff --git a/test/data/testsuite.css b/test/data/testsuite.css
index d9909ddcc..de5f3fb00 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;
- filter:Alpha(opacity=0) progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffff0000', EndColorStr='#ffffffff');
+ -ms-filter: "Alpha(opacity=0) progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffff0000', EndColorStr='#ffffffff')";
}
div#fx-tests h4 {
@@ -47,7 +47,7 @@ div.largeheight {
}
div.largeopacity {
- filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=100)";
}
div.medwidth {
@@ -60,7 +60,7 @@ div.medheight {
div.medopacity {
opacity: 0.5;
- filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=50)";
}
div.nowidth {
@@ -73,7 +73,7 @@ div.noheight {
div.noopacity {
opacity: 0;
- filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
+ -ms-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 FILTER:ALPHA(OPACITY=100) AFTER ANIMATION */
-#t6652 div { filter: alpha(opacity=50); }
+/* #6652 Remove -ms-filter: "alpha(opacity=100)" after animation */
+#t6652 div { -ms-filter: "alpha(opacity=50)"; }
/* #10501 */
section { background:#f0f; display:block; }
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index c63fd69d9..da1f6ecb9 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -1014,9 +1014,7 @@ module( "ajax", {
" (no cache)": false
},
function( label, cache ) {
- var isOpera = !!window.opera;
-
- asyncTest( "jQuery.ajax() - If-Modified-Since support" + label, 3, function() {
+ asyncTest( "jQuery.ajax() - If-Modified-Since support" + label, 4, function() {
var url = "data/if_modified_since.php?ts=" + ifModifiedNow++;
jQuery.ajax({
@@ -1030,33 +1028,15 @@ module( "ajax", {
url: url,
ifModified: true,
cache: cache,
- success: function( data, status ) {
- if ( data === "FAIL" ) {
- ok( isOpera, "Opera is incapable of doing .setRequestHeader('If-Modified-Since')." );
- ok( isOpera, "Opera is incapable of doing .setRequestHeader('If-Modified-Since')." );
- } else {
- strictEqual( status, "notmodified" );
- ok( data == null, "response body should be empty" );
- }
- start();
+ success: function( data, status, jqXHR ) {
+ strictEqual( status, "notmodified", "Following status is 'notmodified'" );
+ strictEqual( jqXHR.status, 304, "XHR status is 304" );
+ equal( data, null, "no response body is given" );
},
- error: function() {
- // Do this because opera simply refuses to implement 304 handling :(
- // A feature-driven way of detecting this would be appreciated
- // See: http://gist.github.com/599419
- ok( isOpera, "error" );
- ok( isOpera, "error" );
+ complete: function() {
start();
}
});
- },
- error: function() {
- strictEqual( false, "error" );
- // Do this because opera simply refuses to implement 304 handling :(
- // A feature-driven way of detecting this would be appreciated
- // See: http://gist.github.com/599419
- ok( isOpera, "error" );
- start();
}
});
});
@@ -1076,31 +1056,13 @@ module( "ajax", {
ifModified: true,
cache: cache,
success: function( data, status ) {
- if ( data === "FAIL" ) {
- ok( isOpera, "Opera is incapable of doing .setRequestHeader('If-None-Match')." );
- ok( isOpera, "Opera is incapable of doing .setRequestHeader('If-None-Match')." );
- } else {
- strictEqual( status, "notmodified" );
- ok( data == null, "response body should be empty" );
- }
- start();
+ strictEqual( status, "notmodified" );
+ ok( data == null, "response body should be empty" );
},
- error: function() {
- // Do this because opera simply refuses to implement 304 handling :(
- // A feature-driven way of detecting this would be appreciated
- // See: http://gist.github.com/599419
- ok( isOpera, "error" );
- ok( isOpera, "error" );
+ complete: function() {
start();
}
});
- },
- error: function() {
- // Do this because opera simply refuses to implement 304 handling :(
- // A feature-driven way of detecting this would be appreciated
- // See: http://gist.github.com/599419
- ok( isOpera, "error" );
- start();
}
});
});
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index d76b0e260..55bdfffbd 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -46,10 +46,6 @@ test( "jQuery.propFix integrity test", function() {
"contenteditable": "contentEditable"
};
- if ( !jQuery.support.enctype ) {
- props.enctype = "encoding";
- }
-
deepEqual( props, jQuery.propFix, "jQuery.propFix passes integrity check" );
});
@@ -594,8 +590,7 @@ test( "removeAttr(String)", function() {
$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" );
+ equal( $first.attr("Case"), undefined, "mixed-case attribute was removed" );
});
test( "removeAttr(String) in XML", function() {
diff --git a/test/unit/css.js b/test/unit/css.js
index 364249a31..a4ee14cf6 100644
--- a/test/unit/css.js
+++ b/test/unit/css.js
@@ -231,8 +231,6 @@ test("css(String, Object)", function() {
j = jQuery("#nonnodes").contents();
j.css("overflow", "visible");
equal( j.css("overflow"), "visible", "Check node,textnode,comment css works" );
- // opera sometimes doesn't update 'display' correctly, see #2037
- jQuery("#t2037")[0].innerHTML = jQuery("#t2037")[0].innerHTML;
equal( jQuery("#t2037 .hidden").css("display"), "none", "Make sure browser thinks it is hidden" );
div = jQuery("#nothiddendiv");
@@ -297,11 +295,7 @@ if ( !jQuery.support.opacity ) {
test2 = test.find( "div" ).css( "opacity", 1 );
function hasFilter( elem ) {
- var match = rfilter.exec( elem[0].style.cssText );
- if ( match ) {
- return true;
- }
- return false;
+ return !!rfilter.exec( elem[0].style.cssText );
}
expect( 2 );
ok( !hasFilter( test ), "Removed filter attribute on element without filter in stylesheet" );
@@ -455,7 +449,7 @@ test("show();", function() {
expect( 18 );
- var hiddendiv, div, pass, old, test;
+ var hiddendiv, div, pass, test;
hiddendiv = jQuery("div.hidden");
equal(jQuery.css( hiddendiv[0], "display"), "none", "hiddendiv is display: none");
@@ -478,10 +472,7 @@ test("show();", function() {
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><table id='test-table'></table>");
-
- old = jQuery("#test-table").show().css("display") !== "table";
- jQuery("#test-table").remove();
+ 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>");
test = {
"div" : "block",
@@ -490,14 +481,14 @@ test("show();", function() {
"code" : "inline",
"pre" : "block",
"span" : "inline",
- "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",
+ "table" : "table",
+ "thead" : "table-header-group",
+ "tbody" : "table-row-group",
+ "tr" : "table-row",
+ "th" : "table-cell",
+ "td" : "table-cell",
"ul" : "block",
- "li" : old ? "block" : "list-item"
+ "li" : "list-item"
};
jQuery.each(test, function(selector, expected) {
@@ -848,8 +839,8 @@ test("Do not append px (#9548, #12990)", function() {
test("css('width') and css('height') should respect box-sizing, see #11004", function() {
expect( 4 );
- // Support: Firefox<29, Android 2.3 (Prefixed box-sizing versions).
- var el_dis = jQuery("<div style='width:300px;height:300px;margin:2px;padding:2px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;'>test</div>"),
+ // Support: Android 2.3 (-webkit-box-sizing).
+ var el_dis = jQuery("<div style='width:300px;height:300px;margin:2px;padding:2px;-webkit-box-sizing:border-box;box-sizing:border-box;'>test</div>"),
el = el_dis.clone().appendTo("#qunit-fixture");
equal( el.css("width"), el.css("width", el.css("width")).css("width"), "css('width') is not respecting box-sizing, see #11004");
@@ -930,13 +921,13 @@ test( "css opacity consistency across browsers (#12685)", function() {
fixture = jQuery("#qunit-fixture");
// Append style element
- jQuery("<style>.opacityWithSpaces_t12685 { opacity: 0.1; filter: alpha(opacity = 10); } .opacityNoSpaces_t12685 { opacity: 0.2; filter: alpha(opacity=20); }</style>").appendTo( fixture );
+ 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 );
el = jQuery("<div class='opacityWithSpaces_t12685'></div>").appendTo(fixture);
- equal( Math.round( el.css("opacity") * 100 ), 10, "opacity from style sheet (filter:alpha with spaces)" );
+ equal( Math.round( el.css("opacity") * 100 ), 10, "opacity from style sheet (-ms-filter:alpha with spaces)" );
el.removeClass("opacityWithSpaces_t12685").addClass("opacityNoSpaces_t12685");
- equal( Math.round( el.css("opacity") * 100 ), 20, "opacity from style sheet (filter:alpha without spaces)" );
+ equal( Math.round( el.css("opacity") * 100 ), 20, "opacity from style sheet (-ms-filter:alpha without spaces)" );
el.css( "opacity", 0.3 );
equal( Math.round( el.css("opacity") * 100 ), 30, "override opacity" );
el.css( "opacity", "" );
diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js
index 602e97099..c3bf71a63 100644
--- a/test/unit/dimensions.js
+++ b/test/unit/dimensions.js
@@ -415,8 +415,8 @@ test( "getters on non elements should return null", function() {
test("setters with and without box-sizing:border-box", function(){
expect(20);
- // Support: Firefox<29, Android 2.3 (Prefixed box-sizing versions).
- var el_bb = jQuery("<div style='width:114px;height:114px;margin:5px;padding:3px;border:4px solid white;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;'>test</div>").appendTo("#qunit-fixture"),
+ // Support: Android 2.3 (-webkit-box-sizing).
+ var el_bb = jQuery("<div style='width:114px;height:114px;margin:5px;padding:3px;border:4px solid white;-webkit-box-sizing:border-box;box-sizing:border-box;'>test</div>").appendTo("#qunit-fixture"),
el = jQuery("<div style='width:100px;height:100px;margin:5px;padding:3px;border:4px solid white;'>test</div>").appendTo("#qunit-fixture"),
expected = 100;
diff --git a/test/unit/effects.js b/test/unit/effects.js
index 23a9a50ee..bb5b0ce7d 100644
--- a/test/unit/effects.js
+++ b/test/unit/effects.js
@@ -47,7 +47,7 @@ test("show() basic", 2, function() {
});
test("show()", 27, function () {
- var div, speeds, old, test,
+ var div, speeds, test,
displaysActual, displaysExpected,
hiddendiv = jQuery("div.hidden");
@@ -97,10 +97,7 @@ 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><table id='test-table'></table>");
-
- old = jQuery("#test-table").show().css("display") !== "table";
- jQuery("#test-table").remove();
+ 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>");
test = {
"div" : "block",
@@ -109,14 +106,14 @@ test("show()", 27, function () {
"code" : "inline",
"pre" : "block",
"span" : "inline",
- "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",
+ "table" : "table",
+ "thead" : "table-header-group",
+ "tbody" : "table-row-group",
+ "tr" : "table-row",
+ "th" : "table-cell",
+ "td" : "table-cell",
"ul" : "block",
- "li" : old ? "block" : "list-item"
+ "li" : "list-item"
};
jQuery.each(test, function(selector, expected) {
@@ -136,31 +133,27 @@ test("show(Number) - other displays", function() {
// #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><table id='test-table'></table>");
-
- var test,
- old = jQuery("#test-table").show().css("display") !== "table";
- jQuery("#test-table").remove();
+ 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>");
// Note: inline elements are expected to be inline-block
// because we're showing width/height
// Can't animate width/height inline
// See #14344
- test = {
+ var test = {
"div" : "block",
"p" : "block",
"a" : "inline-block",
"code" : "inline-block",
"pre" : "block",
"span" : "inline-block",
- "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",
+ "table" : "table",
+ "thead" : "table-header-group",
+ "tbody" : "table-row-group",
+ "tr" : "table-row",
+ "th" : "table-cell",
+ "td" : "table-cell",
"ul" : "block",
- "li" : old ? "block" : "list-item"
+ "li" : "list-item"
};
jQuery.each(test, function(selector, expected) {
@@ -289,52 +282,35 @@ test("animate negative padding", function() {
test("animate block as inline width/height", function() {
expect(3);
- var span = jQuery("<span>").css("display", "inline-block").appendTo("body"),
- expected = span.css("display");
+ var span = jQuery("<span>").css("display", "inline-block").appendTo("body");
span.remove();
- 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" );
- });
+ 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" );
+ });
- // 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() {
expect(3);
- var span = jQuery("<span>").css("display", "inline-block").appendTo("body"),
- expected = span.css("display");
+ var span = jQuery("<span>").css("display", "inline-block").appendTo("body");
span.remove();
- 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" );
- });
+ 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 );
});
@@ -365,30 +341,24 @@ test( "animate block width/height", function() {
this.clock.tick( 100 );
});
-test("animate table width/height", function() {
+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"), displayMode, "display mode is correct" );
+ jQuery( "#table" ).animate({ width: 42, height: 42 }, 100, function() {
+ equal( jQuery( this ).css( "display" ), "table", "display mode is correct" );
});
this.clock.tick( 100 );
});
test("animate table-row width/height", function() {
expect(3);
- var displayMode,
- tr = jQuery("#table")
+ var 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"), displayMode, "display mode is correct" );
+ equal( jQuery( this ).css( "display" ), "table-row", "display mode is correct" );
equal( this.offsetWidth, 20, "width animated to shrink wrap point" );
equal( this.offsetHeight, 20, "height animated to shrink wrap point" );
});
@@ -398,17 +368,13 @@ test("animate table-row width/height", function() {
test("animate table-cell width/height", function() {
expect(3);
- var displayMode,
- td = jQuery( "#table" )
+ var 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"), displayMode, "display mode is correct" );
+ equal( jQuery( this ).css( "display" ), "table-cell", "display mode is correct" );
equal( this.offsetWidth, 20, "width animated to shrink wrap point" );
equal( this.offsetHeight, 20, "height animated to shrink wrap point" );
});
@@ -1050,11 +1016,10 @@ jQuery.each({
test("Effects chaining", function() {
var remaining = 16,
- shrinkwrap = jQuery.support.shrinkWrapBlocks(),
props = [ "opacity", "height", "width", "display", "overflow" ],
- setup = function( name, selector, hiddenOverflow ) {
+ setup = function( name, selector ) {
var $el = jQuery( selector );
- return $el.data( getProps( $el[0], hiddenOverflow ) ).data( "name", name );
+ return $el.data( getProps( $el[0] ) ).data( "name", name );
},
assert = function() {
var data = jQuery.data( this ),
@@ -1075,21 +1040,19 @@ test("Effects chaining", function() {
expect( remaining );
- // We need to pass jQuery.support.shrinkWrapBlocks for all methods that
- // set overflow hidden (slide* and show/hide with speed)
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", shrinkwrap ).hide("fast").show( "fast", assert );
- setup( ".show().hide()", "#hide div", shrinkwrap ).show("fast").hide( "fast", assert );
- setup( ".show().hide(easing)", "#easehide div", shrinkwrap ).show("fast").hide( "fast", "linear", assert );
- setup( ".toggle().toggle() - in", "#togglein div", shrinkwrap ).toggle("fast").toggle( "fast", assert );
- setup( ".toggle().toggle() - out", "#toggleout div", shrinkwrap ).toggle("fast").toggle( "fast", assert );
- setup( ".toggle().toggle(easing) - out", "#easetoggleout div", shrinkwrap ).toggle("fast").toggle( "fast", "linear", assert );
- setup( ".slideDown().slideUp()", "#slidedown div", shrinkwrap ).slideDown("fast").slideUp( "fast", assert );
- setup( ".slideUp().slideDown()", "#slideup div", shrinkwrap ).slideUp("fast").slideDown( "fast", assert );
- setup( ".slideUp().slideDown(easing)", "#easeslideup div", shrinkwrap ).slideUp("fast").slideDown( "fast", "linear", assert );
- setup( ".slideToggle().slideToggle() - in", "#slidetogglein div", shrinkwrap ).slideToggle("fast").slideToggle( "fast", assert );
- setup( ".slideToggle().slideToggle() - out", "#slidetoggleout div", shrinkwrap ).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 );
@@ -1912,12 +1875,8 @@ test( "Animate properly sets overflow hidden when animating width/height (#12117
equal( div.css( "overflow" ), "hidden",
"overflow: hidden set when animating " + prop + " to " + value );
div.stop();
- if ( jQuery.support.shrinkWrapBlocks ) {
- ok( true, "cannot restore overflow, shrinkWrapBlocks" );
- } else {
- equal( div.css( "overflow" ), "auto",
- "overflow: auto restored after animating " + prop + " to " + value );
- }
+ equal( div.css( "overflow" ), "auto",
+ "overflow: auto restored after animating " + prop + " to " + value );
});
});
});
diff --git a/test/unit/event.js b/test/unit/event.js
index 412fb87bc..61bdc7bca 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -408,15 +408,7 @@ test("on bubbling, isDefaultPrevented, stopImmediatePropagation", function() {
e.preventDefault();
});
$main.on("click", "#foo", function(e) {
- var orig = e.originalEvent;
-
- if ( typeof(orig.defaultPrevented) === "boolean" || typeof(orig.returnValue) === "boolean" || orig["getPreventDefault"] ) {
- equal( e.isDefaultPrevented(), true, "isDefaultPrevented true passed to bubbled event" );
-
- } else {
- // Opera < 11 doesn't implement any interface we can use, so give it a pass
- ok( true, "isDefaultPrevented not supported by this browser, test skipped" );
- }
+ equal( e.isDefaultPrevented(), true, "isDefaultPrevented true passed to bubbled event" );
});
fakeClick( $anchor2 );
$anchor2.off( "click" );
@@ -1432,7 +1424,7 @@ test("Submit event can be stopped (#11049)", function() {
form.remove();
});
-// Test beforeunload event only if it supported (i.e. not Opera)
+// Test beforeunload event only if it supported.
// 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.
@@ -1440,7 +1432,6 @@ if ( window.onbeforeunload === null &&
!/(ipad|iphone|ipod|android 2\.3)/i.test( navigator.userAgent ) ) {
asyncTest("on(beforeunload)", 4, function() {
var win,
- forIE6 = 0,
fired = false,
iframe = jQuery("<iframe src='data/iframe.html' />");
@@ -1454,33 +1445,7 @@ if ( window.onbeforeunload === null &&
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() {
ok( true, "window.onbeforeunload handler is called" );
iframe = jQuery("<iframe src='data/iframe.html' />");
@@ -1503,7 +1468,7 @@ if ( window.onbeforeunload === null &&
win.location.reload();
});
- }
+ };
win.location.reload();
});
@@ -2519,32 +2484,26 @@ testIframeWithCallback( "focusin from an iframe", "event/focusinCrossFrame.html"
var input = jQuery( frameDoc ).find( "#frame-input" );
- if ( input.length ) {
- // Create a focusin handler on the parent; shouldn't affect the iframe's fate
- jQuery ( "body" ).on( "focusin.iframeTest", function() {
- ok( false, "fired a focusin event in the parent document" );
- });
-
- input.on( "focusin", function() {
- ok( true, "fired a focusin event in the iframe" );
- });
+ // Create a focusin handler on the parent; shouldn't affect the iframe's fate
+ jQuery ( "body" ).on( "focusin.iframeTest", function() {
+ ok( false, "fired a focusin event in the parent document" );
+ });
- // Avoid a native event; Chrome can't force focus to another frame
- input.trigger( "focusin" );
+ input.on( "focusin", function() {
+ ok( true, "fired a focusin event in the iframe" );
+ });
- // Must manually remove handler to avoid leaks in our data store
- input.remove();
+ // Avoid a native event; Chrome can't force focus to another frame
+ input.trigger( "focusin" );
- // Be sure it was removed; nothing should happen
- input.trigger( "focusin" );
+ // Must manually remove handler to avoid leaks in our data store
+ input.remove();
- // Remove body handler manually since it's outside the fixture
- jQuery( "body" ).off( "focusin.iframeTest" );
+ // Be sure it was removed; nothing should happen
+ input.trigger( "focusin" );
- } else {
- // Opera 12 (pre-Blink) doesn't select anything
- ok( true, "SOFTFAIL: no focus event fired in the iframe" );
- }
+ // Remove body handler manually since it's outside the fixture
+ jQuery( "body" ).off( "focusin.iframeTest" );
});
testIframeWithCallback( "jQuery.ready promise", "event/promiseReady.html", function( isOk ) {
@@ -2749,7 +2708,8 @@ if ( !(/firefox/i.test( window.navigator.userAgent )) ) {
$text = jQuery("#text1"),
$radio = jQuery("#radio1").trigger("focus");
- // IE6-10 fire focus/blur events asynchronously; this is the resulting mess.
+ // Support: IE<11
+ // IE8-10 fire focus/blur events asynchronously; this is the resulting mess.
// IE's browser window must be topmost for this to work properly!!
stop();
$radio[0].focus();
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js
index 0243c2855..302d1948f 100644
--- a/test/unit/manipulation.js
+++ b/test/unit/manipulation.js
@@ -77,8 +77,7 @@ function testText( valueObj ) {
equal( jQuery( j[ 0 ] ).text(), "hi!", "Check node,textnode,comment with text()" );
equal( j[ 1 ].nodeValue, " there ", "Check node,textnode,comment with text()" );
- // Blackberry 4.6 doesn't maintain comments in the DOM
- equal( jQuery("#nonnodes")[ 0 ].childNodes.length < 3 ? 8 : j[ 2 ].nodeType, 8, "Check node,textnode,comment with text()" );
+ equal( j[ 2 ].nodeType, 8, "Check node,textnode,comment with text()" );
// Update multiple elements #11809
expected = "New";
diff --git a/test/unit/offset.js b/test/unit/offset.js
index e6d1253d0..e1ea9a234 100644
--- a/test/unit/offset.js
+++ b/test/unit/offset.js
@@ -182,16 +182,13 @@ testIframe("offset/absolute", "absolute", function( $ ) {
testIframe("offset/relative", "relative", function( $ ) {
expect(60);
- var ie, tests;
-
- // IE is collapsing the top margin of 1px; detect and adjust accordingly
- ie = $("#relative-1").offset().top === 6;
+ var tests;
// get offset
tests = [
- { "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 }
+ { "id": "#relative-1", "top": 7, "left": 7 },
+ { "id": "#relative-1-1", "top": 15, "left": 15 },
+ { "id": "#relative-2", "top": 142, "left": 27 }
];
jQuery.each( tests, function() {
equal( $( this["id"] ).offset().top, this["top"], "jQuery('" + this["id"] + "').offset().top" );
@@ -201,9 +198,9 @@ testIframe("offset/relative", "relative", function( $ ) {
// get position
tests = [
- { "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 }
+ { "id": "#relative-1", "top": 6, "left": 6 },
+ { "id": "#relative-1-1", "top": 5, "left": 5 },
+ { "id": "#relative-2", "top": 141, "left": 26 }
];
jQuery.each( tests, function() {
equal( $( this["id"] ).position().top, this["top"], "jQuery('" + this["id"] + "').position().top" );
@@ -245,17 +242,14 @@ testIframe("offset/relative", "relative", function( $ ) {
testIframe("offset/static", "static", function( $ ) {
expect( 80 );
- var ie, tests;
-
- // IE is collapsing the top margin of 1px; detect and adjust accordingly
- ie = $("#static-1").offset().top === 6;
+ var tests;
// get offset
tests = [
- { "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 }
+ { "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 }
];
jQuery.each( tests, function() {
equal( $( this["id"] ).offset().top, this["top"], "jQuery('" + this["id"] + "').offset().top" );
@@ -265,10 +259,10 @@ testIframe("offset/static", "static", function( $ ) {
// get position
tests = [
- { "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 }
+ { "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 }
];
jQuery.each( tests, function() {
equal( $( this["id"] ).position().top, this["top"], "jQuery('" + this["top"] + "').position().top" );
@@ -314,25 +308,22 @@ testIframe("offset/static", "static", function( $ ) {
testIframe("offset/fixed", "fixed", function( $ ) {
expect(34);
- var ie, tests, $noTopLeft;
-
- // IE is collapsing the top margin of 1px; detect and adjust accordingly
- ie = $("#fixed-1").position().top === 2;
+ var tests, $noTopLeft;
tests = [
{
"id": "#fixed-1",
"offsetTop": 1001,
"offsetLeft": 1001,
- "positionTop": ie ? 2 : 0,
- "positionLeft": ie ? 2 : 0
+ "positionTop": 0,
+ "positionLeft": 0
},
{
"id": "#fixed-2",
"offsetTop": 1021,
"offsetLeft": 1021,
- "positionTop": ie ? 22 : 20,
- "positionLeft": ie ? 22 : 20
+ "positionTop": 20,
+ "positionLeft": 20
}
];
@@ -415,7 +406,7 @@ testIframe("offset/scroll", "scroll", function( $, win ) {
expect(24);
// If we're going to bastardize the tests, let's just DO it
- var ie = /msie [678]/i.test( navigator.userAgent );
+ var ie = /msie 8/i.test( navigator.userAgent );
if ( ie ) {
ok( true, "TestSwarm's iframe has hosed this test in oldIE, we surrender" );
diff --git a/test/unit/selector.js b/test/unit/selector.js
index 912bfb40a..673a86f85 100644
--- a/test/unit/selector.js
+++ b/test/unit/selector.js
@@ -272,7 +272,7 @@ test("disconnected nodes - jQuery only", function() {
});
testIframe("selector/html5_selector", "attributes - jQuery.attr", function( jQuery, window, document ) {
- expect( 35 );
+ expect( 37 );
/**
* Returns an array of elements with the given IDs
@@ -330,10 +330,10 @@ testIframe("selector/html5_selector", "attributes - jQuery.attr", function( jQue
t( "Attribute Exists", "[indeterminate]", []);
t( "Attribute Exists", "[ismap]", ["img1"]);
t( "Attribute Exists", "[itemscope]", ["div1"]);
- // 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", "[loop]", ["video1"]);
t( "Attribute Exists", "[multiple]", ["select1"]);
t( "Attribute Exists", "[muted]", ["audio1"]);
- // 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", "[nohref]", ["area1"]);
t( "Attribute Exists", "[noresize]", ["textarea1"]);
t( "Attribute Exists", "[noshade]", ["hr1"]);
t( "Attribute Exists", "[nowrap]", ["td1", "div1"]);
diff --git a/test/unit/serialize.js b/test/unit/serialize.js
index 39e7d777e..4f1f817f4 100644
--- a/test/unit/serialize.js
+++ b/test/unit/serialize.js
@@ -110,7 +110,7 @@ test("jQuery.param() Constructed prop values", function() {
});
test("serialize()", function() {
- expect(5);
+ expect( 6 );
// Add html5 elements only for serialize because selector can't yet find them on non-html5 browsers
jQuery("#search").after(
@@ -139,10 +139,8 @@ test("serialize()", function() {
"action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&search=search&email=dave%40jquery.com&number=43&select1=&select2=3&select3=1&select3=2&select5=3&T3=%3F%0D%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=",
"Multiple form serialization as query string");
- /* Temporarily disabled. Opera 10 has problems with form serialization.
equal( jQuery("#form, #testForm :input").serialize(),
- "action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&search=search&email=dave%40jquery.com&number=43&select1=&select2=3&select3=1&select3=2&T3=%3F%0D%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=",
+ "action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&search=search&email=dave%40jquery.com&number=43&select1=&select2=3&select3=1&select3=2&select5=3&T3=%3F%0D%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=",
"Mixed form/input serialization as query string");
- */
jQuery("#html5email, #html5number").remove();
});
diff --git a/test/unit/support.js b/test/unit/support.js
index d74dc1faf..73f104098 100644
--- a/test/unit/support.js
+++ b/test/unit/support.js
@@ -20,11 +20,7 @@ var computedSupport = getComputedSupport( jQuery.support );
test( "zoom of doom (#13089)", function() {
expect( 1 );
- 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" );
- }
+ ok( !document.body.style.zoom, "No zoom added to the body" );
});
if ( jQuery.css ) {
@@ -50,11 +46,6 @@ testIframeWithCallback( "A background on the testElement does not cause IE8 to c
ok( true, "IE8 does not crash" );
});
-testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlocks", "support/shrinkWrapBlocks.html", function( shrinkWrapBlocks ) {
- expect( 1 );
- strictEqual( shrinkWrapBlocks, computedSupport.shrinkWrapBlocks, "jQuery.support.shrinkWrapBlocks properties are the same" );
-});
-
// This test checkes CSP only for browsers with "Content-Security-Policy" header support
// i.e. no old WebKit or old Firefox
@@ -78,10 +69,10 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
userAgent = window.navigator.userAgent;
if ( /chrome/i.test( userAgent ) ) {
+ // Catches Chrome on Android as well (i.e. the default
+ // Android browser on Android >= 4.4).
expected = {
"ajax": true,
- "appendChecked": true,
- "boxSizing": true,
"boxSizingReliable": true,
"changeBubbles": true,
"checkClone": true,
@@ -90,13 +81,9 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"cors": true,
"cssFloat": true,
"deleteExpando": true,
- "enctype": true,
"focusinBubbles": false,
- "getSetAttribute": true,
- "hrefNormalized": true,
"html5Clone": true,
"htmlSerialize": true,
- "inlineBlockNeedsLayout": false,
"input": true,
"leadingWhitespace": true,
"noCloneChecked": true,
@@ -109,53 +96,12 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": true,
"reliableHiddenOffsets": true,
"reliableMarginRight": true,
- "shrinkWrapBlocks": false,
- "style": true,
- "submitBubbles": true,
- "tbody": true
- };
- } else if ( /opera.*version\/12\.1/i.test( userAgent ) ) {
- expected = {
- "ajax": true,
- "appendChecked": true,
- "boxSizing": true,
- "boxSizingReliable": true,
- "changeBubbles": true,
- "checkClone": true,
- "checkOn": true,
- "clearCloneStyle": true,
- "cors": true,
- "cssFloat": true,
- "deleteExpando": true,
- "enctype": true,
- "focusinBubbles": 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,
- "ownLast": false,
- "pixelPosition": true,
- "radioValue": false,
- "reliableHiddenOffsets": true,
- "reliableMarginRight": true,
- "shrinkWrapBlocks": false,
"style": true,
- "submitBubbles": true,
- "tbody": true
+ "submitBubbles": true
};
} else if ( /trident\/7\.0/i.test( userAgent ) ) {
expected = {
"ajax": true,
- "appendChecked": true,
- "boxSizing": true,
"boxSizingReliable": false,
"changeBubbles": true,
"checkClone": true,
@@ -164,13 +110,9 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"cors": true,
"cssFloat": true,
"deleteExpando": true,
- "enctype": true,
"focusinBubbles": true,
- "getSetAttribute": true,
- "hrefNormalized": true,
"html5Clone": true,
"htmlSerialize": true,
- "inlineBlockNeedsLayout": false,
"input": true,
"leadingWhitespace": true,
"noCloneChecked": false,
@@ -183,16 +125,12 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": false,
"reliableHiddenOffsets": true,
"reliableMarginRight": true,
- "shrinkWrapBlocks": false,
"style": true,
- "submitBubbles": true,
- "tbody": true
+ "submitBubbles": true
};
} else if ( /msie 10\.0/i.test( userAgent ) ) {
expected = {
"ajax": true,
- "appendChecked": true,
- "boxSizing": true,
"boxSizingReliable": false,
"changeBubbles": true,
"checkClone": true,
@@ -201,13 +139,9 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"cors": true,
"cssFloat": true,
"deleteExpando": true,
- "enctype": true,
"focusinBubbles": true,
- "getSetAttribute": true,
- "hrefNormalized": true,
"html5Clone": true,
"htmlSerialize": true,
- "inlineBlockNeedsLayout": false,
"input": true,
"leadingWhitespace": true,
"noCloneChecked": false,
@@ -220,16 +154,12 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": false,
"reliableHiddenOffsets": true,
"reliableMarginRight": true,
- "shrinkWrapBlocks": false,
"style": true,
- "submitBubbles": true,
- "tbody": true
+ "submitBubbles": true
};
} else if ( /msie 9\.0/i.test( userAgent ) ) {
expected = {
"ajax": true,
- "appendChecked": true,
- "boxSizing": true,
"boxSizingReliable": false,
"changeBubbles": true,
"checkClone": true,
@@ -238,13 +168,9 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"cors": false,
"cssFloat": true,
"deleteExpando": true,
- "enctype": true,
"focusinBubbles": true,
- "getSetAttribute": true,
- "hrefNormalized": true,
"html5Clone": true,
"htmlSerialize": true,
- "inlineBlockNeedsLayout": false,
"input": true,
"leadingWhitespace": true,
"noCloneChecked": false,
@@ -257,16 +183,12 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": false,
"reliableHiddenOffsets": true,
"reliableMarginRight": true,
- "shrinkWrapBlocks": false,
"style": true,
- "submitBubbles": true,
- "tbody": true
+ "submitBubbles": true
};
} else if ( /msie 8\.0/i.test( userAgent ) ) {
expected = {
"ajax": true,
- "appendChecked": true,
- "boxSizing": true,
"boxSizingReliable": false,
"changeBubbles": false,
"checkClone": true,
@@ -275,13 +197,9 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"cors": false,
"cssFloat": false,
"deleteExpando": false,
- "enctype": true,
"focusinBubbles": true,
- "getSetAttribute": true,
- "hrefNormalized": true,
"html5Clone": false,
"htmlSerialize": false,
- "inlineBlockNeedsLayout": false,
"input": false,
"leadingWhitespace": false,
"noCloneChecked": false,
@@ -294,90 +212,12 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": false,
"reliableHiddenOffsets": false,
"reliableMarginRight": true,
- "shrinkWrapBlocks": false,
- "style": false,
- "submitBubbles": false,
- "tbody": true
- };
- } else if ( /msie 7\.0/i.test( userAgent ) ) {
- expected = {
- "ajax": true,
- "appendChecked": false,
- "boxSizing": false,
- "boxSizingReliable": false,
- "changeBubbles": false,
- "checkClone": true,
- "checkOn": true,
- "clearCloneStyle": true,
- "cors": false,
- "cssFloat": false,
- "deleteExpando": false,
- "enctype": true,
- "focusinBubbles": 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,
- "ownLast": true,
- "pixelPosition": false,
- "radioValue": false,
- "reliableHiddenOffsets": false,
- "reliableMarginRight": true,
- "shrinkWrapBlocks": false,
- "style": false,
- "submitBubbles": false,
- "tbody": false
- };
- } else if ( /msie 6\.0/i.test( userAgent ) ) {
- expected = {
- "ajax": true,
- "appendChecked": false,
- "boxSizing": false,
- "boxSizingReliable": false,
- "changeBubbles": false,
- "checkClone": true,
- "checkOn": true,
- "clearCloneStyle": true,
- "cors": false,
- "cssFloat": false,
- "deleteExpando": false,
- "enctype": true,
- "focusinBubbles": 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,
- "ownLast": true,
- "pixelPosition": false,
- "radioValue": false,
- "reliableHiddenOffsets": false,
- "reliableMarginRight": true,
- "shrinkWrapBlocks": true,
"style": false,
- "submitBubbles": false,
- "tbody": false
+ "submitBubbles": false
};
} else if ( /7\.0(\.\d+|) safari/i.test( userAgent ) ) {
expected = {
"ajax": true,
- "appendChecked": true,
- "boxSizing": true,
"boxSizingReliable": true,
"changeBubbles": true,
"checkClone": true,
@@ -386,13 +226,9 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"cors": true,
"cssFloat": true,
"deleteExpando": true,
- "enctype": true,
"focusinBubbles": false,
- "getSetAttribute": true,
- "hrefNormalized": true,
"html5Clone": true,
"htmlSerialize": true,
- "inlineBlockNeedsLayout": false,
"input": true,
"leadingWhitespace": true,
"noCloneChecked": true,
@@ -405,16 +241,12 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": true,
"reliableHiddenOffsets": true,
"reliableMarginRight": true,
- "shrinkWrapBlocks": false,
"style": true,
- "submitBubbles": true,
- "tbody": true
+ "submitBubbles": true
};
} else if ( /6\.0(\.\d+|) safari/i.test( userAgent ) ) {
expected = {
"ajax": true,
- "appendChecked": true,
- "boxSizing": true,
"boxSizingReliable": true,
"changeBubbles": true,
"checkClone": true,
@@ -423,50 +255,9 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"cors": true,
"cssFloat": true,
"deleteExpando": true,
- "enctype": true,
- "focusinBubbles": 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,
- "ownLast": false,
- "pixelPosition": false,
- "radioValue": true,
- "reliableHiddenOffsets": true,
- "reliableMarginRight": true,
- "shrinkWrapBlocks": false,
- "style": true,
- "submitBubbles": true,
- "tbody": true
- };
- } else if ( /5\.1(\.\d+|) safari/i.test( userAgent ) ) {
- expected = {
- "ajax": true,
- "appendChecked": true,
- "boxSizing": true,
- "boxSizingReliable": true,
- "changeBubbles": true,
- "checkClone": false,
- "checkOn": false,
- "clearCloneStyle": true,
- "cors": true,
- "cssFloat": true,
- "deleteExpando": true,
- "enctype": true,
"focusinBubbles": false,
- "getSetAttribute": true,
- "hrefNormalized": true,
"html5Clone": true,
"htmlSerialize": true,
- "inlineBlockNeedsLayout": false,
"input": true,
"leadingWhitespace": true,
"noCloneChecked": true,
@@ -479,16 +270,12 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": true,
"reliableHiddenOffsets": true,
"reliableMarginRight": true,
- "shrinkWrapBlocks": false,
"style": true,
- "submitBubbles": true,
- "tbody": true
+ "submitBubbles": true
};
} else if ( /firefox/i.test( userAgent ) ) {
expected = {
"ajax": true,
- "appendChecked": true,
- "boxSizing": true,
"boxSizingReliable": true,
"changeBubbles": true,
"checkClone": true,
@@ -497,13 +284,9 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"cors": true,
"cssFloat": true,
"deleteExpando": true,
- "enctype": true,
"focusinBubbles": false,
- "getSetAttribute": true,
- "hrefNormalized": true,
"html5Clone": true,
"htmlSerialize": true,
- "inlineBlockNeedsLayout": false,
"input": true,
"leadingWhitespace": true,
"noCloneChecked": true,
@@ -516,16 +299,12 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": true,
"reliableHiddenOffsets": true,
"reliableMarginRight": true,
- "shrinkWrapBlocks": false,
"style": true,
- "submitBubbles": true,
- "tbody": true
+ "submitBubbles": true
};
- } else if ( /iphone os (?:6|7)_/i.test( userAgent ) ) {
+ } else if ( /iphone os/i.test( userAgent ) ) {
expected = {
"ajax": true,
- "appendChecked": true,
- "boxSizing": true,
"boxSizingReliable": true,
"changeBubbles": true,
"checkClone": true,
@@ -534,13 +313,9 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"cors": true,
"cssFloat": true,
"deleteExpando": true,
- "enctype": true,
"focusinBubbles": false,
- "getSetAttribute": true,
- "hrefNormalized": true,
"html5Clone": true,
"htmlSerialize": true,
- "inlineBlockNeedsLayout": false,
"input": true,
"leadingWhitespace": true,
"noCloneChecked": true,
@@ -553,16 +328,12 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": true,
"reliableHiddenOffsets": true,
"reliableMarginRight": true,
- "shrinkWrapBlocks": false,
"style": true,
- "submitBubbles": true,
- "tbody": true
+ "submitBubbles": true
};
} else if ( /android 2\.3/i.test( userAgent ) ) {
expected = {
"ajax": true,
- "appendChecked": true,
- "boxSizing": true,
"boxSizingReliable": true,
"changeBubbles": true,
"checkClone": true,
@@ -571,13 +342,9 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"cors": true,
"cssFloat": true,
"deleteExpando": true,
- "enctype": true,
"focusinBubbles": false,
- "getSetAttribute": true,
- "hrefNormalized": true,
"html5Clone": true,
"htmlSerialize": true,
- "inlineBlockNeedsLayout": false,
"input": true,
"leadingWhitespace": true,
"noCloneChecked": true,
@@ -590,16 +357,12 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": true,
"reliableHiddenOffsets": true,
"reliableMarginRight": false,
- "shrinkWrapBlocks": false,
"style": true,
- "submitBubbles": true,
- "tbody": true
+ "submitBubbles": true
};
} else if ( /android 4\.[0-3]/i.test( userAgent ) ) {
expected = {
"ajax": true,
- "appendChecked": true,
- "boxSizing": true,
"boxSizingReliable": true,
"changeBubbles": true,
"checkClone": false,
@@ -608,13 +371,9 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"cors": true,
"cssFloat": true,
"deleteExpando": true,
- "enctype": true,
"focusinBubbles": false,
- "getSetAttribute": true,
- "hrefNormalized": true,
"html5Clone": true,
"htmlSerialize": true,
- "inlineBlockNeedsLayout": false,
"input": true,
"leadingWhitespace": true,
"noCloneChecked": true,
@@ -627,10 +386,8 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": true,
"reliableHiddenOffsets": true,
"reliableMarginRight": true,
- "shrinkWrapBlocks": false,
"style": true,
- "submitBubbles": true,
- "tbody": true
+ "submitBubbles": true
};
}
diff --git a/test/unit/wrap.js b/test/unit/wrap.js
index 3fbef44be..114e9faf8 100644
--- a/test/unit/wrap.js
+++ b/test/unit/wrap.js
@@ -47,8 +47,7 @@ function testWrap( val ) {
j = jQuery("#nonnodes").contents();
j.wrap( val("<i></i>") );
- // Blackberry 4.6 doesn't maintain comments in the DOM
- equal( jQuery("#nonnodes > i").length, jQuery("#nonnodes")[ 0 ].childNodes.length, "Check node,textnode,comment wraps ok" );
+ equal( jQuery("#nonnodes > i").length, 3, "Check node,textnode,comment wraps ok" );
equal( jQuery("#nonnodes > i").text(), j.text(), "Check node,textnode,comment wraps doesn't hurt text" );
// Try wrapping a disconnected node