@@ -428,10 +428,7 @@ void main() {
428428 pumpFrame (phase: EnginePhase .compositingBits);
429429
430430 expect (editable, paintsExactlyCountTimes (#drawRRect, 0 ));
431-
432- // TODO(yjbanov): ahem.ttf doesn't have Chinese glyphs, making this test
433- // sensitive to browser/OS when running in web mode:
434- }, skip: kIsWeb); // https://github.com/flutter/flutter/issues/83129
431+ });
435432
436433 test ('text is painted above selection' , () {
437434 final TextSelectionDelegate delegate = _FakeEditableTextState ();
@@ -810,51 +807,44 @@ void main() {
810807 expect (editable.hasFocus, false );
811808 });
812809
813- test (
814- 'has correct maxScrollExtent' ,
815- () {
816- final TextSelectionDelegate delegate = _FakeEditableTextState ();
817- EditableText .debugDeterministicCursor = true ;
810+ test ('has correct maxScrollExtent' , () {
811+ final TextSelectionDelegate delegate = _FakeEditableTextState ();
812+ EditableText .debugDeterministicCursor = true ;
818813
819- final RenderEditable editable = RenderEditable (
820- maxLines: 2 ,
821- backgroundCursorColor: Colors .grey,
822- textDirection: TextDirection .ltr,
823- cursorColor: const Color .fromARGB (0xFF , 0xFF , 0x00 , 0x00 ),
824- offset: ViewportOffset .zero (),
825- textSelectionDelegate: delegate,
826- text: const TextSpan (
827- text:
828- '撒地方加咖啡哈金凤凰卡号方式剪坏算法发挥福建垃\n asfjafjajfjaslfjaskjflasjfksajf撒分开建安路口附近拉设\n 计费可使肌肤撒附近埃里克圾房卡设计费"' ,
829- style: TextStyle (height: 1.0 , fontSize: 10.0 , fontFamily: 'Roboto' ),
830- ),
831- startHandleLayerLink: LayerLink (),
832- endHandleLayerLink: LayerLink (),
833- selection: const TextSelection .collapsed (offset: 4 , affinity: TextAffinity .upstream),
834- );
814+ final RenderEditable editable = RenderEditable (
815+ maxLines: 2 ,
816+ backgroundCursorColor: Colors .grey,
817+ textDirection: TextDirection .ltr,
818+ cursorColor: const Color .fromARGB (0xFF , 0xFF , 0x00 , 0x00 ),
819+ offset: ViewportOffset .zero (),
820+ textSelectionDelegate: delegate,
821+ text: const TextSpan (
822+ text:
823+ '撒地方加咖啡哈金凤凰卡号方式剪坏算法发挥福建垃\n asfjafjajfjaslfjaskjflasjfksajf撒分开建安路口附近拉设\n 计费可使肌肤撒附近埃里克圾房卡设计费"' ,
824+ style: TextStyle (height: 1.0 , fontSize: 10.0 , fontFamily: 'Roboto' ),
825+ ),
826+ startHandleLayerLink: LayerLink (),
827+ endHandleLayerLink: LayerLink (),
828+ selection: const TextSelection .collapsed (offset: 4 , affinity: TextAffinity .upstream),
829+ );
835830
836- editable.layout (BoxConstraints .loose (const Size (100.0 , 1000.0 )));
837- expect (editable.size, equals (const Size (100 , 20 )));
838- expect (editable.maxLines, equals (2 ));
839- expect (editable.maxScrollExtent, equals (90 ));
831+ editable.layout (BoxConstraints .loose (const Size (100.0 , 1000.0 )));
832+ expect (editable.size, equals (const Size (100 , 20 )));
833+ expect (editable.maxLines, equals (2 ));
834+ expect (editable.maxScrollExtent, equals (90 ));
840835
841- editable.layout (BoxConstraints .loose (const Size (150.0 , 1000.0 )));
842- expect (editable.maxScrollExtent, equals (50 ));
836+ editable.layout (BoxConstraints .loose (const Size (150.0 , 1000.0 )));
837+ expect (editable.maxScrollExtent, equals (50 ));
843838
844- editable.layout (BoxConstraints .loose (const Size (200.0 , 1000.0 )));
845- expect (editable.maxScrollExtent, equals (40 ));
839+ editable.layout (BoxConstraints .loose (const Size (200.0 , 1000.0 )));
840+ expect (editable.maxScrollExtent, equals (40 ));
846841
847- editable.layout (BoxConstraints .loose (const Size (500.0 , 1000.0 )));
848- expect (editable.maxScrollExtent, equals (10 ));
842+ editable.layout (BoxConstraints .loose (const Size (500.0 , 1000.0 )));
843+ expect (editable.maxScrollExtent, equals (10 ));
849844
850- editable.layout (BoxConstraints .loose (const Size (1000.0 , 1000.0 )));
851- expect (editable.maxScrollExtent, equals (10 ));
852- // TODO(yjbanov): This test is failing in the Dart HHH-web bot and
853- // needs additional investigation before it can be reenabled.
854- },
855- // https://github.com/flutter/flutter/issues/93691
856- skip: const bool .fromEnvironment ('DART_HHH_BOT' ),
857- );
845+ editable.layout (BoxConstraints .loose (const Size (1000.0 , 1000.0 )));
846+ expect (editable.maxScrollExtent, equals (10 ));
847+ });
858848
859849 test ('getEndpointsForSelection handles empty characters' , () {
860850 final TextSelectionDelegate delegate = _FakeEditableTextState ();
@@ -1505,7 +1495,7 @@ void main() {
15051495 final Rect composingRect =
15061496 editable.getRectForComposingRange (const TextRange (start: 4 , end: 5 ))! ;
15071497 expect (composingRect, const Rect .fromLTRB (40.0 , 0.0 , 54.0 , 14.0 ));
1508- }, skip : isBrowser); // https://github.com/flutter/flutter/issues/61021
1498+ });
15091499
15101500 test ('able to render multiple WidgetSpans' , () async {
15111501 final TextSelectionDelegate delegate =
@@ -1550,7 +1540,7 @@ void main() {
15501540 final Rect composingRect =
15511541 editable.getRectForComposingRange (const TextRange (start: 4 , end: 7 ))! ;
15521542 expect (composingRect, const Rect .fromLTRB (40.0 , 0.0 , 82.0 , 14.0 ));
1553- }, skip : isBrowser); // https://github.com/flutter/flutter/issues/61021
1543+ });
15541544
15551545 test ('able to render WidgetSpans with line wrap' , () async {
15561546 final TextSelectionDelegate delegate =
@@ -1599,7 +1589,7 @@ void main() {
15991589 expect (composingRect, const Rect .fromLTRB (40.0 , 0.0 , 68.0 , 14.0 ));
16001590 composingRect = editable.getRectForComposingRange (const TextRange (start: 6 , end: 7 ))! ;
16011591 expect (composingRect, const Rect .fromLTRB (0.0 , 14.0 , 14.0 , 28.0 ));
1602- }, skip : isBrowser); // https://github.com/flutter/flutter/issues/61021
1592+ });
16031593
16041594 test ('able to render WidgetSpans with line wrap alternating spans' , () async {
16051595 final TextSelectionDelegate delegate =
@@ -1657,7 +1647,7 @@ void main() {
16571647 expect (composingRect, const Rect .fromLTRB (24.0 , 18.0 , 34.0 , 28.0 ));
16581648 composingRect = editable.getRectForComposingRange (const TextRange (start: 9 , end: 10 ))! ;
16591649 expect (composingRect, const Rect .fromLTRB (34.0 , 14.0 , 48.0 , 28.0 ));
1660- }, skip : isBrowser); // https://github.com/flutter/flutter/issues/61021
1650+ });
16611651
16621652 test ('able to render WidgetSpans nested spans' , () async {
16631653 final TextSelectionDelegate delegate =
@@ -1711,7 +1701,7 @@ void main() {
17111701 expect (composingRect, const Rect .fromLTRB (0.0 , 14.0 , 14.0 , 28.0 ));
17121702 composingRect = editable.getRectForComposingRange (const TextRange (start: 7 , end: 8 ));
17131703 expect (composingRect, null );
1714- }, skip : isBrowser); // https://github.com/flutter/flutter/issues/61021
1704+ });
17151705
17161706 test ('WidgetSpan render box is painted at correct offset when scrolled' , () async {
17171707 final TextSelectionDelegate delegate =
@@ -1752,7 +1742,7 @@ void main() {
17521742 final Rect composingRect =
17531743 editable.getRectForComposingRange (const TextRange (start: 4 , end: 5 ))! ;
17541744 expect (composingRect, const Rect .fromLTRB (40.0 , - 100.0 , 54.0 , - 86.0 ));
1755- }, skip : isBrowser); // https://github.com/flutter/flutter/issues/61021
1745+ });
17561746
17571747 test ('can compute IntrinsicWidth for WidgetSpans' , () {
17581748 // Regression test for https://github.com/flutter/flutter/issues/59316
@@ -1893,7 +1883,7 @@ void main() {
18931883 result = BoxHitTestResult ();
18941884 editable.hitTest (result, position: const Offset (5.0 , 15.0 ));
18951885 expect (result.path, hasLength (0 ));
1896- }, skip : isBrowser); // https://github.com/flutter/flutter/issues/61020
1886+ });
18971887
18981888 test ('hits correct WidgetSpan when scrolled' , () {
18991889 final String text = '${"\n " * 10 }test' ;
@@ -1975,7 +1965,7 @@ void main() {
19751965 result = BoxHitTestResult ();
19761966 editable.hitTest (result, position: const Offset (5.0 , 15.0 ));
19771967 expect (result.path, hasLength (1 )); // Only the RenderEditable.
1978- }, skip : isBrowser); // https://github.com/flutter/flutter/issues/61020
1968+ });
19791969 });
19801970
19811971 test ('does not skip TextPainter.layout because of invalid cache' , () {
0 commit comments