@@ -2397,12 +2397,8 @@ describe('input', function() {
2397
2397
2398
2398
expect ( inputElm . val ( ) ) . toBe ( '2013-01' ) ;
2399
2399
2400
- try {
2401
- //set to text for browsers with datetime-local validation.
2402
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2403
- } catch ( e ) {
2404
- //for IE8
2405
- }
2400
+ //set to text for browsers with datetime-local validation.
2401
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2406
2402
2407
2403
changeInputValueTo ( 'stuff' ) ;
2408
2404
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -2591,12 +2587,8 @@ describe('input', function() {
2591
2587
2592
2588
expect ( inputElm . val ( ) ) . toBe ( '2013-W02' ) ;
2593
2589
2594
- try {
2595
- //set to text for browsers with datetime-local validation.
2596
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2597
- } catch ( e ) {
2598
- //for IE8
2599
- }
2590
+ //set to text for browsers with datetime-local validation.
2591
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2600
2592
2601
2593
changeInputValueTo ( 'stuff' ) ;
2602
2594
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -2760,12 +2752,8 @@ describe('input', function() {
2760
2752
2761
2753
expect ( inputElm . val ( ) ) . toBe ( '2009-01-06T16:25:00.000' ) ;
2762
2754
2763
- try {
2764
- //set to text for browsers with datetime-local validation.
2765
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2766
- } catch ( e ) {
2767
- //for IE8
2768
- }
2755
+ //set to text for browsers with datetime-local validation.
2756
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2769
2757
2770
2758
changeInputValueTo ( 'stuff' ) ;
2771
2759
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -3035,12 +3023,8 @@ describe('input', function() {
3035
3023
3036
3024
expect ( inputElm . val ( ) ) . toBe ( '16:25:00.000' ) ;
3037
3025
3038
- try {
3039
- //set to text for browsers with time validation.
3040
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3041
- } catch ( e ) {
3042
- //for IE8
3043
- }
3026
+ //set to text for browsers with time validation.
3027
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3044
3028
3045
3029
changeInputValueTo ( 'stuff' ) ;
3046
3030
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -3299,12 +3283,8 @@ describe('input', function() {
3299
3283
3300
3284
expect ( inputElm . val ( ) ) . toBe ( '2014-09-14' ) ;
3301
3285
3302
- try {
3303
- //set to text for browsers with date validation.
3304
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3305
- } catch ( e ) {
3306
- //for IE8
3307
- }
3286
+ //set to text for browsers with date validation.
3287
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3308
3288
3309
3289
changeInputValueTo ( '1-2-3' ) ;
3310
3290
expect ( inputElm . val ( ) ) . toBe ( '1-2-3' ) ;
@@ -3567,12 +3547,10 @@ describe('input', function() {
3567
3547
scope . $apply ( 'age = 123' ) ;
3568
3548
expect ( inputElm . val ( ) ) . toBe ( '123' ) ;
3569
3549
3570
- try {
3571
- // to allow non-number values, we have to change type so that
3572
- // the browser which have number validation will not interfere with
3573
- // this test. IE8 won't allow it hence the catch.
3574
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3575
- } catch ( e ) { }
3550
+ // to allow non-number values, we have to change type so that
3551
+ // the browser which have number validation will not interfere with
3552
+ // this test.
3553
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3576
3554
3577
3555
changeInputValueTo ( '123X' ) ;
3578
3556
expect ( inputElm . val ( ) ) . toBe ( '123X' ) ;
0 commit comments