Skip to content

Commit

Permalink
tests: Add align="justify" case to avm2/edittext_html
Browse files Browse the repository at this point in the history
  • Loading branch information
kjarosh authored and torokati44 committed Dec 3, 2024
1 parent 48ffbfa commit 83736c0
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/tests/swfs/avm2/edittext_html/Test.as
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ public class Test extends Sprite {
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
30 changes: 30 additions & 0 deletions tests/tests/swfs/avm2/edittext_html/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1977,6 +1977,36 @@ Default multiline: false
from 0 to 4: size=12, blockIndent=0, font=Times, align=right, leading=0, display=block, kerning=false, leftMargin=0, rightMargin=0, color=0, bold=false, italic=false, bullet=false, underline=true
from 4 to 5: size=12, blockIndent=0, font=Times, align=right, leading=0, display=block, kerning=false, leftMargin=0, rightMargin=0, color=0, bold=false, italic=false, bullet=false, underline=false
===============
HTML set: <p align="justify">text</p>
HTML get: <P ALIGN="JUSTIFY"><FONT FACE="Times" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
Text runs (1):
from 0 to 4: size=12, blockIndent=0, font=Times, align=justify, leading=0, display=block, kerning=false, leftMargin=0, rightMargin=0, color=0, bold=false, italic=false, bullet=false, underline=false
HTML get ml: <!-- the same -->
Text get: text\r
Text runs (1):
from 0 to 5: size=12, blockIndent=0, font=Times, align=justify, leading=0, display=block, kerning=false, leftMargin=0, rightMargin=0, color=0, bold=false, italic=false, bullet=false, underline=false
===============
HTML set: <p align="center">text</p>
HTML get: <P ALIGN="CENTER"><FONT FACE="Times" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
Text runs (1):
from 0 to 4: size=12, blockIndent=0, font=Times, align=center, leading=0, display=block, kerning=false, leftMargin=0, rightMargin=0, color=0, bold=false, italic=false, bullet=false, underline=false
HTML get ml: <!-- the same -->
Text get: text\r
Text runs (1):
from 0 to 5: size=12, blockIndent=0, font=Times, align=center, leading=0, display=block, kerning=false, leftMargin=0, rightMargin=0, color=0, bold=false, italic=false, bullet=false, underline=false
===============
HTML set: <p align="unknown">text</p>
HTML get: <P ALIGN="LEFT"><FONT FACE="Times" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">text</FONT></P>
Text get: text
Text runs (1):
from 0 to 4: size=12, blockIndent=0, font=Times, align=left, leading=0, display=block, kerning=false, leftMargin=0, rightMargin=0, color=0, bold=false, italic=false, bullet=false, underline=false
HTML get ml: <!-- the same -->
Text get: text\r
Text runs (1):
from 0 to 5: size=12, blockIndent=0, font=Times, align=left, leading=0, display=block, kerning=false, leftMargin=0, rightMargin=0, color=0, bold=false, italic=false, bullet=false, underline=false
===============
HTML set: <a href="http://example.com"><p align="right"></p></a>
HTML get:
Text get:
Expand Down
Binary file modified tests/tests/swfs/avm2/edittext_html/test.swf
Binary file not shown.

0 comments on commit 83736c0

Please sign in to comment.