@@ -103,11 +103,10 @@ void main() {
103
103
expect (element.selectionEnd).toEqual (2 );
104
104
105
105
scope.apply ('model = "xyz"' );
106
-
107
- // Value updated. selectionStart/End changed.
106
+ // Value updated. selectionStart/End changed. IE reports 0 for both, other browsers report 3
108
107
expect (element.value).toEqual ('xyz' );
109
- expect (element.selectionStart).toEqual (3 );
110
- expect (element.selectionEnd).toEqual (3 );
108
+ expect (element.selectionStart).not. toEqual (1 );
109
+ expect (element.selectionEnd).not. toEqual (2 );
111
110
});
112
111
113
112
it ('should only render the input value upon the next digest' , (Scope scope) {
@@ -365,11 +364,10 @@ void main() {
365
364
expect (element.selectionEnd).toEqual (2 );
366
365
367
366
scope.apply ('model = "xyz"' );
368
-
367
+ // Value updated. selectionStart/End changed. IE reports 0 for both, other browsers report 3
369
368
expect (element.value).toEqual ('xyz' );
370
- expect (element.selectionStart).toEqual (3 );
371
- expect (element.selectionEnd).toEqual (3 );
372
- });
369
+ expect (element.selectionStart).not.toEqual (1 );
370
+ expect (element.selectionEnd).not.toEqual (2 ); });
373
371
374
372
it ('should only render the input value upon the next digest' , (Scope scope) {
375
373
_.compile ('<input type="password" ng-model="model" probe="p">' );
@@ -440,10 +438,10 @@ void main() {
440
438
expect (element.selectionEnd).toEqual (2 );
441
439
442
440
scope.apply ('model = "xyz"' );
443
-
441
+ // Value updated. selectionStart/End changed. IE reports 0 for both, other browsers report 3
444
442
expect (element.value).toEqual ('xyz' );
445
- expect (element.selectionStart).toEqual (3 );
446
- expect (element.selectionEnd).toEqual (3 );
443
+ expect (element.selectionStart).not. toEqual (1 );
444
+ expect (element.selectionEnd).not. toEqual (2 );
447
445
});
448
446
449
447
it ('should only render the input value upon the next digest' , (Scope scope) {
@@ -526,10 +524,10 @@ void main() {
526
524
expect (element.selectionEnd).toEqual (2 );
527
525
528
526
scope.apply ('model = "xyz"' );
529
-
527
+ // Value updated. selectionStart/End changed. IE reports 0 for both, other browsers report 3
530
528
expect (element.value).toEqual ('xyz' );
531
- expect (element.selectionStart).toEqual (3 );
532
- expect (element.selectionEnd).toEqual (3 );
529
+ expect (element.selectionStart).not. toEqual (1 );
530
+ expect (element.selectionEnd).not. toEqual (2 );
533
531
});
534
532
535
533
it ('should only render the input value upon the next digest' , (Scope scope) {
@@ -721,11 +719,11 @@ void main() {
721
719
722
720
scope.apply ('model = "xyz"' );
723
721
724
- // Setting the value on a textarea doesn't update the selection the way it
725
- // does on input elements. This stays unchanged.
722
+ scope. apply ( 'model = "xyz"' );
723
+ // Value updated. selectionStart/End changed. IE reports 0 for both, other browsers report 3
726
724
expect (element.value).toEqual ('xyz' );
727
- expect (element.selectionStart).toEqual (0 );
728
- expect (element.selectionEnd).toEqual (0 );
725
+ expect (element.selectionStart).not. toEqual (1 );
726
+ expect (element.selectionEnd).not. toEqual (2 );
729
727
});
730
728
731
729
it ('should only render the input value upon the next digest' , (Scope scope) {
0 commit comments