aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-01-24 21:22:40 -0500
committerScott González <scott.gonzalez@gmail.com>2011-01-24 21:22:40 -0500
commit8034cc38038ff1246cd98caecd517f9685d50f8b (patch)
tree8abf95e3690c8b1d43777eb09814d0db10253af9
parent2e214f984db8140d77c73fa4a87161e281f92551 (diff)
downloadjquery-ui-8034cc38038ff1246cd98caecd517f9685d50f8b.tar.gz
jquery-ui-8034cc38038ff1246cd98caecd517f9685d50f8b.zip
Widget tests: Cleanup.
-rw-r--r--tests/unit/widget/widget.html24
-rw-r--r--tests/unit/widget/widget_core.js29
-rw-r--r--tests/unit/widget/widget_tickets.js5
3 files changed, 26 insertions, 32 deletions
diff --git a/tests/unit/widget/widget.html b/tests/unit/widget/widget.html
index c6fa54e41..d8fa2ecaf 100644
--- a/tests/unit/widget/widget.html
+++ b/tests/unit/widget/widget.html
@@ -1,22 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Widget Test Suite</title>
- <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
- <script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
+ <script src="../../../jquery-1.4.4.js"></script>
+ <script src="../../../ui/jquery.ui.core.js"></script>
+ <script src="../../../ui/jquery.ui.widget.js"></script>
- <link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
- <script type="text/javascript" src="../../../external/qunit.js"></script>
- <script type="text/javascript" src="../../jquery.simulate.js"></script>
- <script type="text/javascript" src="../testsuite.js"></script>
+ <link rel="stylesheet" href="../../../external/qunit.css">
+ <script src="../../../external/qunit.js"></script>
+ <script src="../../jquery.simulate.js"></script>
+ <script src="../testsuite.js"></script>
- <script type="text/javascript" src="widget_core.js"></script>
- <script type="text/javascript" src="widget_tickets.js"></script>
-
- <script type="text/javascript" src="../swarminject.js"></script>
+ <script src="widget_core.js"></script>
+ <script src="widget_tickets.js"></script>
+
+ <script src="../swarminject.js"></script>
</head>
<body>
diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js
index 269b897c5..26059b96b 100644
--- a/tests/unit/widget/widget_core.js
+++ b/tests/unit/widget/widget_core.js
@@ -1,6 +1,3 @@
-/*
- * widget unit tests
- */
(function( $ ) {
module( "widget factory", {
@@ -104,7 +101,7 @@ test( "jQuery usage", function() {
});
shouldCreate = true;
- var elem = $( "<div></div>" )
+ var elem = $( "<div>" )
.bind( "testwidgetcreate", function() {
ok( shouldCreate, "create event triggered on instantiation" );
})
@@ -150,7 +147,7 @@ test( "direct usage", function() {
}
});
- var elem = $( "<div></div>" )[ 0 ];
+ var elem = $( "<div>" )[ 0 ];
shouldCreate = true;
var instance = new $.ui.testWidget( {}, elem );
@@ -202,7 +199,7 @@ test("merge multiple option arguments", function() {
});
}
});
- $( "<div></div>" ).testWidget({
+ $( "<div>" ).testWidget({
option1: "valuex",
option2: "valuex",
option3: "value3",
@@ -249,7 +246,7 @@ test( "_getCreateOptions()", function() {
});
test( "re-init", function() {
- var div = $( "<div></div>" ),
+ var div = $( "<div>" ),
actions = [];
$.widget( "ui.testWidget", {
@@ -335,7 +332,7 @@ test( ".option() - getter", function() {
_create: function() {}
});
- var div = $( "<div></div>" ).testWidget({
+ var div = $( "<div>" ).testWidget({
foo: "bar",
baz: 5,
qux: [ "quux", "quuux" ]
@@ -366,7 +363,7 @@ test( ".option() - delegate to ._setOptions()", function() {
calls.push( options );
}
});
- var div = $( "<div></div>" ).testWidget();
+ var div = $( "<div>" ).testWidget();
calls = [];
div.testWidget( "option", "foo", "bar" );
@@ -392,7 +389,7 @@ test( ".option() - delegate to ._setOption()", function() {
});
}
});
- var div = $( "<div></div>" ).testWidget();
+ var div = $( "<div>" ).testWidget();
calls = [];
div.testWidget( "option", "foo", "bar" );
@@ -419,7 +416,7 @@ test( ".enable()", function() {
same( val, false, "disabled set to false" );
}
});
- $( "<div></div>" ).testWidget().testWidget( "enable" );
+ $( "<div>" ).testWidget().testWidget( "enable" );
});
test( ".disable()", function() {
@@ -431,26 +428,26 @@ test( ".disable()", function() {
same( val, true, "disabled set to true" );
}
});
- $( "<div></div>" ).testWidget().testWidget( "disable" );
+ $( "<div>" ).testWidget().testWidget( "disable" );
});
test( ".widget() - base", function() {
$.widget( "ui.testWidget", {
_create: function() {}
});
- var div = $( "<div></div>" ).testWidget();
+ var div = $( "<div>" ).testWidget();
same( div[0], div.testWidget( "widget" )[0]);
});
test( ".widget() - overriden", function() {
- var wrapper = $( "<div></div>" );
+ var wrapper = $( "<div>" );
$.widget( "ui.testWidget", {
_create: function() {},
widget: function() {
return wrapper;
}
});
- same( wrapper[0], $( "<div></div>" ).testWidget().testWidget( "widget" )[0] );
+ same( wrapper[0], $( "<div>" ).testWidget().testWidget( "widget" )[0] );
});
test( "._trigger() - no event, no ui", function() {
@@ -670,4 +667,4 @@ test( "auto-destroy - .detach()", function() {
$( "#widget" ).testWidget().detach();
});
-})( jQuery );
+}( jQuery ) );
diff --git a/tests/unit/widget/widget_tickets.js b/tests/unit/widget/widget_tickets.js
index 21f44b54c..0267c8ff4 100644
--- a/tests/unit/widget/widget_tickets.js
+++ b/tests/unit/widget/widget_tickets.js
@@ -1,6 +1,3 @@
-/*
- * widget unit tests
- */
(function( $ ) {
module( "widget: tickets" );
@@ -43,4 +40,4 @@ test( "#5830 - Widget: Using inheritance overwrites the base classes options", f
delete $.ui.testWidgetExtension;
});
-})( jQuery );
+}( jQuery ) );