@@ -476,14 +476,18 @@ void testMain() {
476
476
// Editing shouldn't have started yet.
477
477
expect (document.activeElement, document.body);
478
478
479
+ const MethodCall show = MethodCall ('TextInput.show' );
480
+ sendFrameworkMessage (codec.encodeMethodCall (show));
481
+
482
+ // The "setSizeAndTransform" message has to be here before we call
483
+ // checkInputEditingState, since on some platforms (e.g. Desktop Safari)
484
+ // we don't put the input element on DOM until we get its correct
485
+ // dimensions from the framework.
479
486
final MethodCall setSizeAndTransform =
480
487
configureSetSizeAndTransformMethodCall (150 , 50 ,
481
488
Matrix4 .translationValues (10.0 , 20.0 , 30.0 ).storage.toList ());
482
489
sendFrameworkMessage (codec.encodeMethodCall (setSizeAndTransform));
483
490
484
- const MethodCall show = MethodCall ('TextInput.show' );
485
- sendFrameworkMessage (codec.encodeMethodCall (show));
486
-
487
491
checkInputEditingState (textEditing! .strategy.domElement, '' , 0 , 0 );
488
492
489
493
const MethodCall setEditingState =
@@ -523,14 +527,18 @@ void testMain() {
523
527
// Editing shouldn't have started yet.
524
528
expect (document.activeElement, document.body);
525
529
530
+ const MethodCall show = MethodCall ('TextInput.show' );
531
+ sendFrameworkMessage (codec.encodeMethodCall (show));
532
+
533
+ // The "setSizeAndTransform" message has to be here before we call
534
+ // checkInputEditingState, since on some platforms (e.g. Desktop Safari)
535
+ // we don't put the input element on DOM until we get its correct
536
+ // dimensions from the framework.
526
537
final MethodCall setSizeAndTransform =
527
538
configureSetSizeAndTransformMethodCall (150 , 50 ,
528
539
Matrix4 .translationValues (10.0 , 20.0 , 30.0 ).storage.toList ());
529
540
sendFrameworkMessage (codec.encodeMethodCall (setSizeAndTransform));
530
541
531
- const MethodCall show = MethodCall ('TextInput.show' );
532
- sendFrameworkMessage (codec.encodeMethodCall (show));
533
-
534
542
checkInputEditingState (
535
543
textEditing! .strategy.domElement, 'abcd' , 2 , 3 );
536
544
@@ -601,14 +609,18 @@ void testMain() {
601
609
// Editing shouldn't have started yet.
602
610
expect (defaultTextEditingRoot.activeElement, null );
603
611
612
+ const MethodCall show = MethodCall ('TextInput.show' );
613
+ sendFrameworkMessage (codec.encodeMethodCall (show));
614
+
615
+ // The "setSizeAndTransform" message has to be here before we call
616
+ // checkInputEditingState, since on some platforms (e.g. Desktop Safari)
617
+ // we don't put the input element on DOM until we get its correct
618
+ // dimensions from the framework.
604
619
final MethodCall setSizeAndTransform =
605
620
configureSetSizeAndTransformMethodCall (150 , 50 ,
606
621
Matrix4 .translationValues (10.0 , 20.0 , 30.0 ).storage.toList ());
607
622
sendFrameworkMessage (codec.encodeMethodCall (setSizeAndTransform));
608
623
609
- const MethodCall show = MethodCall ('TextInput.show' );
610
- sendFrameworkMessage (codec.encodeMethodCall (show));
611
-
612
624
checkInputEditingState (
613
625
textEditing! .strategy.domElement, 'abcd' , 2 , 3 );
614
626
expect (textEditing! .isEditing, isTrue);
@@ -643,14 +655,18 @@ void testMain() {
643
655
// Editing shouldn't have started yet.
644
656
expect (defaultTextEditingRoot.activeElement, null );
645
657
658
+ const MethodCall show = MethodCall ('TextInput.show' );
659
+ sendFrameworkMessage (codec.encodeMethodCall (show));
660
+
661
+ // The "setSizeAndTransform" message has to be here before we call
662
+ // checkInputEditingState, since on some platforms (e.g. Desktop Safari)
663
+ // we don't put the input element on DOM until we get its correct
664
+ // dimensions from the framework.
646
665
final MethodCall setSizeAndTransform =
647
666
configureSetSizeAndTransformMethodCall (150 , 50 ,
648
667
Matrix4 .translationValues (10.0 , 20.0 , 30.0 ).storage.toList ());
649
668
sendFrameworkMessage (codec.encodeMethodCall (setSizeAndTransform));
650
669
651
- const MethodCall show = MethodCall ('TextInput.show' );
652
- sendFrameworkMessage (codec.encodeMethodCall (show));
653
-
654
670
checkInputEditingState (
655
671
textEditing! .strategy.domElement, 'abcd' , 2 , 3 );
656
672
@@ -860,14 +876,18 @@ void testMain() {
860
876
// Editing shouldn't have started yet.
861
877
expect (document.activeElement, document.body);
862
878
879
+ const MethodCall show = MethodCall ('TextInput.show' );
880
+ sendFrameworkMessage (codec.encodeMethodCall (show));
881
+
882
+ // The "setSizeAndTransform" message has to be here before we call
883
+ // checkInputEditingState, since on some platforms (e.g. Desktop Safari)
884
+ // we don't put the input element on DOM until we get its correct
885
+ // dimensions from the framework.
863
886
final MethodCall setSizeAndTransform =
864
887
configureSetSizeAndTransformMethodCall (150 , 50 ,
865
888
Matrix4 .translationValues (10.0 , 20.0 , 30.0 ).storage.toList ());
866
889
sendFrameworkMessage (codec.encodeMethodCall (setSizeAndTransform));
867
890
868
- const MethodCall show = MethodCall ('TextInput.show' );
869
- sendFrameworkMessage (codec.encodeMethodCall (show));
870
-
871
891
checkInputEditingState (
872
892
textEditing! .strategy.domElement, 'abcd' , 2 , 3 );
873
893
@@ -898,14 +918,18 @@ void testMain() {
898
918
});
899
919
sendFrameworkMessage (codec.encodeMethodCall (setEditingState1));
900
920
921
+ const MethodCall show = MethodCall ('TextInput.show' );
922
+ sendFrameworkMessage (codec.encodeMethodCall (show));
923
+
924
+ // The "setSizeAndTransform" message has to be here before we call
925
+ // checkInputEditingState, since on some platforms (e.g. Desktop Safari)
926
+ // we don't put the input element on DOM until we get its correct
927
+ // dimensions from the framework.
901
928
final MethodCall setSizeAndTransform =
902
929
configureSetSizeAndTransformMethodCall (150 , 50 ,
903
930
Matrix4 .translationValues (10.0 , 20.0 , 30.0 ).storage.toList ());
904
931
sendFrameworkMessage (codec.encodeMethodCall (setSizeAndTransform));
905
932
906
- const MethodCall show = MethodCall ('TextInput.show' );
907
- sendFrameworkMessage (codec.encodeMethodCall (show));
908
-
909
933
const MethodCall setEditingState2 =
910
934
MethodCall ('TextInput.setEditingState' , < String , dynamic > {
911
935
'text' : 'xyz' ,
@@ -946,6 +970,10 @@ void testMain() {
946
970
const MethodCall show = MethodCall ('TextInput.show' );
947
971
sendFrameworkMessage (codec.encodeMethodCall (show));
948
972
973
+ // The "setSizeAndTransform" message has to be here before we call
974
+ // checkInputEditingState, since on some platforms (e.g. Desktop Safari)
975
+ // we don't put the input element on DOM until we get its correct
976
+ // dimensions from the framework.
949
977
final MethodCall setSizeAndTransform =
950
978
configureSetSizeAndTransformMethodCall (150 , 50 ,
951
979
Matrix4 .translationValues (10.0 , 20.0 , 30.0 ).storage.toList ());
@@ -987,14 +1015,18 @@ void testMain() {
987
1015
});
988
1016
sendFrameworkMessage (codec.encodeMethodCall (setEditingState1));
989
1017
1018
+ const MethodCall show = MethodCall ('TextInput.show' );
1019
+ sendFrameworkMessage (codec.encodeMethodCall (show));
1020
+
1021
+ // The "setSizeAndTransform" message has to be here before we call
1022
+ // checkInputEditingState, since on some platforms (e.g. Desktop Safari)
1023
+ // we don't put the input element on DOM until we get its correct
1024
+ // dimensions from the framework.
990
1025
final MethodCall setSizeAndTransform =
991
1026
configureSetSizeAndTransformMethodCall (10 , 10 ,
992
1027
Matrix4 .translationValues (10.0 , 10.0 , 10.0 ).storage.toList ());
993
1028
sendFrameworkMessage (codec.encodeMethodCall (setSizeAndTransform));
994
1029
995
- const MethodCall show = MethodCall ('TextInput.show' );
996
- sendFrameworkMessage (codec.encodeMethodCall (show));
997
-
998
1030
final InputElement inputElement =
999
1031
textEditing! .strategy.domElement! as InputElement ;
1000
1032
expect (inputElement.value, 'abcd' );
@@ -1061,6 +1093,10 @@ void testMain() {
1061
1093
const MethodCall show = MethodCall ('TextInput.show' );
1062
1094
sendFrameworkMessage (codec.encodeMethodCall (show));
1063
1095
1096
+ // The "setSizeAndTransform" message has to be here before we call
1097
+ // checkInputEditingState, since on some platforms (e.g. Desktop Safari)
1098
+ // we don't put the input element on DOM until we get its correct
1099
+ // dimensions from the framework.
1064
1100
final MethodCall setSizeAndTransform =
1065
1101
configureSetSizeAndTransformMethodCall (150 , 50 ,
1066
1102
Matrix4 .translationValues (10.0 , 20.0 , 30.0 ).storage.toList ());
@@ -1218,6 +1254,10 @@ void testMain() {
1218
1254
const MethodCall show = MethodCall ('TextInput.show' );
1219
1255
sendFrameworkMessage (codec.encodeMethodCall (show));
1220
1256
1257
+ // The "setSizeAndTransform" message has to be here before we call
1258
+ // checkInputEditingState, since on some platforms (e.g. Desktop Safari)
1259
+ // we don't put the input element on DOM until we get its correct
1260
+ // dimensions from the framework.
1221
1261
final MethodCall setSizeAndTransform =
1222
1262
configureSetSizeAndTransformMethodCall (
1223
1263
150 ,
@@ -1360,14 +1400,18 @@ void testMain() {
1360
1400
});
1361
1401
sendFrameworkMessage (codec.encodeMethodCall (setEditingState1));
1362
1402
1403
+ const MethodCall show = MethodCall ('TextInput.show' );
1404
+ sendFrameworkMessage (codec.encodeMethodCall (show));
1405
+
1406
+ // The "setSizeAndTransform" message has to be here before we call
1407
+ // checkInputEditingState, since on some platforms (e.g. Desktop Safari)
1408
+ // we don't put the input element on DOM until we get its correct
1409
+ // dimensions from the framework.
1363
1410
final MethodCall setSizeAndTransform =
1364
1411
configureSetSizeAndTransformMethodCall (150 , 50 ,
1365
1412
Matrix4 .translationValues (10.0 , 20.0 , 30.0 ).storage.toList ());
1366
1413
sendFrameworkMessage (codec.encodeMethodCall (setSizeAndTransform));
1367
1414
1368
- const MethodCall show = MethodCall ('TextInput.show' );
1369
- sendFrameworkMessage (codec.encodeMethodCall (show));
1370
-
1371
1415
// Check if the selection range is correct.
1372
1416
checkInputEditingState (
1373
1417
textEditing! .strategy.domElement, 'xyz' , 1 , 2 );
@@ -1478,6 +1522,10 @@ void testMain() {
1478
1522
const MethodCall show = MethodCall ('TextInput.show' );
1479
1523
sendFrameworkMessage (codec.encodeMethodCall (show));
1480
1524
1525
+ // The "setSizeAndTransform" message has to be here before we call
1526
+ // checkInputEditingState, since on some platforms (e.g. Desktop Safari)
1527
+ // we don't put the input element on DOM until we get its correct
1528
+ // dimensions from the framework.
1481
1529
final MethodCall setSizeAndTransform =
1482
1530
configureSetSizeAndTransformMethodCall (150 , 50 ,
1483
1531
Matrix4 .translationValues (10.0 , 20.0 , 30.0 ).storage.toList ());
@@ -1533,14 +1581,18 @@ void testMain() {
1533
1581
// Editing shouldn't have started yet.
1534
1582
expect (defaultTextEditingRoot.activeElement, null );
1535
1583
1584
+ const MethodCall show = MethodCall ('TextInput.show' );
1585
+ sendFrameworkMessage (codec.encodeMethodCall (show));
1586
+
1587
+ // The "setSizeAndTransform" message has to be here before we call
1588
+ // checkInputEditingState, since on some platforms (e.g. Desktop Safari)
1589
+ // we don't put the input element on DOM until we get its correct
1590
+ // dimensions from the framework.
1536
1591
final MethodCall setSizeAndTransform =
1537
1592
configureSetSizeAndTransformMethodCall (150 , 50 ,
1538
1593
Matrix4 .translationValues (10.0 , 20.0 , 30.0 ).storage.toList ());
1539
1594
sendFrameworkMessage (codec.encodeMethodCall (setSizeAndTransform));
1540
1595
1541
- const MethodCall show = MethodCall ('TextInput.show' );
1542
- sendFrameworkMessage (codec.encodeMethodCall (show));
1543
-
1544
1596
final TextAreaElement textarea = textEditing! .strategy.domElement! as TextAreaElement ;
1545
1597
checkTextAreaEditingState (textarea, '' , 0 , 0 );
1546
1598
0 commit comments