[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Text...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Text... |
Date: |
Tue, 14 Aug 2007 03:04:29 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/08/14 03:04:29
Modified files:
. : ChangeLog
testsuite/actionscript.all: TextField.as
Log message:
* testsuite/actionscript.all/TextField.as: add more tests for
background, backgroundColor and interaction between _width and
autoSize.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4003&r2=1.4004
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/TextField.as?cvsroot=gnash&r1=1.14&r2=1.15
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4003
retrieving revision 1.4004
diff -u -b -r1.4003 -r1.4004
--- ChangeLog 13 Aug 2007 12:33:01 -0000 1.4003
+++ ChangeLog 14 Aug 2007 03:04:28 -0000 1.4004
@@ -1,3 +1,9 @@
+2007-08-13 Sandro Santilli <address@hidden>
+
+ * testsuite/actionscript.all/TextField.as: add more tests for
+ background, backgroundColor and interaction between _width and
+ autoSize.
+
2007-08-13 Zou Lunkai <address@hidden>
* server/sprite_instance.{h,cpp}: deprecate clone_display_object(), use
Index: testsuite/actionscript.all/TextField.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/TextField.as,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- testsuite/actionscript.all/TextField.as 13 Aug 2007 03:26:10 -0000
1.14
+++ testsuite/actionscript.all/TextField.as 14 Aug 2007 03:04:29 -0000
1.15
@@ -19,7 +19,7 @@
// compile this test case with Ming makeswf, and then
// execute it like this gnash -1 -r 0 -v out.swf
-rcsid="$Id: TextField.as,v 1.14 2007/08/13 03:26:10 strk Exp $";
+rcsid="$Id: TextField.as,v 1.15 2007/08/14 03:04:29 strk Exp $";
#include "check.as"
@@ -169,11 +169,38 @@
check_equals(typeof(tf.background), 'boolean');
check(!tf.hasOwnProperty('background'));
+check_equals(tf.background, false);
+tf.background = true;
+check_equals(tf.background, true);
+tf.background = 0;
+check_equals(tf.background, false);
+check_equals(typeof(tf.background), 'boolean');
+tf.background = 54.3;
+check_equals(typeof(tf.background), 'boolean');
+check_equals(tf.background, true);
+o = new Object; o.valueOf = function() { return 0x0000FF; };
+tf.background = o;
+check_equals(tf.background, true);
+o = new Object; o.valueOf = function() { return 'string'; };
+tf.background = o;
+check_equals(typeof(tf.background), 'boolean');
+check_equals(tf.background, true); // 'string' evaluates to true
+tf.background = new Boolean(false);
+check_equals(typeof(tf.background), 'boolean');
+check_equals(tf.background, true); // dunno why, but Boolean evaluates to
false
+tf.background = false;
// Check TextField.backgroundColor
check_equals(typeof(tf.backgroundColor), 'number');
check(!tf.hasOwnProperty('backgroundColor'));
+tf.backgroundColor = 0x00FF00;
+check_equals(tf.backgroundColor, 0x00FF00);
+tf.backgroundColor = 'red';
+check_equals(tf.backgroundColor, 0x000000); // string value evaluates to NaN
thus 0
+o = new Object; o.valueOf = function() { return 0x0000FF; };
+tf.backgroundColor = o;
+check_equals(tf.backgroundColor, 0x0000FF); // valueOf is invoked
// Check TextField.border
@@ -588,5 +615,12 @@
xcheck_equals(tf._height, currHeight*2);
tf._yscale = 100;
+// Check interaction between autoSize and _width
+tf._width = 10; // "hello world" text should overflow this
+tf.text = "Hello world";
+tf.autoSize = 'none';
+xcheck_equals(tf._width, 10);
+tf.autoSize = 'center';
+check(tf._width > 10);
#endif // OUTPUT_VERSION > 5
- [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Text...,
Sandro Santilli <=