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


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/ButtonE...
Date: Wed, 22 Nov 2006 11:49:56 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/11/22 11:49:56

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: ButtonEventsTest-Runner.cpp 

Log message:
                * testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp: updated
                  to perform the tests in all frames.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1705&r2=1.1706
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp?cvsroot=gnash&r1=1.5&r2=1.6

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1705
retrieving revision 1.1706
diff -u -b -r1.1705 -r1.1706
--- ChangeLog   22 Nov 2006 11:44:40 -0000      1.1705
+++ ChangeLog   22 Nov 2006 11:49:55 -0000      1.1706
@@ -1,5 +1,7 @@
 2006-11-22 Sandro Santilli <address@hidden>
 
+       * testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp: updated
+         to perform the tests in all frames.
        * testsuite/misc-ming.all/ButtonEventsTest.c: added two more
          frames to the testcase adding shapes at lower (frame1) and
          higher (frame2) depth then the button. The aim is debugging

Index: testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp
===================================================================
RCS file: 
/sources/gnash/gnash/testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp 11 Nov 2006 14:36:33 
-0000      1.5
+++ testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp 22 Nov 2006 11:49:56 
-0000      1.6
@@ -33,35 +33,9 @@
 using namespace gnash;
 using namespace std;
 
-int
-main(int /*argc*/, char** /*argv*/)
+void
+test_mouse_activity(MovieTester& tester, const character* text)
 {
-       string filename = INPUT_FILENAME;
-       MovieTester tester(filename);
-
-       // TODO: check why we need this !!
-       //       I wouldn't want the first advance to be needed
-       tester.advance();
-
-       gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
-       dbglogfile.setVerbosity(1);
-
-       sprite_instance* root = tester.getRootMovie();
-       assert(root);
-
-       check_equals(root->get_frame_count(), 1);
-
-       const character* mc1 = tester.findDisplayItemByName(*root, "square1");
-       check(mc1);
-
-       const character* text = tester.findDisplayItemByName(*root, 
"textfield");
-       check(text);
-
-       check_equals(string(text->get_text_value()), string("Play with the 
button"));
-       check(!tester.isMouseOverMouseEntity());
-
-       // TODO: check that pixel @ 60,60 is red !
-
        // roll over the middle of the square, this should change
        // the textfield value.
        tester.movePointerTo(60, 60);
@@ -105,3 +79,58 @@
        // TODO: check that pixel @ 60,60 is red !
 }
 
+int
+main(int /*argc*/, char** /*argv*/)
+{
+       string filename = INPUT_FILENAME;
+       MovieTester tester(filename);
+
+       gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
+       dbglogfile.setVerbosity(1);
+
+       sprite_instance* root = tester.getRootMovie();
+       assert(root);
+
+       check_equals(root->get_frame_count(), 3);
+
+       check_equals(root->get_current_frame(), 0);
+
+       const character* mc1 = tester.findDisplayItemByName(*root, "square1");
+       check(mc1);
+       check_equals(mc1->get_depth(), 2);
+
+       const character* text = tester.findDisplayItemByName(*root, 
"textfield");
+       check(text);
+
+       const character* square_back = tester.findDisplayItemByDepth(*root, 1);
+       check(!square_back);
+       const character* square_front = tester.findDisplayItemByDepth(*root, 3);
+       check(!square_front);
+
+       check_equals(string(text->get_text_value()), string("Play with the 
button"));
+       check(!tester.isMouseOverMouseEntity());
+       // TODO: check that pixel @ 60,60 is red !
+
+       // TODO: check why we need this !!
+       //       I wouldn't want the first advance to be needed
+       tester.advance();
+       check_equals(root->get_current_frame(), 0);
+
+       for (int fno=0; fno<root->get_frame_count(); fno++)
+       {
+               check_equals(root->get_current_frame(), fno);
+
+               info (("testing mouse activity in frame %d", 
root->get_current_frame()));
+               test_mouse_activity(tester, text);
+
+               // TODO: check why we need this !!
+               //       I wouldn't want the first advance to be needed
+               tester.advance();
+
+       }
+
+       // last advance should restart the loop...
+       check_equals(root->get_current_frame(), 0);
+
+}
+




reply via email to

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