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/key_eve...


From: Zou Lunkai
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/key_eve...
Date: Tue, 17 Jul 2007 07:42:24 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  07/07/17 07:42:24

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

Log message:
        * testsuite/misc-ming.all/key_event_test5.c: make tests not dependent
          on the time of a key press, better self-contained.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3742&r2=1.3743
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/key_event_test5.c?cvsroot=gnash&r1=1.4&r2=1.5

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3742
retrieving revision 1.3743
diff -u -b -r1.3742 -r1.3743
--- ChangeLog   17 Jul 2007 06:04:21 -0000      1.3742
+++ ChangeLog   17 Jul 2007 07:42:23 -0000      1.3743
@@ -1,5 +1,10 @@
 2007-07-17 Zou Lunkai <address@hidden>
 
+       * testsuite/misc-ming.all/key_event_test5.c: make tests not dependent
+         on the time of a key press, better self-contained.
+       
+2007-07-17 Zou Lunkai <address@hidden>
+
        * server/asobj/Key.h, server/asobj/Key.cpp, 
          server/button_character_instance.cpp
          server/edit_text_character.cpp, server/movie_root.h, 

Index: testsuite/misc-ming.all/key_event_test5.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/key_event_test5.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- testsuite/misc-ming.all/key_event_test5.c   11 Jul 2007 06:43:08 -0000      
1.4
+++ testsuite/misc-ming.all/key_event_test5.c   17 Jul 2007 07:42:23 -0000      
1.5
@@ -35,8 +35,6 @@
 {
   SWFMovie mo;
   SWFMovieClip dejagnuclip;
-  SWFShape sh1, sh2;
-  SWFDisplayItem it1, it2;
   int i;
 
 
@@ -57,7 +55,7 @@
   // frame1
   dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0, 
800, 600);
   SWFMovie_add(mo, (SWFBlock)dejagnuclip);
-  add_actions(mo, " hasKeyPressed = false; " );
+  add_actions(mo, " hasKeyPressed = false; _root.frmNum = 0;" );
 
   add_actions(mo, " obj = new Object(); "
                   " obj.x = 1; "
@@ -66,6 +64,7 @@
                   "   _root.note('key listener invoked'); "
                   "   hasKeyPressed = true; "
                   "   _root.objRef = this; "
+                  "   _root.frmNum = _root._currentframe; "
                   " };" 
                   " Key.addListener(obj); "
                   // After deleting obj, we still have a key listener kept 
alive!
@@ -85,10 +84,6 @@
                    "{"
                    "  check_equals(typeof(objRef), 'object');"
                    "  check_equals(objRef.x, 1);"
-                   // reset testing variables
-                   "  hasKeyPressed = false;"
-                   "  _root.x1 = 0; "
-                   "  objRef.x = 0; "
                    // remove the key listener from the global key
                    "  Key.removeListener(objRef); "
                    // check that objRef is still alive
@@ -99,16 +94,27 @@
                    "else"
                    "{"
                    "  check_equals(typeof(objRef), 'undefined');"
-                   "}");
+                   "}"
+                   // reset testing variables
+                   "hasKeyPressed = false;");
   
   for(i=5; i<10; i++)
   {
     SWFMovie_nextFrame(mo); 
   }          
   
-  check_equals(mo, "hasKeyPressed", "false");   
   check_equals(mo, "typeof(obj)", "'undefined'"); 
-  check_equals(mo, "typeof(objRef)", "'undefined'"); 
+  
+  add_actions(mo, "if(_root.frmNum < 6)"
+                  "{"
+                  "   check_equals(hasKeyPressed, false); "
+                  "   check_equals(typeof(objRef), 'undefined'); "
+                  "} else"
+                  "{"
+                  "   check_equals(hasKeyPressed, true); "
+                  "   check_equals(typeof(objRef), 'object'); "
+                  "}");
+
   
   add_actions(mo, "stop(); totals();");
   SWFMovie_nextFrame(mo);  
@@ -119,3 +125,5 @@
 
   return 0;
 }
+
+




reply via email to

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