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

Commit 2b019ee

Browse files
committed
[web] disable golden check for Noto-rendered text
1 parent 651dd48 commit 2b019ee

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

lib/web_ui/test/canvaskit/canvas_golden_test.dart

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ import 'package:web_engine_tester/golden_tester.dart';
1515

1616
import 'common.dart';
1717

18+
// TODO(yjbanov): tests that render using Noto are not hermetic, as those fonts
19+
// come from fonts.google.com, where fonts can change any time.
20+
// These tests are skipped.
21+
// https://github.com/flutter/flutter/issues/86432
22+
const bool kIssue86432Exists = true;
23+
1824
void main() {
1925
internalBootstrapBrowserTest(() => testMain);
2026
}
@@ -307,28 +313,28 @@ void testMain() {
307313
outerText: '次 化 刃 直 入 令',
308314
innerText: '',
309315
paragraphLocale: const ui.Locale('zh', 'CN'));
310-
});
316+
}, skip: kIssue86432Exists);
311317

312318
test('text styles - paragraph locale zh_TW', () async {
313319
await testTextStyle('paragraph locale zh_TW',
314320
outerText: '次 化 刃 直 入 令',
315321
innerText: '',
316322
paragraphLocale: const ui.Locale('zh', 'TW'));
317-
});
323+
}, skip: kIssue86432Exists);
318324

319325
test('text styles - paragraph locale ja', () async {
320326
await testTextStyle('paragraph locale ja',
321327
outerText: '次 化 刃 直 入 令',
322328
innerText: '',
323329
paragraphLocale: const ui.Locale('ja'));
324-
});
330+
}, skip: kIssue86432Exists);
325331

326332
test('text styles - paragraph locale ko', () async {
327333
await testTextStyle('paragraph locale ko',
328334
outerText: '次 化 刃 直 入 令',
329335
innerText: '',
330336
paragraphLocale: const ui.Locale('ko'));
331-
});
337+
}, skip: kIssue86432Exists);
332338

333339
test('text styles - color', () async {
334340
await testTextStyle('color', color: const ui.Color(0xFF009900));
@@ -428,28 +434,28 @@ void testMain() {
428434
innerText: '次 化 刃 直 入 令',
429435
outerText: '',
430436
locale: const ui.Locale('zh', 'CN'));
431-
});
437+
}, skip: kIssue86432Exists);
432438

433439
test('text styles - locale zh_TW', () async {
434440
await testTextStyle('locale zh_TW',
435441
innerText: '次 化 刃 直 入 令',
436442
outerText: '',
437443
locale: const ui.Locale('zh', 'TW'));
438-
});
444+
}, skip: kIssue86432Exists);
439445

440446
test('text styles - locale ja', () async {
441447
await testTextStyle('locale ja',
442448
innerText: '次 化 刃 直 入 令',
443449
outerText: '',
444450
locale: const ui.Locale('ja'));
445-
});
451+
}, skip: kIssue86432Exists);
446452

447453
test('text styles - locale ko', () async {
448454
await testTextStyle('locale ko',
449455
innerText: '次 化 刃 直 入 令',
450456
outerText: '',
451457
locale: const ui.Locale('ko'));
452-
});
458+
}, skip: kIssue86432Exists);
453459

454460
test('text styles - background', () async {
455461
await testTextStyle('background',
@@ -565,7 +571,7 @@ void testMain() {
565571
outerText: '欢',
566572
innerText: '',
567573
);
568-
});
574+
}, skip: kIssue86432Exists);
569575

570576
test('text style - symbols', () async {
571577
// One of the CJK fonts loaded in one of the tests above also contains
@@ -578,7 +584,7 @@ void testMain() {
578584
outerText: '← ↑ → ↓ ',
579585
innerText: '',
580586
);
581-
});
587+
}, skip: kIssue86432Exists);
582588

583589
test(
584590
'text style - foreground/background/color do not leak across paragraphs',
@@ -846,12 +852,14 @@ Future<void> testSampleText(String language, String text,
846852
paragraphHeight = paragraph.height;
847853
return recorder.endRecording();
848854
});
849-
await matchPictureGolden(
850-
'canvaskit_sample_text_$language.png',
851-
picture,
852-
region: ui.Rect.fromLTRB(0, 0, testWidth, paragraphHeight + 20),
853-
write: write,
854-
);
855+
if (!kIssue86432Exists) {
856+
await matchPictureGolden(
857+
'canvaskit_sample_text_$language.png',
858+
picture,
859+
region: ui.Rect.fromLTRB(0, 0, testWidth, paragraphHeight + 20),
860+
write: write,
861+
);
862+
}
855863
}
856864

857865
typedef ParagraphFactory = CkParagraph Function();

0 commit comments

Comments
 (0)