Add a regression test for newlines.

This test includes tests for HTML newlines, which causes the XML parser in Ruffle to throw errors. Hence why it's currently ignored.
This commit is contained in:
David Wendt 2020-06-08 18:40:21 -04:00
parent 180ef3b423
commit 3c9a43ea72
4 changed files with 31 additions and 0 deletions

View File

@ -201,6 +201,7 @@ swf_tests! {
(edittext_html_defaults, "avm1/edittext_html_defaults", 1),
(edittext_align, "avm1/edittext_align", 1),
(edittext_leading, "avm1/edittext_leading", 1),
#[ignore] (edittext_newlines, "avm1/edittext_newlines", 1),
}
// TODO: These tests have some inaccuracies currently, so we use approx_eq to test that numeric values are close enough.

View File

@ -0,0 +1,30 @@
//Sample text with wordwrap
//field.textWidth
163
//field.textHeight
52
//Sample text without wordwrap
//field.textWidth
380
//field.textHeight
18
//Newline-having text with wordwrap
//field.textWidth
163
//field.textHeight
89
//Newline-having text without wordwrap
//field.textWidth
251
//field.textHeight
52
//Newline-having HTML with wordwrap
//field.textWidth
164
//field.textHeight
107
//Newline-having HTML without wordwrap
//field.textWidth
741
//field.textHeight
18

Binary file not shown.

Binary file not shown.