[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE... |
Date: |
Wed, 15 Nov 2006 14:30:08 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/11/15 14:30:08
Modified files:
. : ChangeLog
testsuite/misc-ming.all: DefineEditTextVariableNameTest.c
ming_utils.c ming_utils.h
Log message:
* testsuite/misc-ming.all/ming_utils.{c,h}:
removed add_xtrace_function from header,
changed add_dejagnu_functions to take a font object and
to create the xtrace window w/out the drawing api (so
that gnash is able to use it)
* testsuite/misc-ming.all/DefineEditTextVariableNameTest.c:
use pixel coordinates.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1622&r2=1.1623
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DefineEditTextVariableNameTest.c?cvsroot=gnash&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/ming_utils.c?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/ming_utils.h?cvsroot=gnash&r1=1.6&r2=1.7
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1622
retrieving revision 1.1623
diff -u -b -r1.1622 -r1.1623
--- ChangeLog 15 Nov 2006 12:57:07 -0000 1.1622
+++ ChangeLog 15 Nov 2006 14:30:08 -0000 1.1623
@@ -1,5 +1,15 @@
2006-11-15 Sandro Santilli <address@hidden>
+ * testsuite/misc-ming.all/ming_utils.{c,h}:
+ removed add_xtrace_function from header,
+ changed add_dejagnu_functions to take a font object and
+ to create the xtrace window w/out the drawing api (so
+ that gnash is able to use it)
+ * testsuite/misc-ming.all/DefineEditTextVariableNameTest.c:
+ use pixel coordinates.
+
+2006-11-15 Sandro Santilli <address@hidden>
+
* backend/render_handler_agg.cpp: comment out unneeded
assertion (see https://savannah.gnu.org/bugs/?18119#comment2)
Index: testsuite/misc-ming.all/DefineEditTextVariableNameTest.c
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/DefineEditTextVariableNameTest.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- testsuite/misc-ming.all/DefineEditTextVariableNameTest.c 14 Nov 2006
11:09:42 -0000 1.14
+++ testsuite/misc-ming.all/DefineEditTextVariableNameTest.c 15 Nov 2006
14:30:08 -0000 1.15
@@ -159,11 +159,11 @@
Ming_init();
Ming_useSWFVersion (OUTPUT_VERSION);
- Ming_setScale(1.0); /* so we talk twips */
+ Ming_setScale(20.0); /* let's talk pixels */
mo = newSWFMovie();
SWFMovie_setRate(mo, 1);
- SWFMovie_setDimension(mo, 12560, 9020);
+ SWFMovie_setDimension(mo, 628, 451);
font_file = fopen(fdbfont, "r");
if ( font_file == NULL )
@@ -223,7 +223,7 @@
*********************************************/
/*add_xtrace_function(mo, 3000, 0, 50, 400, 800);*/
- add_dejagnu_functions(mo, 3000, 0, 50, 400, 800);
+ add_dejagnu_functions(mo, bfont, 3000, 0, 50, 400, 800);
/*********************************************
*
Index: testsuite/misc-ming.all/ming_utils.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/ming_utils.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- testsuite/misc-ming.all/ming_utils.c 14 Nov 2006 10:58:35 -0000
1.8
+++ testsuite/misc-ming.all/ming_utils.c 15 Nov 2006 14:30:08 -0000
1.9
@@ -23,24 +23,45 @@
#include <ming_utils.h>
void
-add_xtrace_function(SWFMovie mo, int depth, int x, int y, int width, int
height)
+add_xtrace_function(SWFMovie mo, SWFBlock font, int depth, int x, int y, int
width, int height)
{
- SWFAction ac;
-
- static const size_t buflen = 1024;
-
- char buf[buflen];
-
- snprintf(buf, buflen, "createTextField(\"out\", %d, %d, %d, %d, %d); "
- " xtrace = function (msg) { "
+ SWFTextField tf;
+ SWFDisplayItem it;
+ const char* asciichars = "address@hidden&*()-_=+[]{};:.>,</?'\"\\|`~";
+
+ tf = newSWFTextField();
+
+ SWFTextField_setFont(tf, font);
+
+ /* setting flags seem unneeded */
+ /*SWFTextField_setFlags(tf, SWFTEXTFIELD_USEFONT|SWFTEXTFIELD_NOEDIT);*/
+
+ /* Add all ascii chars */
+ SWFTextField_addChars(tf, asciichars);
+ SWFTextField_addString(tf, " - xtrace enabled -\n");
+
+ SWFTextField_setBounds(tf, width, height);
+
+ /*SWFTextField_setHeight(tf, 240);*/
+ /*SWFTextField_setColor(tf, 0x00, 0x00, 0x00, 0xff);*/
+ /*SWFTextField_setAlignment(tf, SWFTEXTFIELD_ALIGN_LEFT);*/
+ /*SWFTextField_setLeftMargin(tf, 0);*/
+ /*SWFTextField_setRightMargin(tf, 0);*/
+ /*SWFTextField_setIndentation(tf, 0);*/
+ /*SWFTextField_setLineSpacing(tf, 40);*/
+ /*SWFTextField_setLineSpacing(tf, 40);*/
+
+ it = SWFMovie_add(mo, (SWFBlock)tf);
+ SWFDisplayItem_moveTo(it, x, y);
+ SWFDisplayItem_setDepth(it, depth);
+ SWFDisplayItem_setName(it, "_xtrace_win");
+
+ /* Where would we find the _xtrace_win ? */
+ add_actions(mo,
+ " _global.xtrace = function (msg) { "
" trace (msg); "
- " _level0.out.text += msg + '\n'; "
- "};",
- depth, x, y, width, height);
- buf[buflen-1] = '\0';
- ac = compileSWFActionCode(buf);
-
- SWFMovie_add(mo, (SWFBlock)ac);
+ " _level0._xtrace_win.text += msg + '\n'; "
+ "};");
}
SWFShape
@@ -74,12 +95,12 @@
}
void
-add_dejagnu_functions(SWFMovie mo,
+add_dejagnu_functions(SWFMovie mo, SWFBlock font,
int depth, int x, int y, int width, int height)
{
SWFAction ac;
- add_xtrace_function(mo, depth, x, y, width, height);
+ add_xtrace_function(mo, font, depth, x, y, width, height);
static const size_t BUFLEN = 2048;
@@ -117,7 +138,7 @@
" xtrace('#expected failures: '+ this.xfailed);\n"
" }\n"
"};\n"
- "runtest = new TestState();\n"
+ "_global.runtest = new TestState();\n"
"function check_equals(obt, exp) {\n"
" if ( obt == exp ) runtest.pass(obt+' == '+exp);\n"
" else runtest.fail('expected: '+exp+' , obtained: '+obt);\n"
Index: testsuite/misc-ming.all/ming_utils.h
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/ming_utils.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- testsuite/misc-ming.all/ming_utils.h 14 Nov 2006 10:58:35 -0000
1.6
+++ testsuite/misc-ming.all/ming_utils.h 15 Nov 2006 14:30:08 -0000
1.7
@@ -23,18 +23,16 @@
#include <ming.h>
/** \brief
- * Add an 'xtrace' function that both traces usin 'trace' and
- * printing to a textfield created using the given depth, position and size
+ * Add 'check', 'xcheck', 'check_equals', 'xcheck_equals' ActionScript
+ * functions for use by embedded-swf tests, and a textfield to print
+ * results of the checks to (results will additionally be 'traced').
+ * The textfield uses embedded fonts (only ascii chars loaded).
+ *
+ * Note that the x, y, width and height parameters will depend on
+ * the currently set Ming scale (see Ming_setScale). By default
+ * they are pixels (twips*20).
*/
-void add_xtrace_function(SWFMovie mo, int depth, int x, int y, int width, int
height);
-
-/** \brief
- * Add 'check', 'xcheck', 'check_equals', 'xcheck_equals' functions for
- * use by embedded-swf tests.
- * This function will internally call add_xtrace_function with the
- * given parameters
- */
-void add_dejagnu_functions(SWFMovie mo, int depth, int x, int y, int width,
int height);
+void add_dejagnu_functions(SWFMovie mo, SWFBlock font, int depth, int x, int
y, int width, int height);
/** \brief
* Evaluate ActionScript 'expr' expression updating the global TestState
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE..., Sandro Santilli, 2006/11/06
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE..., Sandro Santilli, 2006/11/13
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE..., Sandro Santilli, 2006/11/14
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE...,
Sandro Santilli <=
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE..., Sandro Santilli, 2006/11/15
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE..., Sandro Santilli, 2006/11/28
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE..., Sandro Santilli, 2006/11/29