-
-
Notifications
You must be signed in to change notification settings - Fork 822
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Add avm2/edittext_bottom_scroll_v_basic test
This test verifies the behavior of TextField.bottomScrollV.
- Loading branch information
1 parent
c18f8c3
commit 3492811
Showing
5 changed files
with
260 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
tests/tests/swfs/avm2/edittext_bottom_scroll_v_basic/Test.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package { | ||
import flash.display.Sprite; | ||
import flash.text.TextField; | ||
import flash.text.TextFormat; | ||
|
||
public class Test extends Sprite { | ||
[Embed(source="TestFont.ttf", fontName="TestFont", embedAsCFF="false", unicodeRange="U+0061-U+0064")] | ||
private var TestFont:Class; | ||
|
||
public function Test() { | ||
stage.scaleMode = "noScale"; | ||
|
||
// height > text height | ||
for (var c = 0; c < 10; ++c) { | ||
test(200, c); | ||
} | ||
|
||
// text height > height | ||
for (var h = 0; h < 200; ++h) { | ||
test(h, 100); | ||
} | ||
} | ||
|
||
private function test(height: int, chars: uint):void { | ||
var text = new TextField(); | ||
text.multiline = true; | ||
text.border = true; | ||
text.width = 100; | ||
text.height = height; | ||
text.embedFonts = true; | ||
var tf = new TextFormat(); | ||
tf.font = "TestFont"; | ||
tf.size = 20; | ||
tf.leading = 6; | ||
text.defaultTextFormat = tf; | ||
|
||
var i = chars; | ||
while (i > 1) { | ||
text.text += "a\n"; | ||
i -= 2; | ||
} | ||
if (i > 0) { | ||
text.text += "a"; | ||
} | ||
|
||
trace("h=" + height + ",chars=" + chars + ",bottomScrollV=" + text.bottomScrollV); | ||
} | ||
} | ||
} |
Binary file not shown.
210 changes: 210 additions & 0 deletions
210
tests/tests/swfs/avm2/edittext_bottom_scroll_v_basic/output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
h=200,chars=0,bottomScrollV=1 | ||
h=200,chars=1,bottomScrollV=1 | ||
h=200,chars=2,bottomScrollV=2 | ||
h=200,chars=3,bottomScrollV=2 | ||
h=200,chars=4,bottomScrollV=3 | ||
h=200,chars=5,bottomScrollV=3 | ||
h=200,chars=6,bottomScrollV=4 | ||
h=200,chars=7,bottomScrollV=4 | ||
h=200,chars=8,bottomScrollV=5 | ||
h=200,chars=9,bottomScrollV=5 | ||
h=0,chars=100,bottomScrollV=1 | ||
h=1,chars=100,bottomScrollV=1 | ||
h=2,chars=100,bottomScrollV=1 | ||
h=3,chars=100,bottomScrollV=1 | ||
h=4,chars=100,bottomScrollV=1 | ||
h=5,chars=100,bottomScrollV=1 | ||
h=6,chars=100,bottomScrollV=1 | ||
h=7,chars=100,bottomScrollV=1 | ||
h=8,chars=100,bottomScrollV=1 | ||
h=9,chars=100,bottomScrollV=1 | ||
h=10,chars=100,bottomScrollV=1 | ||
h=11,chars=100,bottomScrollV=1 | ||
h=12,chars=100,bottomScrollV=1 | ||
h=13,chars=100,bottomScrollV=1 | ||
h=14,chars=100,bottomScrollV=1 | ||
h=15,chars=100,bottomScrollV=1 | ||
h=16,chars=100,bottomScrollV=1 | ||
h=17,chars=100,bottomScrollV=1 | ||
h=18,chars=100,bottomScrollV=1 | ||
h=19,chars=100,bottomScrollV=1 | ||
h=20,chars=100,bottomScrollV=1 | ||
h=21,chars=100,bottomScrollV=1 | ||
h=22,chars=100,bottomScrollV=1 | ||
h=23,chars=100,bottomScrollV=1 | ||
h=24,chars=100,bottomScrollV=1 | ||
h=25,chars=100,bottomScrollV=1 | ||
h=26,chars=100,bottomScrollV=1 | ||
h=27,chars=100,bottomScrollV=1 | ||
h=28,chars=100,bottomScrollV=1 | ||
h=29,chars=100,bottomScrollV=1 | ||
h=30,chars=100,bottomScrollV=1 | ||
h=31,chars=100,bottomScrollV=1 | ||
h=32,chars=100,bottomScrollV=1 | ||
h=33,chars=100,bottomScrollV=1 | ||
h=34,chars=100,bottomScrollV=1 | ||
h=35,chars=100,bottomScrollV=1 | ||
h=36,chars=100,bottomScrollV=1 | ||
h=37,chars=100,bottomScrollV=1 | ||
h=38,chars=100,bottomScrollV=1 | ||
h=39,chars=100,bottomScrollV=1 | ||
h=40,chars=100,bottomScrollV=1 | ||
h=41,chars=100,bottomScrollV=1 | ||
h=42,chars=100,bottomScrollV=1 | ||
h=43,chars=100,bottomScrollV=1 | ||
h=44,chars=100,bottomScrollV=1 | ||
h=45,chars=100,bottomScrollV=1 | ||
h=46,chars=100,bottomScrollV=1 | ||
h=47,chars=100,bottomScrollV=1 | ||
h=48,chars=100,bottomScrollV=1 | ||
h=49,chars=100,bottomScrollV=1 | ||
h=50,chars=100,bottomScrollV=2 | ||
h=51,chars=100,bottomScrollV=2 | ||
h=52,chars=100,bottomScrollV=2 | ||
h=53,chars=100,bottomScrollV=2 | ||
h=54,chars=100,bottomScrollV=2 | ||
h=55,chars=100,bottomScrollV=2 | ||
h=56,chars=100,bottomScrollV=2 | ||
h=57,chars=100,bottomScrollV=2 | ||
h=58,chars=100,bottomScrollV=2 | ||
h=59,chars=100,bottomScrollV=2 | ||
h=60,chars=100,bottomScrollV=2 | ||
h=61,chars=100,bottomScrollV=2 | ||
h=62,chars=100,bottomScrollV=2 | ||
h=63,chars=100,bottomScrollV=2 | ||
h=64,chars=100,bottomScrollV=2 | ||
h=65,chars=100,bottomScrollV=2 | ||
h=66,chars=100,bottomScrollV=2 | ||
h=67,chars=100,bottomScrollV=2 | ||
h=68,chars=100,bottomScrollV=2 | ||
h=69,chars=100,bottomScrollV=2 | ||
h=70,chars=100,bottomScrollV=2 | ||
h=71,chars=100,bottomScrollV=2 | ||
h=72,chars=100,bottomScrollV=2 | ||
h=73,chars=100,bottomScrollV=2 | ||
h=74,chars=100,bottomScrollV=2 | ||
h=75,chars=100,bottomScrollV=2 | ||
h=76,chars=100,bottomScrollV=3 | ||
h=77,chars=100,bottomScrollV=3 | ||
h=78,chars=100,bottomScrollV=3 | ||
h=79,chars=100,bottomScrollV=3 | ||
h=80,chars=100,bottomScrollV=3 | ||
h=81,chars=100,bottomScrollV=3 | ||
h=82,chars=100,bottomScrollV=3 | ||
h=83,chars=100,bottomScrollV=3 | ||
h=84,chars=100,bottomScrollV=3 | ||
h=85,chars=100,bottomScrollV=3 | ||
h=86,chars=100,bottomScrollV=3 | ||
h=87,chars=100,bottomScrollV=3 | ||
h=88,chars=100,bottomScrollV=3 | ||
h=89,chars=100,bottomScrollV=3 | ||
h=90,chars=100,bottomScrollV=3 | ||
h=91,chars=100,bottomScrollV=3 | ||
h=92,chars=100,bottomScrollV=3 | ||
h=93,chars=100,bottomScrollV=3 | ||
h=94,chars=100,bottomScrollV=3 | ||
h=95,chars=100,bottomScrollV=3 | ||
h=96,chars=100,bottomScrollV=3 | ||
h=97,chars=100,bottomScrollV=3 | ||
h=98,chars=100,bottomScrollV=3 | ||
h=99,chars=100,bottomScrollV=3 | ||
h=100,chars=100,bottomScrollV=3 | ||
h=101,chars=100,bottomScrollV=3 | ||
h=102,chars=100,bottomScrollV=4 | ||
h=103,chars=100,bottomScrollV=4 | ||
h=104,chars=100,bottomScrollV=4 | ||
h=105,chars=100,bottomScrollV=4 | ||
h=106,chars=100,bottomScrollV=4 | ||
h=107,chars=100,bottomScrollV=4 | ||
h=108,chars=100,bottomScrollV=4 | ||
h=109,chars=100,bottomScrollV=4 | ||
h=110,chars=100,bottomScrollV=4 | ||
h=111,chars=100,bottomScrollV=4 | ||
h=112,chars=100,bottomScrollV=4 | ||
h=113,chars=100,bottomScrollV=4 | ||
h=114,chars=100,bottomScrollV=4 | ||
h=115,chars=100,bottomScrollV=4 | ||
h=116,chars=100,bottomScrollV=4 | ||
h=117,chars=100,bottomScrollV=4 | ||
h=118,chars=100,bottomScrollV=4 | ||
h=119,chars=100,bottomScrollV=4 | ||
h=120,chars=100,bottomScrollV=4 | ||
h=121,chars=100,bottomScrollV=4 | ||
h=122,chars=100,bottomScrollV=4 | ||
h=123,chars=100,bottomScrollV=4 | ||
h=124,chars=100,bottomScrollV=4 | ||
h=125,chars=100,bottomScrollV=4 | ||
h=126,chars=100,bottomScrollV=4 | ||
h=127,chars=100,bottomScrollV=4 | ||
h=128,chars=100,bottomScrollV=5 | ||
h=129,chars=100,bottomScrollV=5 | ||
h=130,chars=100,bottomScrollV=5 | ||
h=131,chars=100,bottomScrollV=5 | ||
h=132,chars=100,bottomScrollV=5 | ||
h=133,chars=100,bottomScrollV=5 | ||
h=134,chars=100,bottomScrollV=5 | ||
h=135,chars=100,bottomScrollV=5 | ||
h=136,chars=100,bottomScrollV=5 | ||
h=137,chars=100,bottomScrollV=5 | ||
h=138,chars=100,bottomScrollV=5 | ||
h=139,chars=100,bottomScrollV=5 | ||
h=140,chars=100,bottomScrollV=5 | ||
h=141,chars=100,bottomScrollV=5 | ||
h=142,chars=100,bottomScrollV=5 | ||
h=143,chars=100,bottomScrollV=5 | ||
h=144,chars=100,bottomScrollV=5 | ||
h=145,chars=100,bottomScrollV=5 | ||
h=146,chars=100,bottomScrollV=5 | ||
h=147,chars=100,bottomScrollV=5 | ||
h=148,chars=100,bottomScrollV=5 | ||
h=149,chars=100,bottomScrollV=5 | ||
h=150,chars=100,bottomScrollV=5 | ||
h=151,chars=100,bottomScrollV=5 | ||
h=152,chars=100,bottomScrollV=5 | ||
h=153,chars=100,bottomScrollV=5 | ||
h=154,chars=100,bottomScrollV=6 | ||
h=155,chars=100,bottomScrollV=6 | ||
h=156,chars=100,bottomScrollV=6 | ||
h=157,chars=100,bottomScrollV=6 | ||
h=158,chars=100,bottomScrollV=6 | ||
h=159,chars=100,bottomScrollV=6 | ||
h=160,chars=100,bottomScrollV=6 | ||
h=161,chars=100,bottomScrollV=6 | ||
h=162,chars=100,bottomScrollV=6 | ||
h=163,chars=100,bottomScrollV=6 | ||
h=164,chars=100,bottomScrollV=6 | ||
h=165,chars=100,bottomScrollV=6 | ||
h=166,chars=100,bottomScrollV=6 | ||
h=167,chars=100,bottomScrollV=6 | ||
h=168,chars=100,bottomScrollV=6 | ||
h=169,chars=100,bottomScrollV=6 | ||
h=170,chars=100,bottomScrollV=6 | ||
h=171,chars=100,bottomScrollV=6 | ||
h=172,chars=100,bottomScrollV=6 | ||
h=173,chars=100,bottomScrollV=6 | ||
h=174,chars=100,bottomScrollV=6 | ||
h=175,chars=100,bottomScrollV=6 | ||
h=176,chars=100,bottomScrollV=6 | ||
h=177,chars=100,bottomScrollV=6 | ||
h=178,chars=100,bottomScrollV=6 | ||
h=179,chars=100,bottomScrollV=6 | ||
h=180,chars=100,bottomScrollV=7 | ||
h=181,chars=100,bottomScrollV=7 | ||
h=182,chars=100,bottomScrollV=7 | ||
h=183,chars=100,bottomScrollV=7 | ||
h=184,chars=100,bottomScrollV=7 | ||
h=185,chars=100,bottomScrollV=7 | ||
h=186,chars=100,bottomScrollV=7 | ||
h=187,chars=100,bottomScrollV=7 | ||
h=188,chars=100,bottomScrollV=7 | ||
h=189,chars=100,bottomScrollV=7 | ||
h=190,chars=100,bottomScrollV=7 | ||
h=191,chars=100,bottomScrollV=7 | ||
h=192,chars=100,bottomScrollV=7 | ||
h=193,chars=100,bottomScrollV=7 | ||
h=194,chars=100,bottomScrollV=7 | ||
h=195,chars=100,bottomScrollV=7 | ||
h=196,chars=100,bottomScrollV=7 | ||
h=197,chars=100,bottomScrollV=7 | ||
h=198,chars=100,bottomScrollV=7 | ||
h=199,chars=100,bottomScrollV=7 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
num_ticks = 1 |