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


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil...
Date: Thu, 08 Feb 2007 22:20:44 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/02/08 22:20:44

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: Makefile.am 
Added files:
        testsuite/misc-ming.all: loadMovieTestRunner.cpp 

Log message:
                * testsuite/misc-ming.all/: Makefile.am, 
loadMovieTestRunner.cpp:
                  Test runner for loadMovie.swf.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2279&r2=1.2280
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.60&r2=1.61
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/loadMovieTestRunner.cpp?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2279
retrieving revision 1.2280
diff -u -b -r1.2279 -r1.2280
--- ChangeLog   8 Feb 2007 19:32:00 -0000       1.2279
+++ ChangeLog   8 Feb 2007 22:20:43 -0000       1.2280
@@ -1,3 +1,8 @@
+2007-02-08 Sandro Santilli <address@hidden>
+
+       * testsuite/misc-ming.all/: Makefile.am, loadMovieTestRunner.cpp:
+         Test runner for loadMovie.swf.
+
 2007-02-08 Bastiaan Jacques <address@hidden>
 
        * server/debugger.cpp: Simple cleanup: remove unneeded casts.

Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -b -r1.60 -r1.61
--- testsuite/misc-ming.all/Makefile.am 8 Feb 2007 15:57:06 -0000       1.60
+++ testsuite/misc-ming.all/Makefile.am 8 Feb 2007 22:20:44 -0000       1.61
@@ -81,6 +81,7 @@
        action_execution_order_test \
        KeyTest-Runner \
        loadMovieTest \
+       loadMovieTestRunner \
        $(NULL)
 
 check_SCRIPTS = \
@@ -443,6 +444,21 @@
 loadMovieTest_LDADD = $(MING_LIBS)
 loadMovieTest.swf: loadMovieTest
        ./loadMovieTest $(top_srcdir)/testsuite/media
+loadMovieTestRunner_SOURCES = \
+       loadMovieTestRunner.cpp \
+       $(NULL)
+loadMovieTestRunner_LDADD = \
+       $(top_builddir)/testsuite/libtestsuite.la \
+       $(NULL)
+loadMovieTestRunner_CXXFLAGS = \
+       -DSRCDIR='"$(srcdir)"' \
+       -DTGTDIR='"$(abs_builddir)"' \
+       -DMEDIADIR='"$(top_srcdir)/testsuite/media"'
+       $(NULL)
+loadMovieTestRunner_DEPENDENCIES = \
+       loop_test.swf \
+       $(top_builddir)/testsuite/libtestsuite.la \
+       $(NULL)
 
 #loadMovieTest_Runner_SOURCES = \
 #      loadMovieTest-Runner.cpp \

Index: testsuite/misc-ming.all/loadMovieTestRunner.cpp
===================================================================
RCS file: testsuite/misc-ming.all/loadMovieTestRunner.cpp
diff -N testsuite/misc-ming.all/loadMovieTestRunner.cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/loadMovieTestRunner.cpp     8 Feb 2007 22:20:44 
-0000       1.1
@@ -0,0 +1,103 @@
+/* 
+ *   Copyright (C) 2007 Free Software Foundation, Inc.
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ *
+ */ 
+
+#define INPUT_FILENAME "loadMovieTest.swf"
+
+#include "MovieTester.h"
+#include "sprite_instance.h"
+#include "character.h"
+#include "dlist.h"
+#include "container.h"
+#include "log.h"
+#include "URL.h"
+
+#include "check.h"
+#include <string>
+#include <cassert>
+
+using namespace gnash;
+using namespace std;
+
+int
+main(int /*argc*/, char** /*argv*/)
+{
+       gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
+       dbglogfile.setVerbosity(1);
+
+       string filename = string(TGTDIR) + string("/") + string(INPUT_FILENAME);
+       MovieTester tester(filename);
+
+       URL baseURL(filename);
+       URL mediaURL(MEDIADIR"/");
+       URL lynchURL("lynch.swf", mediaURL);
+       URL greenURL("green.jpg", mediaURL);
+       URL offspringURL("offspring.swf", mediaURL);
+       std::string url;
+
+
+       sprite_instance* root = tester.getRootMovie();
+       assert(root);
+
+       check_equals(root->get_frame_count(), 1);
+       check_equals(root->get_current_frame(), 0);
+
+       tester.advance();
+       check_equals(root->get_current_frame(), 0);
+
+       // Verify that 'coverart' exists and is empty
+       character* coverartch = 
const_cast<character*>(tester.findDisplayItemByName(*root, "coverart"));
+       sprite_instance* coverart = coverartch->to_movie();
+       check(coverart);
+       url = coverart->get_movie_definition()->get_url();
+       check_equals(coverart->get_movie_definition()->get_url(), 
baseURL.str());
+
+       // Click on the first (lynch)
+       tester.movePointerTo(80, 80);
+       check(tester.isMouseOverMouseEntity());
+       tester.pressMouseButton();
+       sleep(1); // give it some time...
+       coverartch = const_cast<character*>(tester.findDisplayItemByName(*root, 
"coverart"));
+       check(coverart != coverartch->to_movie());
+       coverart = coverartch->to_movie();
+       check_equals(coverart->get_movie_definition()->get_url(), 
lynchURL.str());
+       tester.depressMouseButton();
+
+       // Click on the second (green)
+       tester.movePointerTo(280, 80);
+       check(tester.isMouseOverMouseEntity());
+       tester.pressMouseButton();
+       tester.depressMouseButton();
+       sleep(1); // give it some time...
+       coverartch = const_cast<character*>(tester.findDisplayItemByName(*root, 
"coverart"));
+       coverart = coverartch->to_movie();
+       // Load of JPEG files is still unsupported
+       xcheck_equals(coverart->get_movie_definition()->get_url(), 
greenURL.str());
+
+       // Click on the third (offspring)
+       tester.movePointerTo(480, 80);
+       check(tester.isMouseOverMouseEntity());
+       tester.pressMouseButton();
+       tester.depressMouseButton();
+       sleep(1); // give it some time to load
+       coverartch = const_cast<character*>(tester.findDisplayItemByName(*root, 
"coverart"));
+       coverart = coverartch->to_movie();
+       xcheck_equals(coverart->get_movie_definition()->get_url(), 
offspringURL.str());
+
+}
+




reply via email to

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