gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE...


From: Zou Lunkai
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE...
Date: Fri, 13 Jul 2007 02:02:33 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  07/07/13 02:02:33

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: DefineEditTextTest.c 

Log message:
        * testsuite/misc-ming.all/DefineEditTextTest.c:
          include dejagnuclip, make it to be a self-contained one.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3727&r2=1.3728
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DefineEditTextTest.c?cvsroot=gnash&r1=1.9&r2=1.10

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3727
retrieving revision 1.3728
diff -u -b -r1.3727 -r1.3728
--- ChangeLog   13 Jul 2007 01:13:45 -0000      1.3727
+++ ChangeLog   13 Jul 2007 02:02:32 -0000      1.3728
@@ -1,3 +1,8 @@
+2007-07-13 Zou Lunkai <address@hidden>
+
+       * testsuite/misc-ming.all/DefineEditTextTest.c:
+         include dejagnuclip, make it to be a self-contained one.
+         
 2007-07-12 <address@hidden>
 
        Applied patch #6081

Index: testsuite/misc-ming.all/DefineEditTextTest.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/DefineEditTextTest.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- testsuite/misc-ming.all/DefineEditTextTest.c        1 Jul 2007 10:54:45 
-0000       1.9
+++ testsuite/misc-ming.all/DefineEditTextTest.c        13 Jul 2007 02:02:33 
-0000      1.10
@@ -1,5 +1,5 @@
 /* 
- *   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ *   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -30,6 +30,8 @@
 #include <stdio.h>
 #include <ming.h>
 
+#include "ming_utils.h"
+
 #define OUTPUT_VERSION 7
 #define OUTPUT_FILENAME "DefineEditTextTest.swf"
 
@@ -57,7 +59,7 @@
         *
         * Ref: https://savannah.gnu.org/bugs/?func=detailitem&item_id=16637.
         */
-       SWFTextField_setBounds(tf, 260, 338);
+  SWFTextField_setBounds(tf, 100, 100);
        //SWFTextField_setBounds(tf, 60000, 338);
 
        /*
@@ -83,6 +85,7 @@
        SWFMovie mo;
        const char *srcdir=".";
        char fdbfont[256];
+  SWFMovieClip  dejagnuclip;
 
        /*********************************************
         *
@@ -107,15 +110,17 @@
  
        mo = newSWFMovie();
        SWFMovie_setRate(mo, 12);
-       //SWFMovie_setDimension(mo, 12560, 9020);
+  SWFMovie_setDimension(mo, 800, 600);
+  
+  dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 
800, 600);
+  SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+  SWFMovie_nextFrame(mo); // 1st frame 
 
        /*********************************************
         *
         * Add some textfields
         *
         *********************************************/
-
-       /* This is with embedded fonts, not working */
        {
                SWFDisplayItem it;
                FILE *font_file = fopen(fdbfont, "r");
@@ -127,44 +132,60 @@
                SWFBrowserFont bfont = newSWFBrowserFont("_sans");
                SWFFont efont = loadSWFFontFromFile(font_file);
 
-               it = add_text_field(mo, (SWFBlock)bfont, "Hello device _sans 
font world");
-               SWFDisplayItem_setName(it, "dtext");
-               SWFDisplayItem_moveTo(it, 60, 60);
-               it = add_text_field(mo, (SWFBlock)efont, "Hello embedded font 
world");
-               SWFDisplayItem_setName(it, "etext");
-               SWFDisplayItem_moveTo(it, 60, 120);
+    it = add_text_field(mo, (SWFBlock)bfont, "Hello");
+    SWFDisplayItem_setName(it, "dtext1");
+    SWFDisplayItem_moveTo(it, 0, 200);
+    it = add_text_field(mo, (SWFBlock)efont, "Hello");
+    SWFDisplayItem_setName(it, "etext1");
+    SWFDisplayItem_moveTo(it, 0, 300);
 
                SWFBrowserFont bfont2 = newSWFBrowserFont("times");
-               it = add_text_field(mo, (SWFBlock)bfont2, "Hello device times 
font world");
+    it = add_text_field(mo, (SWFBlock)bfont2, "Hello");
                SWFDisplayItem_setName(it, "dtext2");
-               SWFDisplayItem_moveTo(it, 60, 180);
+    SWFDisplayItem_moveTo(it, 0, 400);
        }
+  SWFMovie_nextFrame(mo); 
 
-       SWFMovie_add(mo, newSWFAction("offset = 1; count=0;"
-                               "onEnterFrame = function() {"
-                               " if ( ++count > 10 ) { count = 0; offset = 
-offset; }"
-                               " etext._y += offset;"
-                               " etext._x += offset;"
-                               //" etext._rotation += offset;"
-                               " dtext._y += offset;"
-                               " dtext._x += offset;"
-                               //" dtext._rotation += offset;"
-                               " dtext2._y += offset;"
-                               " dtext2._x += offset;"
-                               //" dtext2._rotation += offset;"
-                               "};"
-                               ));
 
+  check_equals(mo, "dtext1.text", "'Hello'");
+  check_equals(mo, "etext1.text", "'Hello'");
+  check_equals(mo, "dtext2.text", "'Hello'");
+  xcheck_equals(mo, "dtext1.background", "false");
+  xcheck_equals(mo, "etext1.background", "false");
+  xcheck_equals(mo, "dtext2.background", "false");
+  xcheck_equals(mo, "dtext1.backgroundColor", "0xffffff");
+  xcheck_equals(mo, "etext1.backgroundColor", "0xffffff");
+  xcheck_equals(mo, "dtext2.backgroundColor", "0xffffff");
+  
+  add_actions(mo, "dtext1.background = true;"
+                  "etext1.background = true;"
+                  "dtext2.background = true;"
+                  "dtext1.backgroundColor = 0xff0000;"
+                  "etext1.backgroundColor = 0x00ff00;"
+                  "dtext2.backgroundColor = 0x0000ff;"
+                  "dtext1.text += ' world';"
+                  "etext1.text += ' world';"
+                  "dtext2.text += ' world';" );
+
+  check_equals(mo, "dtext1.text", "'Hello world'");
+  check_equals(mo, "etext1.text", "'Hello world'");
+  check_equals(mo, "dtext2.text", "'Hello world'");
+  check_equals(mo, "dtext1.background", "true");
+  check_equals(mo, "etext1.background", "true");
+  check_equals(mo, "dtext2.background", "true");
+  check_equals(mo, "dtext1.backgroundColor", "0xff0000");
+  check_equals(mo, "etext1.backgroundColor", "0x00ff00");
+  check_equals(mo, "dtext2.backgroundColor", "0x0000ff");
+  
+  add_actions(mo, "totals(); stop();");
+  SWFMovie_nextFrame(mo); 
        /*****************************************************
         *
         * Output movie
         *
         *****************************************************/
-
        puts("Saving " OUTPUT_FILENAME );
 
-       SWFMovie_nextFrame(mo); /* showFrame */
-
        SWFMovie_save(mo, OUTPUT_FILENAME);
 
        return 0;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]