add test for frames and bytes properties of empty movies
[swfdec.git] / test / trace / textformat-init.as
blob3459b910dabb9ccae0ad17f2bb113413a5d062a0
1 // makeswf -v 7 -r 1 -o textformat-init-7.swf textformat-init.as
3 function check_and_reset () {
4 _global.TextFormat.prototype.hasOwnProperty = ASnative (101, 5);
5 trace (_global.TextFormat.prototype.hasOwnProperty ("size"));
6 _global.TextFormat.prototype = new Object ();
9 trace ("Check when TextFormat's native properties are initialized");
11 // FIXME: Not tested yet: The properties should only be created if the
12 // prototype Object has not been initialized by any object's constructor with
13 // native properties (TextField, TextFormat, XML, XMLNode at least)
15 check_and_reset ();
16 var tmp = new TextFormat ();
17 check_and_reset ();
19 var tmp = new TextField.StyleSheet ();
20 tmp.parse (".a { text-size: 4; }");
21 check_and_reset ();
23 this.createTextField ("t", 0, 0, 0, 100, 100);
24 t.text = "hello";
25 check_and_reset ();
26 t.getNewTextFormat ();
27 check_and_reset ();
28 t.setNewTextFormat (new Object ());
29 check_and_reset ();
30 t.getTextFormat ();
31 check_and_reset ();
32 t.getTextFormat (20, 21);
33 check_and_reset ();
34 t.getTextFormat (1, 2);
35 check_and_reset ();
36 t.setTextFormat (new Object ());
37 check_and_reset ();
38 tmp = t.textColor;
39 check_and_reset ();
40 t.textColor = 200;
41 check_and_reset ();
43 loadMovie ("FSCommand:quit", "");