aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2012-05-14 21:02:42 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-05-15 23:29:20 -0400
commitc4e22ad8b5edd52ac78ec44bf7df8a7f37403623 (patch)
tree1208041730a0095ecc85062ceeb20dcbe9d1e9c7 /test
parentf76518e3931f7f2522a38bf37a7df24a620858fc (diff)
downloadjquery-c4e22ad8b5edd52ac78ec44bf7df8a7f37403623.tar.gz
jquery-c4e22ad8b5edd52ac78ec44bf7df8a7f37403623.zip
Fix #11721. Remove jQuery.boxModel, deprecate jQuery.support.boxModel.
This removes all internal uses of `jQuery.support.boxModel`. jQuery has never run unit tests with Quirks Mode and has not even feigned support for several years, so these remnants weren't doing much except giving false hope. For now, `jQuery.support.boxModel` continues to have a value indicating whether the W3C box model is *generally* in use, but be aware that this is easily overridden on an element-by-element basis by the `box-model` CSS property. So don't trust this value.
Diffstat (limited to 'test')
-rw-r--r--test/data/support/boxModelIE.html9
-rw-r--r--test/unit/offset.js8
-rw-r--r--test/unit/support.js4
3 files changed, 8 insertions, 13 deletions
diff --git a/test/data/support/boxModelIE.html b/test/data/support/boxModelIE.html
deleted file mode 100644
index 24e4c6100..000000000
--- a/test/data/support/boxModelIE.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<body>
- <script src="../include_js.php"></script>
- <script>
- jQuery(function() { window.parent.iframeCallback( document.compatMode, jQuery.support.boxModel ) });
- </script>
-</body>
-</html>
diff --git a/test/unit/offset.js b/test/unit/offset.js
index 526b93775..6664a6bdb 100644
--- a/test/unit/offset.js
+++ b/test/unit/offset.js
@@ -342,7 +342,7 @@ testIframe("offset/table", "table", function( jQuery ) {
});
testIframe("offset/scroll", "scroll", function( jQuery, win ) {
- expect(24);
+ expect(26);
var ie = jQuery.browser.msie && parseInt( jQuery.browser.version, 10 ) < 8;
@@ -397,6 +397,12 @@ testIframe("offset/scroll", "scroll", function( jQuery, win ) {
notEqual( jQuery().scrollLeft(null), null, "jQuery().scrollLeft(null) testing setter on empty jquery object" );
strictEqual( jQuery().scrollTop(), null, "jQuery().scrollTop(100) testing setter on empty jquery object" );
strictEqual( jQuery().scrollLeft(), null, "jQuery().scrollLeft(100) testing setter on empty jquery object" );
+
+ // test setting scroll
+ jQuery( win ).scrollTop( 100 );
+ jQuery( win ).scrollLeft( 101 );
+ equal( jQuery( win ).scrollTop(), 100, "jQuery( win ).scrollTop() testing setter" );
+ equal( jQuery( win ).scrollLeft(), 101, "jQuery( win ).scrollLeft() testing setter" );
});
testIframe("offset/body", "body", function( jQuery ) {
diff --git a/test/unit/support.js b/test/unit/support.js
index 7582d4bc4..d4d9dfe85 100644
--- a/test/unit/support.js
+++ b/test/unit/support.js
@@ -1,8 +1,6 @@
module("support", { teardown: moduleTeardown });
-testIframeWithCallback( "proper boxModel in compatMode CSS1Compat (IE6 and IE7)", "support/boxModelIE", function( compatMode, boxModel ) {
- ok( compatMode !== "CSS1Compat" || boxModel, "boxModel properly detected" );
-});
+ok( jQuery.support.boxModel, "jQuery.support.boxModel is perpetually true since 1.8" );
testIframeWithCallback( "body background is not lost if set prior to loading jQuery (#9238)", "support/bodyBackground", function( color, support ) {
expect( 2 );