@@ -273,6 +273,46 @@ describe('MdInput', function () {
273
273
} ) ;
274
274
} ) ) ;
275
275
276
+ it ( 'supports the autoCorrect attribute' , async ( ( ) => {
277
+ var template = '<md-input [autoCorrect]="autoCorrect"></md-input>' ;
278
+
279
+ builder . overrideTemplate ( MdInputOptionalAttributeController , template )
280
+ . createAsync ( MdInputOptionalAttributeController )
281
+ . then ( fixture => {
282
+ fixture . detectChanges ( ) ;
283
+
284
+ let input : MdInput = fixture . debugElement . query ( By . directive ( MdInput ) ) . componentInstance ;
285
+ let el : HTMLInputElement = fixture . debugElement . query ( By . css ( 'input' ) ) . nativeElement ;
286
+
287
+ expect ( el ) . not . toBeNull ( ) ;
288
+ expect ( el . getAttribute ( 'autocorrect' ) ) . toBeNull ( ) ;
289
+
290
+ input . autoCorrect = 'on' ;
291
+ fixture . detectChanges ( ) ;
292
+ expect ( el . getAttribute ( 'autocorrect' ) ) . toEqual ( 'on' ) ;
293
+ } ) ;
294
+ } ) ) ;
295
+
296
+ it ( 'supports the autoCapitalize attribute' , async ( ( ) => {
297
+ var template = '<md-input [autoCapitalize]="autoCapitalize"></md-input>' ;
298
+
299
+ builder . overrideTemplate ( MdInputOptionalAttributeController , template )
300
+ . createAsync ( MdInputOptionalAttributeController )
301
+ . then ( fixture => {
302
+ fixture . detectChanges ( ) ;
303
+
304
+ let input : MdInput = fixture . debugElement . query ( By . directive ( MdInput ) ) . componentInstance ;
305
+ let el : HTMLInputElement = fixture . debugElement . query ( By . css ( 'input' ) ) . nativeElement ;
306
+
307
+ expect ( el ) . not . toBeNull ( ) ;
308
+ expect ( el . getAttribute ( 'autocapitalize' ) ) . toBeNull ( ) ;
309
+
310
+ input . autoCapitalize = 'on' ;
311
+ fixture . detectChanges ( ) ;
312
+ expect ( el . getAttribute ( 'autocapitalize' ) ) . toEqual ( 'on' ) ;
313
+ } ) ;
314
+ } ) ) ;
315
+
276
316
it ( 'supports the autoComplete attribute as an unbound attribute' , async ( ( ) => {
277
317
var template = '<md-input autoComplete></md-input>' ;
278
318
0 commit comments