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


From: Benjamin Wolsey
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Prototy...
Date: Wed, 13 Feb 2008 13:55:03 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Benjamin Wolsey <bwy>   08/02/13 13:55:03

Modified files:
        .              : ChangeLog 
Added files:
        testsuite/misc-ming.all: PrototypeEventListeners.as 

Log message:
                * testsuite/misc-ming.all/PrototypeEventListeners.as: test mouse
                  events on MovieClip prototypes.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5634&r2=1.5635
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/PrototypeEventListeners.as?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5634
retrieving revision 1.5635
diff -u -b -r1.5634 -r1.5635
--- ChangeLog   13 Feb 2008 13:29:21 -0000      1.5634
+++ ChangeLog   13 Feb 2008 13:55:02 -0000      1.5635
@@ -1,3 +1,8 @@
+2008-02-13 Benjamin Wolsey <address@hidden>
+
+       * testsuite/misc-ming.all/PrototypeEventListeners.as: test mouse
+         events on MovieClip prototypes.
+
 2008-02-13 Sandro Santilli <address@hidden>
 
        * server/asobj/SharedObject.cpp (flush): check return code from

Index: testsuite/misc-ming.all/PrototypeEventListeners.as
===================================================================
RCS file: testsuite/misc-ming.all/PrototypeEventListeners.as
diff -N testsuite/misc-ming.all/PrototypeEventListeners.as
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/PrototypeEventListeners.as  13 Feb 2008 13:55:02 
-0000      1.1
@@ -0,0 +1,86 @@
+// Build with:
+//     makeswf -o PrototypeEventListeners.swf ../Dejagnu.swf 
PrototypeEventListeners.as
+//
+
+#include "../actionscript.all/check.as"
+#include "../actionscript.all/utils.as"
+
+#define info _root.note
+#define note _root.note
+#define fail_check _root.fail
+#define pass_check  _root.pass
+#define xfail_check _root.xfail
+#define xpass_check _root.xpass
+
+rcsid="$Id: PrototypeEventListeners.as,v 1.1 2008/02/13 13:55:02 bwy Exp $";
+
+
+var countMC;
+var countTF;
+
+MovieClip.prototype.onMouseDown = function() { 
+              note(this+".onMouseDown");
+              note(typeof(this));
+              countMC++;
+};
+
+TextField.prototype.onMouseDown = function() { 
+              note(this+".onMouseDown");
+              note(typeof(this));
+              countTF++;
+};
+
+createEmptyMovieClip("clip1", 1);
+
+with (clip1)
+{
+       lineStyle(4, 0);
+       lineTo(50,50);
+}
+
+createEmptyMovieClip("clip2", 2);
+with (clip2)
+{
+       lineStyle(4, 0);
+       lineTo(50,25);
+}
+
+Dejagnu._y = 100;
+
+// Tests
+
+test1 = function()
+{
+       countMC = 0;
+       note("1. Click!");
+       _root.onMouseDown = function()
+       {
+               check_equals(countMC, 4);
+               test2();
+       };
+};
+
+test2 = function()
+{
+       countMC = 0;
+       clip1.removeMovieClip();
+       note("2. Click!");
+       
+       _root.onMouseDown = function()
+       {
+               check_equals(countMC, 3);
+               endOfTest();
+       };
+};
+
+endOfTest = function()
+{
+       _root.ENDOFTEST = true;
+       note("END OF TEST");
+       check_totals(2);
+       _root.onMouseDown = undefined;
+};
+
+test1();
+
+stop();




reply via email to

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