@@ -2340,12 +2340,8 @@ describe('input', function() {
2340
2340
2341
2341
expect ( inputElm . val ( ) ) . toBe ( '2013-01' ) ;
2342
2342
2343
- try {
2344
- //set to text for browsers with datetime-local validation.
2345
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2346
- } catch ( e ) {
2347
- //for IE8
2348
- }
2343
+ //set to text for browsers with datetime-local validation.
2344
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2349
2345
2350
2346
changeInputValueTo ( 'stuff' ) ;
2351
2347
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -2534,12 +2530,8 @@ describe('input', function() {
2534
2530
2535
2531
expect ( inputElm . val ( ) ) . toBe ( '2013-W02' ) ;
2536
2532
2537
- try {
2538
- //set to text for browsers with datetime-local validation.
2539
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2540
- } catch ( e ) {
2541
- //for IE8
2542
- }
2533
+ //set to text for browsers with datetime-local validation.
2534
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2543
2535
2544
2536
changeInputValueTo ( 'stuff' ) ;
2545
2537
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -2703,12 +2695,8 @@ describe('input', function() {
2703
2695
2704
2696
expect ( inputElm . val ( ) ) . toBe ( '2009-01-06T16:25:00.000' ) ;
2705
2697
2706
- try {
2707
- //set to text for browsers with datetime-local validation.
2708
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2709
- } catch ( e ) {
2710
- //for IE8
2711
- }
2698
+ //set to text for browsers with datetime-local validation.
2699
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2712
2700
2713
2701
changeInputValueTo ( 'stuff' ) ;
2714
2702
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -2978,12 +2966,8 @@ describe('input', function() {
2978
2966
2979
2967
expect ( inputElm . val ( ) ) . toBe ( '16:25:00.000' ) ;
2980
2968
2981
- try {
2982
- //set to text for browsers with time validation.
2983
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2984
- } catch ( e ) {
2985
- //for IE8
2986
- }
2969
+ //set to text for browsers with time validation.
2970
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2987
2971
2988
2972
changeInputValueTo ( 'stuff' ) ;
2989
2973
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -3242,12 +3226,8 @@ describe('input', function() {
3242
3226
3243
3227
expect ( inputElm . val ( ) ) . toBe ( '2014-09-14' ) ;
3244
3228
3245
- try {
3246
- //set to text for browsers with date validation.
3247
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3248
- } catch ( e ) {
3249
- //for IE8
3250
- }
3229
+ //set to text for browsers with date validation.
3230
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3251
3231
3252
3232
changeInputValueTo ( '1-2-3' ) ;
3253
3233
expect ( inputElm . val ( ) ) . toBe ( '1-2-3' ) ;
@@ -3510,12 +3490,10 @@ describe('input', function() {
3510
3490
scope . $apply ( 'age = 123' ) ;
3511
3491
expect ( inputElm . val ( ) ) . toBe ( '123' ) ;
3512
3492
3513
- try {
3514
- // to allow non-number values, we have to change type so that
3515
- // the browser which have number validation will not interfere with
3516
- // this test. IE8 won't allow it hence the catch.
3517
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3518
- } catch ( e ) { }
3493
+ // to allow non-number values, we have to change type so that
3494
+ // the browser which have number validation will not interfere with
3495
+ // this test.
3496
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3519
3497
3520
3498
changeInputValueTo ( '123X' ) ;
3521
3499
expect ( inputElm . val ( ) ) . toBe ( '123X' ) ;
0 commit comments