@@ -551,12 +551,8 @@ describe('input', function() {
551
551
552
552
expect ( inputElm . val ( ) ) . toBe ( '2013-01' ) ;
553
553
554
- try {
555
- //set to text for browsers with datetime-local validation.
556
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
557
- } catch ( e ) {
558
- //for IE8
559
- }
554
+ //set to text for browsers with datetime-local validation.
555
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
560
556
561
557
helper . changeInputValueTo ( 'stuff' ) ;
562
558
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -752,12 +748,8 @@ describe('input', function() {
752
748
753
749
expect ( inputElm . val ( ) ) . toBe ( '2013-W02' ) ;
754
750
755
- try {
756
- //set to text for browsers with datetime-local validation.
757
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
758
- } catch ( e ) {
759
- //for IE8
760
- }
751
+ //set to text for browsers with datetime-local validation.
752
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
761
753
762
754
helper . changeInputValueTo ( 'stuff' ) ;
763
755
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -928,12 +920,8 @@ describe('input', function() {
928
920
929
921
expect ( inputElm . val ( ) ) . toBe ( '2009-01-06T16:25:00.000' ) ;
930
922
931
- try {
932
- //set to text for browsers with datetime-local validation.
933
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
934
- } catch ( e ) {
935
- //for IE8
936
- }
923
+ //set to text for browsers with datetime-local validation.
924
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
937
925
938
926
helper . changeInputValueTo ( 'stuff' ) ;
939
927
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -1216,12 +1204,8 @@ describe('input', function() {
1216
1204
1217
1205
expect ( inputElm . val ( ) ) . toBe ( '16:25:00.000' ) ;
1218
1206
1219
- try {
1220
- //set to text for browsers with time validation.
1221
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
1222
- } catch ( e ) {
1223
- //for IE8
1224
- }
1207
+ //set to text for browsers with time validation.
1208
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
1225
1209
1226
1210
helper . changeInputValueTo ( 'stuff' ) ;
1227
1211
expect ( inputElm . val ( ) ) . toBe ( 'stuff' ) ;
@@ -1497,12 +1481,8 @@ describe('input', function() {
1497
1481
1498
1482
expect ( inputElm . val ( ) ) . toBe ( '2014-09-14' ) ;
1499
1483
1500
- try {
1501
- //set to text for browsers with date validation.
1502
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
1503
- } catch ( e ) {
1504
- //for IE8
1505
- }
1484
+ //set to text for browsers with date validation.
1485
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
1506
1486
1507
1487
helper . changeInputValueTo ( '1-2-3' ) ;
1508
1488
expect ( inputElm . val ( ) ) . toBe ( '1-2-3' ) ;
@@ -1756,12 +1736,10 @@ describe('input', function() {
1756
1736
$rootScope . $apply ( 'age = 123' ) ;
1757
1737
expect ( inputElm . val ( ) ) . toBe ( '123' ) ;
1758
1738
1759
- try {
1760
- // to allow non-number values, we have to change type so that
1761
- // the browser which have number validation will not interfere with
1762
- // this test. IE8 won't allow it hence the catch.
1763
- inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
1764
- } catch ( e ) { }
1739
+ // to allow non-number values, we have to change type so that
1740
+ // the browser which have number validation will not interfere with
1741
+ // this test.
1742
+ inputElm [ 0 ] . setAttribute ( 'type' , 'text' ) ;
1765
1743
1766
1744
helper . changeInputValueTo ( '123X' ) ;
1767
1745
expect ( inputElm . val ( ) ) . toBe ( '123X' ) ;
0 commit comments