aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/dimensions.js
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2014-12-06 13:23:40 -0500
committerRichard Gibson <richard.gibson@gmail.com>2014-12-06 13:23:40 -0500
commit3c13f4c6297566a71102c2362347987f6d6a636e (patch)
tree0a9beceaba9221e58f50c4957073fff8f61a2f41 /test/unit/dimensions.js
parent26276a307ce2f554b63a05ed8451155f01711c29 (diff)
downloadjquery-3c13f4c6297566a71102c2362347987f6d6a636e.tar.gz
jquery-3c13f4c6297566a71102c2362347987f6d6a636e.zip
Tests: Accommodate page changes from the QUnit HTML reporter
Ref 6748ba349650353c7bed6eec201a3192f6b2cae1
Diffstat (limited to 'test/unit/dimensions.js')
-rw-r--r--test/unit/dimensions.js41
1 files changed, 20 insertions, 21 deletions
diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js
index 3f4e15b9e..aee29547e 100644
--- a/test/unit/dimensions.js
+++ b/test/unit/dimensions.js
@@ -137,11 +137,11 @@ test("innerWidth()", function() {
expect(6);
var $div, div,
- winWidth = jQuery( window ).width(),
- docWidth = jQuery( document ).width();
+ $win = jQuery( window ),
+ $doc = jQuery( document );
- equal(jQuery(window).innerWidth(), winWidth, "Test on window");
- equal(jQuery(document).innerWidth(), docWidth, "Test on document");
+ equal( jQuery( window ).innerWidth(), $win.width(), "Test on window" );
+ equal( jQuery( document ).innerWidth(), $doc.width(), "Test on document" );
$div = jQuery("#nothiddendiv");
// set styles
@@ -173,11 +173,11 @@ test("innerHeight()", function() {
expect(6);
var $div, div,
- winHeight = jQuery( window ).height(),
- docHeight = jQuery( document ).height();
+ $win = jQuery( window ),
+ $doc = jQuery( document );
- equal(jQuery(window).innerHeight(), winHeight, "Test on window");
- equal(jQuery(document).innerHeight(), docHeight, "Test on document");
+ equal( jQuery( window ).innerHeight(), $win.height(), "Test on window" );
+ equal( jQuery( document ).innerHeight(), $doc.height(), "Test on document" );
$div = jQuery("#nothiddendiv");
// set styles
@@ -209,13 +209,13 @@ test("outerWidth()", function() {
expect(11);
var $div, div,
- winWidth = jQuery( window ).width(),
- docWidth = jQuery( document ).width();
+ $win = jQuery( window ),
+ $doc = jQuery( document );
- equal( jQuery( window ).outerWidth(), winWidth, "Test on window without margin option" );
- equal( jQuery( window ).outerWidth( true ), winWidth, "Test on window with margin option" );
- equal( jQuery( document ).outerWidth(), docWidth, "Test on document without margin option" );
- equal( jQuery( document ).outerWidth( true ), docWidth, "Test on document with margin option" );
+ equal( jQuery( window ).outerWidth(), $win.width(), "Test on window without margin option" );
+ equal( jQuery( window ).outerWidth( true ), $win.width(), "Test on window with margin option" );
+ equal( jQuery( document ).outerWidth(), $doc.width(), "Test on document without margin option" );
+ equal( jQuery( document ).outerWidth( true ), $doc.width(), "Test on document with margin option" );
$div = jQuery("#nothiddendiv");
$div.css("width", 30);
@@ -356,14 +356,13 @@ test("outerHeight()", function() {
expect(11);
var $div, div,
- winHeight = jQuery( window ).height(),
- docHeight = jQuery( document ).height();
+ $win = jQuery( window ),
+ $doc = jQuery( document );
-
- equal( jQuery( window ).outerHeight(), winHeight, "Test on window without margin option" );
- equal( jQuery( window ).outerHeight( true ), winHeight, "Test on window with margin option" );
- equal( jQuery( document ).outerHeight(), docHeight, "Test on document without margin option" );
- equal( jQuery( document ).outerHeight( true ), docHeight, "Test on document with margin option" );
+ equal( jQuery( window ).outerHeight(), $win.height(), "Test on window without margin option" );
+ equal( jQuery( window ).outerHeight( true ), $win.height(), "Test on window with margin option" );
+ equal( jQuery( document ).outerHeight(), $doc.height(), "Test on document without margin option" );
+ equal( jQuery( document ).outerHeight( true ), $doc.height(), "Test on document with margin option" );
$div = jQuery("#nothiddendiv");
$div.css("height", 30);