aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/resizable
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2014-03-11 11:50:12 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2014-04-16 18:47:15 +0200
commit3576ceb360eb0381a98f3c6b67d890c3834efa8a (patch)
tree66f79781c94f33dd7f00fcf9eb09a2f8993b1d64 /tests/unit/resizable
parent919d9185f2cf586f794b367a2570368fd81f3879 (diff)
downloadjquery-ui-3576ceb360eb0381a98f3c6b67d890c3834efa8a.tar.gz
jquery-ui-3576ceb360eb0381a98f3c6b67d890c3834efa8a.zip
Resizable: Remove bad workaround for draggable+resizable
This adds a compound test page for draggable+resizable, which had no coverage before. Using that page shows that there is no way to reproduce the behaviour described in the original ticket that caused this workaround, since its not possible to resize an element beyond the window boundaries. Therefore removing the workaround, which is 6+ years old and has no test coverage, seems like the sanest approach. Fixes #6939 Closes gh-1210
Diffstat (limited to 'tests/unit/resizable')
-rw-r--r--tests/unit/resizable/resizable_core.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/unit/resizable/resizable_core.js b/tests/unit/resizable/resizable_core.js
index f0b5cea20..f43cde623 100644
--- a/tests/unit/resizable/resizable_core.js
+++ b/tests/unit/resizable/resizable_core.js
@@ -171,13 +171,14 @@ test("handle with complex markup (#8756)", function() {
});
test("resizable accounts for scroll position correctly (#3815)", function() {
- expect( 3 );
+ expect( 4 );
var position, top, left,
container = $("<div style='overflow:scroll;height:300px;width:300px;position:relative;'></div>").appendTo("#qunit-fixture"),
overflowed = $("<div style='width: 1000px; height: 1000px;'></div>").appendTo( container ),
el = $("<div style='height:100px;width:100px;position:absolute;top:10px;left:10px;'></div>").appendTo( overflowed ).resizable({ handles: "all" }),
- handle = ".ui-resizable-e";
+ handle = ".ui-resizable-e",
+ handlePosition = $(handle).position().left;
container.scrollLeft( 100 ).scrollTop( 100 );
@@ -189,6 +190,7 @@ test("resizable accounts for scroll position correctly (#3815)", function() {
deepEqual( el.position(), position, "position stays the same when resized" );
equal( el.css("left"), left, "css('left') stays the same when resized" );
equal( el.css("top"), top, "css('top') stays the same when resized" );
+ equal( $(handle).position().left, handlePosition + 50, "handle also moved" );
});
test( "resizable stores correct size when using helper and grid (#9547)", function() {
@@ -208,7 +210,7 @@ test( "resizable stores correct size when using helper and grid (#9547)", functi
test( "nested resizable", function() {
expect( 4 );
-
+
var outer = $( "<div id='outer' style='width:50px'></div>" ),
inner = $( "<div id='inner' style='width:30px'></div>" ),
target = $( "#resizable1" ),
@@ -224,7 +226,7 @@ test( "nested resizable", function() {
innerHandle = $( "#inner > .ui-resizable-e" );
outerHandle = $( "#outer > .ui-resizable-e" );
-
+
TestHelpers.resizable.drag( innerHandle, 10 );
equal( inner.width(), 40, "compare width of inner element" );
TestHelpers.resizable.drag( innerHandle, -10 );