mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[web] Unskip tests that are already passing in Safari (#16567)
This commit is contained in:
parent
65d1126778
commit
f88f7df960
@ -56,9 +56,7 @@ void main() async {
|
||||
closeTo(paragraph.alphabeticBaseline * kAhemBaselineRatio, 3.0),
|
||||
);
|
||||
}
|
||||
},
|
||||
// TODO(nurhan): https://github.com/flutter/flutter/issues/50590
|
||||
skip: browserEngine == BrowserEngine.webkit);
|
||||
});
|
||||
|
||||
testEachMeasurement('predictably lays out a multi-line paragraph', () {
|
||||
for (double fontSize in <double>[10.0, 20.0, 30.0, 40.0]) {
|
||||
@ -85,9 +83,7 @@ void main() async {
|
||||
closeTo(paragraph.alphabeticBaseline * kAhemBaselineRatio, 3.0),
|
||||
);
|
||||
}
|
||||
},
|
||||
// TODO(nurhan): https://github.com/flutter/flutter/issues/50590
|
||||
skip: browserEngine == BrowserEngine.webkit);
|
||||
});
|
||||
|
||||
testEachMeasurement('predictably lays out a single-line rich paragraph', () {
|
||||
for (double fontSize in <double>[10.0, 20.0, 30.0, 40.0]) {
|
||||
@ -414,9 +410,7 @@ void main() async {
|
||||
TextDirection.rtl,
|
||||
),
|
||||
);
|
||||
},
|
||||
// TODO(nurhan): https://github.com/flutter/flutter/issues/50590
|
||||
skip: browserEngine == BrowserEngine.webkit);
|
||||
});
|
||||
|
||||
testEachMeasurement(
|
||||
'getBoxesForRange return empty list for zero-length range', () {
|
||||
@ -536,7 +530,5 @@ void main() async {
|
||||
|
||||
expect(paragraph.width, 30);
|
||||
expect(paragraph.height, 10);
|
||||
},
|
||||
// TODO(nurhan): https://github.com/flutter/flutter/issues/50590
|
||||
skip: browserEngine == BrowserEngine.webkit);
|
||||
});
|
||||
}
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@TestOn('chrome || firefox')
|
||||
|
||||
import 'package:ui/ui.dart' as ui;
|
||||
import 'package:ui/src/engine.dart';
|
||||
|
||||
@ -31,14 +29,19 @@ typedef MeasurementTestBody = void Function(TextMeasurementService instance);
|
||||
|
||||
/// Runs the same test twice - once with dom measurement and once with canvas
|
||||
/// measurement.
|
||||
void testMeasurements(String description, MeasurementTestBody body) {
|
||||
void testMeasurements(String description, MeasurementTestBody body, {
|
||||
bool skipDom,
|
||||
bool skipCanvas,
|
||||
}) {
|
||||
test(
|
||||
'$description (dom)',
|
||||
() => body(TextMeasurementService.domInstance),
|
||||
skip: skipDom,
|
||||
);
|
||||
test(
|
||||
'$description (canvas)',
|
||||
() => body(TextMeasurementService.canvasInstance),
|
||||
skip: skipCanvas,
|
||||
);
|
||||
}
|
||||
|
||||
@ -383,6 +386,7 @@ void main() async {
|
||||
expect(result.lines, isNull);
|
||||
}
|
||||
},
|
||||
skipDom: browserEngine == BrowserEngine.webkit,
|
||||
);
|
||||
|
||||
testMeasurements(
|
||||
@ -797,6 +801,7 @@ void main() async {
|
||||
expect(result.lines, isNull);
|
||||
}
|
||||
},
|
||||
skipDom: browserEngine == BrowserEngine.webkit,
|
||||
);
|
||||
|
||||
testMeasurements('respects max lines', (TextMeasurementService instance) {
|
||||
|
||||
@ -40,9 +40,7 @@ void main() async {
|
||||
from: paragraph.alphabeticBaseline * baselineRatio),
|
||||
);
|
||||
}
|
||||
},
|
||||
// TODO(nurhan): https://github.com/flutter/flutter/issues/50590
|
||||
skip: browserEngine == BrowserEngine.webkit);
|
||||
});
|
||||
|
||||
test('predictably lays out a multi-line paragraph', () {
|
||||
for (double fontSize in <double>[10.0, 20.0, 30.0, 40.0]) {
|
||||
@ -72,9 +70,7 @@ void main() async {
|
||||
from: paragraph.alphabeticBaseline * baselineRatio),
|
||||
);
|
||||
}
|
||||
},
|
||||
// TODO(nurhan): https://github.com/flutter/flutter/issues/50590
|
||||
skip: browserEngine == BrowserEngine.webkit);
|
||||
});
|
||||
|
||||
test('lay out unattached paragraph', () {
|
||||
final ParagraphBuilder builder = ParagraphBuilder(ParagraphStyle(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user