diff --git a/tests/tests/swfs/avm2/edittext_set_html_same/Test.as b/tests/tests/swfs/avm2/edittext_set_html_same/Test.as new file mode 100644 index 000000000000..3a0cbc5e3f1d --- /dev/null +++ b/tests/tests/swfs/avm2/edittext_set_html_same/Test.as @@ -0,0 +1,36 @@ +package { +import flash.display.*; +import flash.text.*; +import flash.events.*; +import flash.geom.*; + +public class Test extends MovieClip { + public function Test() { + var tf = new TextField(); + tf.multiline = true; + tf.defaultTextFormat = new TextFormat("Unknown Font"); + tf.htmlText = "

x

"; + + trace("Before newline removal:"); + trace(" " + tf.text.length); + + tf.replaceText(1, 2, ""); + + trace("After newline removal:"); + trace(" " + tf.text.length); + trace(" " + tf.htmlText); + + tf.htmlText = "

x

"; + + trace("After setting to the same value:"); + trace(" " + tf.text.length); + trace(" " + tf.htmlText); + + tf.htmlText = "

x

"; + + trace("After setting to a slightly different value:"); + trace(" " + tf.text.length); + trace(" " + tf.htmlText); + } +} +} diff --git a/tests/tests/swfs/avm2/edittext_set_html_same/output.txt b/tests/tests/swfs/avm2/edittext_set_html_same/output.txt new file mode 100644 index 000000000000..400828a1bf82 --- /dev/null +++ b/tests/tests/swfs/avm2/edittext_set_html_same/output.txt @@ -0,0 +1,11 @@ +Before newline removal: + 2 +After newline removal: + 1 +

x

+After setting to the same value: + 1 +

x

+After setting to a slightly different value: + 2 +

x

diff --git a/tests/tests/swfs/avm2/edittext_set_html_same/test.swf b/tests/tests/swfs/avm2/edittext_set_html_same/test.swf new file mode 100644 index 000000000000..312b4cffc710 Binary files /dev/null and b/tests/tests/swfs/avm2/edittext_set_html_same/test.swf differ diff --git a/tests/tests/swfs/avm2/edittext_set_html_same/test.toml b/tests/tests/swfs/avm2/edittext_set_html_same/test.toml new file mode 100644 index 000000000000..cf6123969a1d --- /dev/null +++ b/tests/tests/swfs/avm2/edittext_set_html_same/test.toml @@ -0,0 +1 @@ +num_ticks = 1