File tree Expand file tree Collapse file tree 2 files changed +29
-3
lines changed
Expand file tree Collapse file tree 2 files changed +29
-3
lines changed Original file line number Diff line number Diff line change 77
88 < script src ="../../../js/jquery.js "> </ script >
99 < script src ="../jquery.setNameSpace.js "> </ script >
10+ < script src ="../../jquery.testHelper.js "> </ script >
1011 < script src ="../../../external/qunit.js "> </ script >
1112 < script src ="../../../js/ "> </ script >
1213 < link rel ="stylesheet " href ="../../../themes/default " />
@@ -26,7 +27,22 @@ <h2 id="qunit-userAgent"></h2>
2627
2728< div data-nstest-role ="page ">
2829 < input name ="" id ="typeless-input " />
29- < textarea class ="should-be-native "/>
30+ < textarea class ="should-be-native "> </ textarea >
31+
32+ < textarea id ="reference-autogrow ">
33+ </ textarea >
34+
35+ < textarea id ="init-autogrow ">
36+ Place holder text
37+ Place holder text
38+ Place holder text
39+ Place holder text
40+ Place holder text
41+ Place holder text
42+ Place holder text
43+ Place holder text
44+ Place holder text
45+ </ textarea >
3046</ div >
3147</ body >
3248</ html >
Original file line number Diff line number Diff line change 1010
1111 $ . mobile . page . prototype . options . keepNative = "textarea.should-be-native" ;
1212
13- // not testing the positive case here since's it's obviously tested elsewhere
13+ // not testing the positive case here since's it's obviously tested elsewhere
1414 test ( "textarea in the keepNative set shouldn't be enhanced" , function ( ) {
15- ok ( ! $ ( "textarea.should-be-native" ) . is ( "ui-input-text" ) ) ;
15+ ok ( ! $ ( "textarea.should-be-native" ) . is ( "ui-input-text" ) ) ;
16+ } ) ;
17+
18+ asyncTest ( "textarea should autogrow on document ready" , function ( ) {
19+ var test = $ ( "#init-autogrow" ) ;
20+
21+ setTimeout ( function ( ) {
22+ ok ( $ ( "#reference-autogrow" ) [ 0 ] . clientHeight < test [ 0 ] . clientHeight , "the height is greater than the reference text area with no content" ) ;
23+ ok ( test [ 0 ] . clientHeight > 100 , "autogrow text area's height is greater than any style padding" ) ;
24+ start ( ) ;
25+ } , 400 ) ;
1626 } ) ;
1727} ) ( jQuery ) ;
You can’t perform that action at this time.
0 commit comments