Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit f88f7df

Browse files
authored
[web] Unskip tests that are already passing in Safari (#16567)
1 parent 65d1126 commit f88f7df

File tree

3 files changed

+14
-21
lines changed

3 files changed

+14
-21
lines changed

lib/web_ui/test/paragraph_test.dart

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ void main() async {
5656
closeTo(paragraph.alphabeticBaseline * kAhemBaselineRatio, 3.0),
5757
);
5858
}
59-
},
60-
// TODO(nurhan): https://github.com/flutter/flutter/issues/50590
61-
skip: browserEngine == BrowserEngine.webkit);
59+
});
6260

6361
testEachMeasurement('predictably lays out a multi-line paragraph', () {
6462
for (double fontSize in <double>[10.0, 20.0, 30.0, 40.0]) {
@@ -85,9 +83,7 @@ void main() async {
8583
closeTo(paragraph.alphabeticBaseline * kAhemBaselineRatio, 3.0),
8684
);
8785
}
88-
},
89-
// TODO(nurhan): https://github.com/flutter/flutter/issues/50590
90-
skip: browserEngine == BrowserEngine.webkit);
86+
});
9187

9288
testEachMeasurement('predictably lays out a single-line rich paragraph', () {
9389
for (double fontSize in <double>[10.0, 20.0, 30.0, 40.0]) {
@@ -414,9 +410,7 @@ void main() async {
414410
TextDirection.rtl,
415411
),
416412
);
417-
},
418-
// TODO(nurhan): https://github.com/flutter/flutter/issues/50590
419-
skip: browserEngine == BrowserEngine.webkit);
413+
});
420414

421415
testEachMeasurement(
422416
'getBoxesForRange return empty list for zero-length range', () {
@@ -536,7 +530,5 @@ void main() async {
536530

537531
expect(paragraph.width, 30);
538532
expect(paragraph.height, 10);
539-
},
540-
// TODO(nurhan): https://github.com/flutter/flutter/issues/50590
541-
skip: browserEngine == BrowserEngine.webkit);
533+
});
542534
}

lib/web_ui/test/text/measurement_test.dart

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
@TestOn('chrome || firefox')
6-
75
import 'package:ui/ui.dart' as ui;
86
import 'package:ui/src/engine.dart';
97

@@ -31,14 +29,19 @@ typedef MeasurementTestBody = void Function(TextMeasurementService instance);
3129

3230
/// Runs the same test twice - once with dom measurement and once with canvas
3331
/// measurement.
34-
void testMeasurements(String description, MeasurementTestBody body) {
32+
void testMeasurements(String description, MeasurementTestBody body, {
33+
bool skipDom,
34+
bool skipCanvas,
35+
}) {
3536
test(
3637
'$description (dom)',
3738
() => body(TextMeasurementService.domInstance),
39+
skip: skipDom,
3840
);
3941
test(
4042
'$description (canvas)',
4143
() => body(TextMeasurementService.canvasInstance),
44+
skip: skipCanvas,
4245
);
4346
}
4447

@@ -383,6 +386,7 @@ void main() async {
383386
expect(result.lines, isNull);
384387
}
385388
},
389+
skipDom: browserEngine == BrowserEngine.webkit,
386390
);
387391

388392
testMeasurements(
@@ -797,6 +801,7 @@ void main() async {
797801
expect(result.lines, isNull);
798802
}
799803
},
804+
skipDom: browserEngine == BrowserEngine.webkit,
800805
);
801806

802807
testMeasurements('respects max lines', (TextMeasurementService instance) {

lib/web_ui/test/text_test.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ void main() async {
4040
from: paragraph.alphabeticBaseline * baselineRatio),
4141
);
4242
}
43-
},
44-
// TODO(nurhan): https://github.com/flutter/flutter/issues/50590
45-
skip: browserEngine == BrowserEngine.webkit);
43+
});
4644

4745
test('predictably lays out a multi-line paragraph', () {
4846
for (double fontSize in <double>[10.0, 20.0, 30.0, 40.0]) {
@@ -72,9 +70,7 @@ void main() async {
7270
from: paragraph.alphabeticBaseline * baselineRatio),
7371
);
7472
}
75-
},
76-
// TODO(nurhan): https://github.com/flutter/flutter/issues/50590
77-
skip: browserEngine == BrowserEngine.webkit);
73+
});
7874

7975
test('lay out unattached paragraph', () {
8076
final ParagraphBuilder builder = ParagraphBuilder(ParagraphStyle(

0 commit comments

Comments
 (0)