[Top][All Lists]
[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 15:07:47 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Benjamin Wolsey <bwy> 08/02/13 15:07:46
Modified files:
. : ChangeLog
testsuite/misc-ming.all: PrototypeEventListeners.as
PrototypeEventListenersTestRunner.cpp
Log message:
More tests.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5638&r2=1.5639
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/PrototypeEventListeners.as?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/PrototypeEventListenersTestRunner.cpp?cvsroot=gnash&r1=1.1&r2=1.2
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5638
retrieving revision 1.5639
diff -u -b -r1.5638 -r1.5639
--- ChangeLog 13 Feb 2008 14:58:45 -0000 1.5638
+++ ChangeLog 13 Feb 2008 15:07:46 -0000 1.5639
@@ -1,3 +1,9 @@
+2008-02-13 Benjamin Wolsey <address@hidden>
+
+ * testsuite/misc-ming.all/PrototypeEventListeners.as: more tests.
+ * testsuite/misc-ming.all/PrototypeEventListenersTestRunner.cpp:
+ add tests.
+
2008-02-13 Sandro Santilli <address@hidden>
* doc/C/usermanual/usage.xml: document the new -F switch of gnash.
Index: testsuite/misc-ming.all/PrototypeEventListeners.as
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/PrototypeEventListeners.as,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- testsuite/misc-ming.all/PrototypeEventListeners.as 13 Feb 2008 14:44:14
-0000 1.2
+++ testsuite/misc-ming.all/PrototypeEventListeners.as 13 Feb 2008 15:07:46
-0000 1.3
@@ -12,7 +12,7 @@
#define xfail_check _root.xfail
#define xpass_check _root.xpass
-rcsid="$Id: PrototypeEventListeners.as,v 1.2 2008/02/13 14:44:14 bwy Exp $";
+rcsid="$Id: PrototypeEventListeners.as,v 1.3 2008/02/13 15:07:46 bwy Exp $";
var countMC;
@@ -60,7 +60,7 @@
test1 = function()
{
countMC = 0;
- note("1. Click!");
+ note("1. Click the mouse anywhere!");
_root.onMouseDown = function()
{
// clip1, clip2, and 2 Dejagnu clips.
@@ -73,19 +73,52 @@
{
countMC = 0;
clip1.removeMovieClip();
- note("2. Click!");
+ note("2. Click the mouse anywhere!");
_root.onMouseDown = function()
{
// clip2 and 2 Dejagnu clips.
check_equals(countMC, 3);
- endOfTest();
+ test3();
};
};
+test3 = function()
+{
+
+ advancer = new Object;
+ Key.addListener(advancer);
+
+ countMC = 0;
+ countOtherFunctions = 0;
+
+ clip1.removeMovieClip();
+ note("3. Press a key!");
+
+ _root.onKeyDown = function()
+ {
+ // clip2 and 2 Dejagnu clips.
+ countOtherFunctions++;
+ };
+
+ clip2.onKeyDown = function()
+ {
+ // clip2 and 2 Dejagnu clips.
+ countOtherFunctions++;
+ };
+
+ advancer.onKeyDown = function()
+ {
+ check_equals(countMC, 0);
+ check_equals(countOtherFunctions, 0);
+ endofTest();
+ };
+
+};
+
endOfTest = function()
{
- check_totals(9);
+ check_totals(11);
_root.ENDOFTEST = true;
note("END OF TEST");
};
Index: testsuite/misc-ming.all/PrototypeEventListenersTestRunner.cpp
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/PrototypeEventListenersTestRunner.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-ming.all/PrototypeEventListenersTestRunner.cpp 13 Feb
2008 14:44:14 -0000 1.1
+++ testsuite/misc-ming.all/PrototypeEventListenersTestRunner.cpp 13 Feb
2008 15:07:46 -0000 1.2
@@ -25,9 +25,9 @@
#include "character.h"
#include "dlist.h"
#include "log.h"
-#include "Point2d.h"
#include "VM.h"
#include "string_table.h"
+#include "gnash.h" // gnash::key::code
#include "check.h"
#include <string>
@@ -53,8 +53,6 @@
// for variables lookup (consistency checking)
string_table& st = root->getVM().getStringTable();
- typedef geometry::Point2d<int> IntPoint;
-
check_equals(root->get_frame_count(), 1);
check_equals(root->get_current_frame(), 0);
@@ -63,10 +61,14 @@
check_equals(root->get_current_frame(), 1);
+ tester.pressKey(gnash::key::A); // Should do nothing.
+
tester.click();
tester.click();
+ tester.pressKey(gnash::key::A);
+
// Consistency check !!
as_value eot;
// It's an swf6, so lowercase 'ENDOFTEST'