@@ -2379,12 +2379,8 @@ describe('input', function() {
2379
2379
2380
2380
expect ( inputElm . val ( ) ) . toBe ( '2013-01' ) ;
2381
2381
2382
- try {
2383
- //set to text for browsers with datetime-local validation.
2384
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2385
- } catch ( e ) {
2386
- //for IE8
2387
- }
2382
+ //set to text for browsers with datetime-local validation.
2383
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2388
2384
2389
2385
changeInputValueTo ( 'stuff' ) ;
2390
2386
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -2573,12 +2569,8 @@ describe('input', function() {
2573
2569
2574
2570
expect ( inputElm . val ( ) ) . toBe ( '2013-W02' ) ;
2575
2571
2576
- try {
2577
- //set to text for browsers with datetime-local validation.
2578
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2579
- } catch ( e ) {
2580
- //for IE8
2581
- }
2572
+ //set to text for browsers with datetime-local validation.
2573
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2582
2574
2583
2575
changeInputValueTo ( 'stuff' ) ;
2584
2576
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -2742,12 +2734,8 @@ describe('input', function() {
2742
2734
2743
2735
expect ( inputElm . val ( ) ) . toBe ( '2009-01-06T16:25:00.000' ) ;
2744
2736
2745
- try {
2746
- //set to text for browsers with datetime-local validation.
2747
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2748
- } catch ( e ) {
2749
- //for IE8
2750
- }
2737
+ //set to text for browsers with datetime-local validation.
2738
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
2751
2739
2752
2740
changeInputValueTo ( 'stuff' ) ;
2753
2741
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -3017,12 +3005,8 @@ describe('input', function() {
3017
3005
3018
3006
expect ( inputElm . val ( ) ) . toBe ( '16:25:00.000' ) ;
3019
3007
3020
- try {
3021
- //set to text for browsers with time validation.
3022
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3023
- } catch ( e ) {
3024
- //for IE8
3025
- }
3008
+ //set to text for browsers with time validation.
3009
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3026
3010
3027
3011
changeInputValueTo ( 'stuff' ) ;
3028
3012
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -3281,12 +3265,8 @@ describe('input', function() {
3281
3265
3282
3266
expect ( inputElm . val ( ) ) . toBe ( '2014-09-14' ) ;
3283
3267
3284
- try {
3285
- //set to text for browsers with date validation.
3286
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3287
- } catch ( e ) {
3288
- //for IE8
3289
- }
3268
+ //set to text for browsers with date validation.
3269
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3290
3270
3291
3271
changeInputValueTo ( '1-2-3' ) ;
3292
3272
expect ( inputElm . val ( ) ) . toBe ( '1-2-3' ) ;
@@ -3549,12 +3529,10 @@ describe('input', function() {
3549
3529
scope . $apply ( 'age = 123' ) ;
3550
3530
expect ( inputElm . val ( ) ) . toBe ( '123' ) ;
3551
3531
3552
- try {
3553
- // to allow non-number values, we have to change type so that
3554
- // the browser which have number validation will not interfere with
3555
- // this test. IE8 won't allow it hence the catch.
3556
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3557
- } catch ( e ) { }
3532
+ // to allow non-number values, we have to change type so that
3533
+ // the browser which have number validation will not interfere with
3534
+ // this test.
3535
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
3558
3536
3559
3537
changeInputValueTo ( '123X' ) ;
3560
3538
expect ( inputElm . val ( ) ) . toBe ( '123X' ) ;
0 commit comments