aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/resizable
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/resizable')
-rw-r--r--tests/unit/resizable/resizable_common.js10
-rw-r--r--tests/unit/resizable/resizable_core.js40
-rw-r--r--tests/unit/resizable/resizable_options.js32
3 files changed, 41 insertions, 41 deletions
diff --git a/tests/unit/resizable/resizable_common.js b/tests/unit/resizable/resizable_common.js
index 2c64f3cb1..6758214ad 100644
--- a/tests/unit/resizable/resizable_common.js
+++ b/tests/unit/resizable/resizable_common.js
@@ -1,19 +1,19 @@
-TestHelpers.commonWidgetTests('resizable', {
+TestHelpers.commonWidgetTests("resizable", {
defaults: {
alsoResize: false,
animate: false,
- animateDuration: 'slow',
- animateEasing: 'swing',
+ animateDuration: "slow",
+ animateEasing: "swing",
aspectRatio: false,
autoHide: false,
- cancel: 'input,textarea,button,select,option',
+ cancel: "input,textarea,button,select,option",
containment: false,
delay: 0,
disabled: false,
distance: 1,
ghost: false,
grid: false,
- handles: 'e,s,se',
+ handles: "e,s,se",
helper: false,
maxHeight: null,
maxWidth: null,
diff --git a/tests/unit/resizable/resizable_core.js b/tests/unit/resizable/resizable_core.js
index 13da26ece..4cffea185 100644
--- a/tests/unit/resizable/resizable_core.js
+++ b/tests/unit/resizable/resizable_core.js
@@ -8,17 +8,17 @@ module("resizable: core");
/*
test("element types", function() {
- var typeNames = ('p,h1,h2,h3,h4,h5,h6,blockquote,ol,ul,dl,div,form'
- + ',table,fieldset,address,ins,del,em,strong,q,cite,dfn,abbr'
- + ',acronym,code,samp,kbd,var,img,object,hr'
- + ',input,button,label,select,iframe').split(',');
+ var typeNames = ("p,h1,h2,h3,h4,h5,h6,blockquote,ol,ul,dl,div,form"
+ + ",table,fieldset,address,ins,del,em,strong,q,cite,dfn,abbr"
+ + ",acronym,code,samp,kbd,var,img,object,hr"
+ + ",input,button,label,select,iframe").split(",");
$.each(typeNames, function(i) {
var typeName = typeNames[i];
- el = $(document.createElement(typeName)).appendTo('body');
- (typeName == 'table' && el.append("<tr><td>content</td></tr>"));
+ el = $(document.createElement(typeName)).appendTo("body");
+ (typeName == "table" && el.append("<tr><td>content</td></tr>"));
el.resizable();
- ok(true, '$("&lt;' + typeName + '/&gt").resizable()');
+ ok(true, "$('&lt;" + typeName + "/&gt').resizable()");
el.resizable("destroy");
el.remove();
});
@@ -28,7 +28,7 @@ test("element types", function() {
test("n", function() {
expect(4);
- var handle = '.ui-resizable-n', target = $('#resizable1').resizable({ handles: 'all' });
+ var handle = ".ui-resizable-n", target = $("#resizable1").resizable({ handles: "all" });
TestHelpers.resizable.drag(handle, 0, -50);
equal( target.height(), 150, "compare height" );
@@ -43,7 +43,7 @@ test("n", function() {
test("s", function() {
expect(5);
- var handle = '.ui-resizable-s', target = $('#resizable1').resizable({ handles: 'all' });
+ var handle = ".ui-resizable-s", target = $("#resizable1").resizable({ handles: "all" });
TestHelpers.resizable.drag(handle, 0, 50);
equal( target.height(), 150, "compare height" );
@@ -59,7 +59,7 @@ test("s", function() {
test("e", function() {
expect(5);
- var handle = '.ui-resizable-e', target = $('#resizable1').resizable({ handles: 'all' });
+ var handle = ".ui-resizable-e", target = $("#resizable1").resizable({ handles: "all" });
TestHelpers.resizable.drag(handle, 50);
equal( target.width(), 150, "compare width");
@@ -75,7 +75,7 @@ test("e", function() {
test("w", function() {
expect(4);
- var handle = '.ui-resizable-w', target = $('#resizable1').resizable({ handles: 'all' });
+ var handle = ".ui-resizable-w", target = $("#resizable1").resizable({ handles: "all" });
TestHelpers.resizable.drag(handle, -50);
equal( target.width(), 150, "compare width" );
@@ -90,7 +90,7 @@ test("w", function() {
test("ne", function() {
expect(5);
- var handle = '.ui-resizable-ne', target = $('#resizable1').css({ overflow: 'hidden' }).resizable({ handles: 'all' });
+ var handle = ".ui-resizable-ne", target = $("#resizable1").css({ overflow: "hidden" }).resizable({ handles: "all" });
TestHelpers.resizable.drag(handle, -50, -50);
equal( target.width(), 50, "compare width" );
@@ -106,7 +106,7 @@ test("ne", function() {
test("se", function() {
expect(6);
- var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ handles: 'all' });
+ var handle = ".ui-resizable-se", target = $("#resizable1").resizable({ handles: "all" });
TestHelpers.resizable.drag(handle, 50, 50);
equal( target.width(), 150, "compare width" );
@@ -123,7 +123,7 @@ test("se", function() {
test("sw", function() {
expect(5);
- var handle = '.ui-resizable-sw', target = $('#resizable1').resizable({ handles: 'all' });
+ var handle = ".ui-resizable-sw", target = $("#resizable1").resizable({ handles: "all" });
TestHelpers.resizable.drag(handle, -50, -50);
equal( target.width(), 150, "compare width" );
@@ -139,7 +139,7 @@ test("sw", function() {
test("nw", function() {
expect(4);
- var handle = '.ui-resizable-nw', target = $('#resizable1').resizable({ handles: 'all' });
+ var handle = ".ui-resizable-nw", target = $("#resizable1").resizable({ handles: "all" });
TestHelpers.resizable.drag(handle, -50, -50);
equal( target.width(), 150, "compare width" );
@@ -153,15 +153,15 @@ test("nw", function() {
test("handle with complex markup (#8756)", function() {
expect(2);
- $('#resizable1')
+ $("#resizable1")
.append(
- $('<div>')
+ $("<div>")
.addClass("ui-resizable-handle")
.addClass("ui-resizable-w")
- .append($('<div>'))
+ .append($("<div>"))
);
- var handle = '.ui-resizable-w div', target = $('#resizable1').resizable({ handles: 'all' });
+ var handle = ".ui-resizable-w div", target = $("#resizable1").resizable({ handles: "all" });
TestHelpers.resizable.drag(handle, -50);
equal( target.width(), 150, "compare width" );
@@ -176,7 +176,7 @@ test("resizable accounts for scroll position correctly (#3815)", function() {
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' }),
+ el = $("<div style='height:100px;width:100px;position:absolute;top:10px;left:10px;'></div>").appendTo( overflowed ).resizable({ handles: "all" }),
handle = ".ui-resizable-e";
container.scrollLeft( 100 ).scrollTop( 100 );
diff --git a/tests/unit/resizable/resizable_options.js b/tests/unit/resizable/resizable_options.js
index d79523183..89504e363 100644
--- a/tests/unit/resizable/resizable_options.js
+++ b/tests/unit/resizable/resizable_options.js
@@ -28,7 +28,7 @@ test( "alsoResize", function() {
test("aspectRatio: 'preserve' (e)", function() {
expect(4);
- var handle = '.ui-resizable-e', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
+ var handle = ".ui-resizable-e", target = $("#resizable1").resizable({ aspectRatio: "preserve", handles: "all", minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
TestHelpers.resizable.drag(handle, 80);
equal( target.width(), 130, "compare maxWidth");
@@ -42,7 +42,7 @@ test("aspectRatio: 'preserve' (e)", function() {
test("aspectRatio: 'preserve' (w)", function() {
expect(4);
- var handle = '.ui-resizable-w', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
+ var handle = ".ui-resizable-w", target = $("#resizable1").resizable({ aspectRatio: "preserve", handles: "all", minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
TestHelpers.resizable.drag(handle, -80);
equal( target.width(), 130, "compare maxWidth");
@@ -56,7 +56,7 @@ test("aspectRatio: 'preserve' (w)", function() {
test("aspectRatio: 'preserve' (n)", function() {
expect(4);
- var handle = '.ui-resizable-n', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
+ var handle = ".ui-resizable-n", target = $("#resizable1").resizable({ aspectRatio: "preserve", handles: "all", minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
TestHelpers.resizable.drag(handle, 0, -80);
equal( target.width(), 130, "compare maxWidth");
@@ -70,7 +70,7 @@ test("aspectRatio: 'preserve' (n)", function() {
test("aspectRatio: 'preserve' (s)", function() {
expect(4);
- var handle = '.ui-resizable-s', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
+ var handle = ".ui-resizable-s", target = $("#resizable1").resizable({ aspectRatio: "preserve", handles: "all", minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
TestHelpers.resizable.drag(handle, 0, 80);
equal( target.width(), 130, "compare maxWidth");
@@ -84,7 +84,7 @@ test("aspectRatio: 'preserve' (s)", function() {
test("aspectRatio: 'preserve' (se)", function() {
expect(4);
- var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
+ var handle = ".ui-resizable-se", target = $("#resizable1").resizable({ aspectRatio: "preserve", handles: "all", minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
TestHelpers.resizable.drag(handle, 80, 80);
equal( target.width(), 130, "compare maxWidth");
@@ -98,7 +98,7 @@ test("aspectRatio: 'preserve' (se)", function() {
test("aspectRatio: 'preserve' (sw)", function() {
expect(4);
- var handle = '.ui-resizable-sw', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
+ var handle = ".ui-resizable-sw", target = $("#resizable1").resizable({ aspectRatio: "preserve", handles: "all", minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
TestHelpers.resizable.drag(handle, -80, 80);
equal( target.width(), 130, "compare maxWidth");
@@ -112,7 +112,7 @@ test("aspectRatio: 'preserve' (sw)", function() {
test("aspectRatio: 'preserve' (ne)", function() {
expect(4);
- var handle = '.ui-resizable-ne', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
+ var handle = ".ui-resizable-ne", target = $("#resizable1").resizable({ aspectRatio: "preserve", handles: "all", minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
TestHelpers.resizable.drag(handle, 80, -80);
equal( target.width(), 130, "compare maxWidth");
@@ -141,7 +141,7 @@ test( "containment", function() {
test("grid", function() {
expect(4);
- var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ handles: 'all', grid: [0, 20] });
+ var handle = ".ui-resizable-se", target = $("#resizable1").resizable({ handles: "all", grid: [0, 20] });
TestHelpers.resizable.drag(handle, 3, 9);
equal( target.width(), 103, "compare width");
@@ -169,7 +169,7 @@ test("grid (min/max dimensions)", function() {
test("grid (wrapped)", function() {
expect(4);
- var handle = '.ui-resizable-se', target = $('#resizable2').resizable({ handles: 'all', grid: [0, 20] });
+ var handle = ".ui-resizable-se", target = $("#resizable2").resizable({ handles: "all", grid: [0, 20] });
TestHelpers.resizable.drag(handle, 3, 9);
equal( target.width(), 103, "compare width");
@@ -183,7 +183,7 @@ test("grid (wrapped)", function() {
test("ui-resizable-se { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 }", function() {
expect(4);
- var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 });
+ var handle = ".ui-resizable-se", target = $("#resizable1").resizable({ handles: "all", minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 });
TestHelpers.resizable.drag(handle, -50, -50);
equal( target.width(), 60, "compare minWidth" );
@@ -197,7 +197,7 @@ test("ui-resizable-se { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 1
test("ui-resizable-sw { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 }", function() {
expect(4);
- var handle = '.ui-resizable-sw', target = $('#resizable1').resizable({ handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 });
+ var handle = ".ui-resizable-sw", target = $("#resizable1").resizable({ handles: "all", minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 });
TestHelpers.resizable.drag(handle, 50, -50);
equal( target.width(), 60, "compare minWidth" );
@@ -211,7 +211,7 @@ test("ui-resizable-sw { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 1
test("ui-resizable-ne { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 }", function() {
expect(4);
- var handle = '.ui-resizable-ne', target = $('#resizable1').resizable({ handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 });
+ var handle = ".ui-resizable-ne", target = $("#resizable1").resizable({ handles: "all", minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 });
TestHelpers.resizable.drag(handle, -50, 50);
equal( target.width(), 60, "compare minWidth" );
@@ -225,7 +225,7 @@ test("ui-resizable-ne { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 1
test("ui-resizable-nw { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 }", function() {
expect(4);
- var handle = '.ui-resizable-nw', target = $('#resizable1').resizable({ handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 });
+ var handle = ".ui-resizable-nw", target = $("#resizable1").resizable({ handles: "all", minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 });
TestHelpers.resizable.drag(handle, 70, 70);
equal( target.width(), 60, "compare minWidth" );
@@ -239,9 +239,9 @@ test("ui-resizable-nw { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 1
test("zIndex, applied to all handles", function() {
expect(8);
- var target = $('<div></div>').resizable({ handles: 'all', zIndex: 100 });
- target.children( '.ui-resizable-handle' ).each( function( index, handle ) {
- equal( $( handle ).css( 'zIndex' ), 100, 'compare zIndex' );
+ var target = $("<div></div>").resizable({ handles: "all", zIndex: 100 });
+ target.children( ".ui-resizable-handle" ).each( function( index, handle ) {
+ equal( $( handle ).css( "zIndex" ), 100, "compare zIndex" );
});
});