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: Fri, 20 Apr 2007 15:41:07 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/04/20 15:41:06

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

Log message:
                * testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp:
                  Take the covering clip in consideration while testing
                  the renderer - there are a few xfailed that I'd like
                  to fix.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2958&r2=1.2959
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp?cvsroot=gnash&r1=1.14&r2=1.15

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2958
retrieving revision 1.2959
diff -u -b -r1.2958 -r1.2959
--- ChangeLog   20 Apr 2007 15:03:24 -0000      1.2958
+++ ChangeLog   20 Apr 2007 15:41:06 -0000      1.2959
@@ -1,3 +1,15 @@
+2007-04-20 Sandro Santilli <address@hidden>
+
+       * testsuite/MovieTester.{cpp,h} (advance): advance
+         first, *then* render. Cache invalidated bound to
+         avoid loosing them.
+       * testsuite/misc-ming.all/attachMovieTestRunner.cpp:
+         Add renderer tests.
+       * testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp:
+         Take the covering clip in consideration while testing
+         the renderer - there are a few xfailed that I'd like
+         to fix.
+
 2007-04-20 Udo Giacomozzi <address@hidden>
 
        * backend/render_handler.h (getAveragePixel):

Index: testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp
===================================================================
RCS file: 
/sources/gnash/gnash/testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp 20 Apr 2007 14:06:42 
-0000      1.14
+++ testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp 20 Apr 2007 15:41:06 
-0000      1.15
@@ -34,8 +34,13 @@
 using namespace std;
 
 void
-test_mouse_activity(MovieTester& tester, const character* text, const 
character* text2)
+test_mouse_activity(MovieTester& tester, const character* text, const 
character* text2, bool covered)
 {
+       rgba red(255,0,0,255);
+       rgba covered_red(127,126,0,255); // red, covered by 50% black
+       rgba yellow(255,255,0,255);
+       rgba green(0,255,0,255);
+
        // roll over the middle of the square, this should change
        // the textfield value.
        tester.movePointerTo(60, 60);
@@ -43,7 +48,7 @@
        check_equals(string(text2->get_text_value()), string("RollOver"));
        check(tester.isMouseOverMouseEntity());
        // check that pixel @ 60,60 is yellow !
-       xcheck_pixel(2, rgba(255,255,0,255), 2);
+       xcheck_pixel(2, yellow, 2);
 
        // press the mouse button, this should change
        // the textfield value.
@@ -52,7 +57,7 @@
        check_equals(string(text2->get_text_value()), string("Press"));
        check(tester.isMouseOverMouseEntity());
        // check that pixel @ 60,60 is green !
-       xcheck_pixel(2, rgba(0,255,0,255), 2);
+       xcheck_pixel(2, green, 2);
 
        // depress the mouse button, this should change
        // the textfield value.
@@ -61,7 +66,7 @@
        check_equals(string(text2->get_text_value()), string("Release"));
        check(tester.isMouseOverMouseEntity());
        // check that pixel @ 60,60 is yellow !
-       xcheck_pixel(2, rgba(255,255,0,255), 2);
+       xcheck_pixel(2, yellow, 2);
 
        // roll off the square, this should change
        // the textfield value.
@@ -71,7 +76,11 @@
        check(!tester.isMouseOverMouseEntity());
        // check that pixel @ 60,60 is red !
        tester.movePointerTo(60, 60);
-       xcheck_pixel(2, rgba(255,0,0,255), 2);
+       if ( covered ) {
+               check_pixel(2, covered_red, 2);
+       } else {
+               check_pixel(2, red, 2);
+       }
        tester.movePointerTo(39, 60); // get back
 
        // press the mouse button, this should not change anything
@@ -82,7 +91,11 @@
        check(!tester.isMouseOverMouseEntity());
        // check that pixel @ 60,60 is red !
        tester.movePointerTo(60, 60);
-       xcheck_pixel(2, rgba(255,0,0,255), 2);
+       if ( covered ) {
+               check_pixel(2, covered_red, 2);
+       } else {
+               check_pixel(2, red, 2);
+       }
        tester.movePointerTo(39, 60); // get back
 
        // depress the mouse button, this should not change anything
@@ -93,7 +106,11 @@
        check(!tester.isMouseOverMouseEntity());
        // check that pixel @ 60,60 is red !
        tester.movePointerTo(60, 60);
-       xcheck_pixel(2, rgba(255,0,0,255), 2);
+       if ( covered ) {
+               check_pixel(2, covered_red, 2);
+       } else {
+               check_pixel(2, red, 2);
+       }
 
        // Now press the mouse inside and release outside
        tester.movePointerTo(60, 60); // should be there already
@@ -101,7 +118,7 @@
        check_equals(string(text2->get_text_value()), string("RollOver"));
        check(tester.isMouseOverMouseEntity());
        // check that pixel @ 60,60 is yellow !
-       xcheck_pixel(2, rgba(255,255,0,255), 2);
+       xcheck_pixel(2, yellow, 2);
        
        tester.pressMouseButton();
        check_equals(string(text->get_text_value()), string("MouseDown"));
@@ -176,7 +193,7 @@
                check_equals(root->get_current_frame(), fno);
 
                info (("testing mouse activity in frame %d", 
root->get_current_frame()));
-               test_mouse_activity(tester, text, text2);
+               test_mouse_activity(tester, text, text2, square_front!=NULL);
 
                // TODO: test key presses !
                //       They seem NOT to trigger immediate redraw




reply via email to

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