@@ -8,7 +8,7 @@ var exports = {};
8
8
function testWidgetDefaults ( widget , defaults ) {
9
9
var pluginDefaults = $ . ui [ widget ] . prototype . options ;
10
10
11
- // ensure that all defaults have the correct value
11
+ // Ensure that all defaults have the correct value
12
12
test ( "defined defaults" , function ( ) {
13
13
var count = 0 ;
14
14
$ . each ( defaults , function ( key , val ) {
@@ -21,7 +21,7 @@ function testWidgetDefaults( widget, defaults ) {
21
21
} ) ;
22
22
} ) ;
23
23
24
- // ensure that all defaults were tested
24
+ // Ensure that all defaults were tested
25
25
test ( "tested defaults" , function ( ) {
26
26
var count = 0 ;
27
27
$ . each ( pluginDefaults , function ( key ) {
@@ -59,14 +59,16 @@ function testBasicUsage( widget ) {
59
59
$ ( defaultElement ) [ widget ] ( ) . remove ( ) ;
60
60
ok ( true , "initialized on disconnected DOMElement - never connected" ) ;
61
61
62
+ // Ensure manipulating removed elements works (#3664)
62
63
$ ( defaultElement ) . appendTo ( "body" ) . remove ( ) [ widget ] ( ) . remove ( ) ;
63
64
ok ( true , "initialized on disconnected DOMElement - removed" ) ;
64
65
} ) ;
65
66
}
66
67
67
68
// Asset revisioning through time and random hashing
68
69
function revStamp ( value ) {
69
- return value + ( / \? / . test ( value ) ? "&" : "?" ) + new Date ( ) . getTime ( ) + "" + parseInt ( Math . random ( ) * 100000 , 10 ) ;
70
+ return value + ( / \? / . test ( value ) ? "&" : "?" ) + new Date ( ) . getTime ( ) + "" +
71
+ parseInt ( Math . random ( ) * 100000 , 10 ) ;
70
72
}
71
73
72
74
/**
@@ -89,8 +91,8 @@ exports.commonWidgetTests = function( widget, settings ) {
89
91
/**
90
92
* Experimental assertion for comparing DOM objects.
91
93
*
92
- * Serializes an element and some properties and attributes and it's children if any, otherwise the text.
93
- * Then compares the result using deepEqual.
94
+ * Serializes an element and some properties and attributes and its children if any,
95
+ * otherwise the text. Then compares the result using deepEqual() .
94
96
*/
95
97
exports . domEqual = function ( selector , modifier , message ) {
96
98
var expected , actual ,
0 commit comments