Skip to content

Commit

Permalink
tests: Add align="justify" case to avm1/edittext_html_swf*
Browse files Browse the repository at this point in the history
  • Loading branch information
kjarosh authored and torokati44 committed Dec 3, 2024
1 parent 83736c0 commit 18ece83
Show file tree
Hide file tree
Showing 7 changed files with 165 additions and 0 deletions.
54 changes: 54 additions & 0 deletions tests/tests/swfs/avm1/edittext_html_swf6/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,24 @@ is multiline after enabling: true
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="justify">text</p>
HTML get: <P ALIGN="JUSTIFY"><FONT FACE="Noto Sans" SIZE="6" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text\r
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="center">text</p>
HTML get: <P ALIGN="CENTER"><FONT FACE="Noto Sans" SIZE="6" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text\r
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="unknown">text</p>
HTML get: <P ALIGN="LEFT"><FONT FACE="Noto Sans" SIZE="6" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text\r
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <a href="http://example.com"><p align="right"></p></a>
HTML get: <P ALIGN="RIGHT"><FONT FACE="Noto Sans" SIZE="6" COLOR="#000000" LETTERSPACING="0" KERNING="0"></FONT></P>
Text get: \r
Expand Down Expand Up @@ -2809,6 +2827,24 @@ is multiline after enabling: true
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="justify">text</p>
HTML get: <P ALIGN="JUSTIFY"><FONT FACE="Noto Sans" SIZE="12" COLOR="#CC00CC" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text\r
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="center">text</p>
HTML get: <P ALIGN="CENTER"><FONT FACE="Noto Sans" SIZE="12" COLOR="#CC00CC" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text\r
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="unknown">text</p>
HTML get: <P ALIGN="LEFT"><FONT FACE="Noto Sans" SIZE="12" COLOR="#CC00CC" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text\r
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <a href="http://example.com"><p align="right"></p></a>
HTML get: <P ALIGN="RIGHT"><FONT FACE="Noto Sans" SIZE="12" COLOR="#CC00CC" LETTERSPACING="0" KERNING="0"></FONT></P>
Text get: \r
Expand Down Expand Up @@ -4582,6 +4618,24 @@ is multiline after enabling: true
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="justify">text</p>
HTML get: <TEXTFORMAT RIGHTMARGIN="2" LEADING="2"><P ALIGN="JUSTIFY"><FONT FACE="Noto Sans" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P></TEXTFORMAT>
Text get: text\r
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="center">text</p>
HTML get: <TEXTFORMAT RIGHTMARGIN="2" LEADING="2"><P ALIGN="CENTER"><FONT FACE="Noto Sans" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P></TEXTFORMAT>
Text get: text\r
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="unknown">text</p>
HTML get: <TEXTFORMAT RIGHTMARGIN="2" LEADING="2"><P ALIGN="LEFT"><FONT FACE="Noto Sans" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P></TEXTFORMAT>
Text get: text\r
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <a href="http://example.com"><p align="right"></p></a>
HTML get: <TEXTFORMAT RIGHTMARGIN="2" LEADING="2"><P ALIGN="RIGHT"><FONT FACE="Noto Sans" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0"></FONT></P></TEXTFORMAT>
Text get: \r
Expand Down
Binary file modified tests/tests/swfs/avm1/edittext_html_swf6/test.swf
Binary file not shown.
54 changes: 54 additions & 0 deletions tests/tests/swfs/avm1/edittext_html_swf7/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,24 @@ is multiline after enabling: true
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="justify">text</p>
HTML get: <P ALIGN="JUSTIFY"><FONT FACE="Noto Sans" SIZE="6" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="center">text</p>
HTML get: <P ALIGN="CENTER"><FONT FACE="Noto Sans" SIZE="6" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="unknown">text</p>
HTML get: <P ALIGN="LEFT"><FONT FACE="Noto Sans" SIZE="6" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <a href="http://example.com"><p align="right"></p></a>
HTML get:
Text get:
Expand Down Expand Up @@ -2809,6 +2827,24 @@ is multiline after enabling: true
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="justify">text</p>
HTML get: <P ALIGN="JUSTIFY"><FONT FACE="Noto Sans" SIZE="12" COLOR="#CC00CC" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="center">text</p>
HTML get: <P ALIGN="CENTER"><FONT FACE="Noto Sans" SIZE="12" COLOR="#CC00CC" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="unknown">text</p>
HTML get: <P ALIGN="LEFT"><FONT FACE="Noto Sans" SIZE="12" COLOR="#CC00CC" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <a href="http://example.com"><p align="right"></p></a>
HTML get:
Text get:
Expand Down Expand Up @@ -4582,6 +4618,24 @@ is multiline after enabling: true
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="justify">text</p>
HTML get: <TEXTFORMAT RIGHTMARGIN="2" LEADING="2"><P ALIGN="JUSTIFY"><FONT FACE="Noto Sans" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P></TEXTFORMAT>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="center">text</p>
HTML get: <TEXTFORMAT RIGHTMARGIN="2" LEADING="2"><P ALIGN="CENTER"><FONT FACE="Noto Sans" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P></TEXTFORMAT>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="unknown">text</p>
HTML get: <TEXTFORMAT RIGHTMARGIN="2" LEADING="2"><P ALIGN="LEFT"><FONT FACE="Noto Sans" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P></TEXTFORMAT>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <a href="http://example.com"><p align="right"></p></a>
HTML get:
Text get:
Expand Down
Binary file modified tests/tests/swfs/avm1/edittext_html_swf7/test.swf
Binary file not shown.
54 changes: 54 additions & 0 deletions tests/tests/swfs/avm1/edittext_html_swf8/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,24 @@ is multiline after enabling: true
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="justify">text</p>
HTML get: <P ALIGN="JUSTIFY"><FONT FACE="Noto Sans" SIZE="6" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="center">text</p>
HTML get: <P ALIGN="CENTER"><FONT FACE="Noto Sans" SIZE="6" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="unknown">text</p>
HTML get: <P ALIGN="LEFT"><FONT FACE="Noto Sans" SIZE="6" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <a href="http://example.com"><p align="right"></p></a>
HTML get:
Text get:
Expand Down Expand Up @@ -2809,6 +2827,24 @@ is multiline after enabling: true
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="justify">text</p>
HTML get: <P ALIGN="JUSTIFY"><FONT FACE="Noto Sans" SIZE="12" COLOR="#CC00CC" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="center">text</p>
HTML get: <P ALIGN="CENTER"><FONT FACE="Noto Sans" SIZE="12" COLOR="#CC00CC" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="unknown">text</p>
HTML get: <P ALIGN="LEFT"><FONT FACE="Noto Sans" SIZE="12" COLOR="#CC00CC" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <a href="http://example.com"><p align="right"></p></a>
HTML get:
Text get:
Expand Down Expand Up @@ -4582,6 +4618,24 @@ is multiline after enabling: true
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="justify">text</p>
HTML get: <TEXTFORMAT RIGHTMARGIN="2" LEADING="2"><P ALIGN="JUSTIFY"><FONT FACE="Noto Sans" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P></TEXTFORMAT>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="center">text</p>
HTML get: <TEXTFORMAT RIGHTMARGIN="2" LEADING="2"><P ALIGN="CENTER"><FONT FACE="Noto Sans" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P></TEXTFORMAT>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <p align="unknown">text</p>
HTML get: <TEXTFORMAT RIGHTMARGIN="2" LEADING="2"><P ALIGN="LEFT"><FONT FACE="Noto Sans" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P></TEXTFORMAT>
Text get: text
HTML get ml: <!-- the same -->
Text get: text\r
===============
HTML set: <a href="http://example.com"><p align="right"></p></a>
HTML get:
Text get:
Expand Down
3 changes: 3 additions & 0 deletions tests/tests/swfs/avm1/edittext_html_swf8/test.as
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ function runTests(text) {
runTest(text, '<b><p align="right">text</p></b>');
runTest(text, '<u><p align="right"></p></u>');
runTest(text, '<u><p align="right">text</p></u>');
runTest(text, '<p align="justify">text</p>');
runTest(text, '<p align="center">text</p>');
runTest(text, '<p align="unknown">text</p>');
runTest(text, '<a href="http://example.com"><p align="right"></p></a>');
runTest(text, '<a href="http://example.com"><p align="right">text</p></a>');
runTest(text, '<textformat leading="1"><p align="right"></p></textformat>');
Expand Down
Binary file modified tests/tests/swfs/avm1/edittext_html_swf8/test.swf
Binary file not shown.

0 comments on commit 18ece83

Please sign in to comment.