diff options
author | Eduardo Lundgren <eduardolundgren@gmail.com> | 2008-06-06 20:37:32 +0000 |
---|---|---|
committer | Eduardo Lundgren <eduardolundgren@gmail.com> | 2008-06-06 20:37:32 +0000 |
commit | 0a279c243d9c38c14328a6eda44b2de9307712d9 (patch) | |
tree | 03b05ca625314d6e26e0657b0a1f3db5a6c9125f | |
parent | 5e6ef44bb4962a8899ae2c9529ba753f91e3488c (diff) | |
download | jquery-ui-0a279c243d9c38c14328a6eda44b2de9307712d9.tar.gz jquery-ui-0a279c243d9c38c14328a6eda44b2de9307712d9.zip |
Added resizable test for wrapped elements
-rw-r--r-- | ui/tests/images/test.jpg | bin | 0 -> 915 bytes | |||
-rw-r--r-- | ui/tests/resizable.html | 1 | ||||
-rw-r--r-- | ui/tests/resizable.js | 17 |
3 files changed, 18 insertions, 0 deletions
diff --git a/ui/tests/images/test.jpg b/ui/tests/images/test.jpg Binary files differnew file mode 100644 index 000000000..7d8ec0996 --- /dev/null +++ b/ui/tests/images/test.jpg diff --git a/ui/tests/resizable.html b/ui/tests/resizable.html index 955798293..685ec88c9 100644 --- a/ui/tests/resizable.html +++ b/ui/tests/resizable.html @@ -32,6 +32,7 @@ <div id="main" style="border: 1px solid black; padding: 10px; margin: 10px;"> <div id='resizable1' style="background: green; width: 100px; height: 100px;">I'm a resizable.</div> + <img src="images/test.jpg" id='resizable2' style="width: 100px; height: 100px;"/> </div> <ol id="tests"></ol> diff --git a/ui/tests/resizable.js b/ui/tests/resizable.js index e8b1db0e2..48582e016 100644 --- a/ui/tests/resizable.js +++ b/ui/tests/resizable.js @@ -379,5 +379,22 @@ test("ui-resizable-se { handles: 'all', grid: [0, 20] }", function() { equals( target.width(), 118, "compare width"); equals( target.height(), 120, "compare height"); +}); + +test("ui-resizable-se { handles: 'all', grid: [0, 20] } wrapped", function() { + + var handle = '.ui-resizable-se', target = $('#resizable2').resizable({ handles: 'all', grid: [0, 20] }); + + expect(4); + + drag(handle, 3, 9); + + equals( target.width(), 103, "compare width"); + equals( target.height(), 100, "compare height"); + + drag(handle, 15, 11); + + equals( target.width(), 118, "compare width"); + equals( target.height(), 120, "compare height"); }); |