aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/dialog/dialog_deprecated.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2013-02-09 03:29:10 +0100
committerFelix Nagel <info@felixnagel.com>2013-02-09 03:29:10 +0100
commita7b4f29cea06607264c2ba98cd93f4e039cce5bd (patch)
tree1ac9e210ce8fd16a85cb1d3283983475b27437ed /tests/unit/dialog/dialog_deprecated.js
parentb81bb0b983687b1efc09577bf128b8a5b7aa5d7b (diff)
parentab408c9b82430e7a65a9269441cc0c0e2af95770 (diff)
downloadjquery-ui-a7b4f29cea06607264c2ba98cd93f4e039cce5bd.tar.gz
jquery-ui-a7b4f29cea06607264c2ba98cd93f4e039cce5bd.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'tests/unit/dialog/dialog_deprecated.js')
-rw-r--r--tests/unit/dialog/dialog_deprecated.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/unit/dialog/dialog_deprecated.js b/tests/unit/dialog/dialog_deprecated.js
index 57f360544..ff6284ea5 100644
--- a/tests/unit/dialog/dialog_deprecated.js
+++ b/tests/unit/dialog/dialog_deprecated.js
@@ -8,12 +8,12 @@ test( "position, right bottom on window w/array", function() {
// Support: FF, IE7
var winWidth = $( window ).width(),
winHeight = $( window ).height(),
- el = $("<div></div>").dialog({ position: [ "right", "bottom" ] }),
- dialog = el.dialog("widget"),
+ element = $("<div></div>").dialog({ position: [ "right", "bottom" ] }),
+ dialog = element.dialog("widget"),
offset = dialog.offset();
closeEnough( offset.left, winWidth - dialog.outerWidth() + $( window ).scrollLeft(), 1, "offset left of right bottom on window w/array" );
closeEnough( offset.top, winHeight - dialog.outerHeight() + $( window ).scrollTop(), 1, "offset top of right bottom on window w/array" );
- el.remove();
+ element.remove();
});
test( "position, right bottom on window", function() {
@@ -24,40 +24,40 @@ test( "position, right bottom on window", function() {
// Support: FF, IE7
var winWidth = $( window ).width(),
winHeight = $( window ).height(),
- el = $("<div></div>").dialog({ position: "right bottom" }),
- dialog = el.dialog("widget"),
+ element = $("<div></div>").dialog({ position: "right bottom" }),
+ dialog = element.dialog("widget"),
offset = dialog.offset();
closeEnough( offset.left, winWidth - dialog.outerWidth() + $( window ).scrollLeft(), 1, "offset left of right bottom on window" );
closeEnough( offset.top, winHeight - dialog.outerHeight() + $( window ).scrollTop(), 1, "offset top of right bottom on window" );
- el.remove();
+ element.remove();
});
test("position, offset from top left w/array", function() {
expect( 2 );
- var el = $("<div></div>").dialog({ position: [10, 10] }),
- dialog = el.dialog("widget"),
+ var element = $("<div></div>").dialog({ position: [10, 10] }),
+ dialog = element.dialog("widget"),
offset = dialog.offset();
closeEnough(offset.left, 10 + $(window).scrollLeft(), 1);
closeEnough(offset.top, 10 + $(window).scrollTop(), 1);
- el.remove();
+ element.remove();
});
test("position, top on window", function() {
expect( 2 );
- var el = $("<div></div>").dialog({ position: "top" }),
- dialog = el.dialog("widget"),
+ var element = $("<div></div>").dialog({ position: "top" }),
+ dialog = element.dialog("widget"),
offset = dialog.offset();
closeEnough(offset.left, Math.round($(window).width() / 2 - dialog.outerWidth() / 2) + $(window).scrollLeft(), 1);
closeEnough(offset.top, $(window).scrollTop(), 1);
- el.remove();
+ element.remove();
});
test("position, left on window", function() {
expect( 2 );
- var el = $("<div></div>").dialog({ position: "left" }),
- dialog = el.dialog("widget"),
+ var element = $("<div></div>").dialog({ position: "left" }),
+ dialog = element.dialog("widget"),
offset = dialog.offset();
closeEnough(offset.left, 0, 1);
closeEnough(offset.top, Math.round($(window).height() / 2 - dialog.outerHeight() / 2) + $(window).scrollTop(), 1);
- el.remove();
+ element.remove();
});