big merge from master, fix rpm creation, drop fetching swfdec
[gnash.git] / testsuite / misc-ming.all / DefineEditTextTest-Runner.cpp
blob6d85e14779f8ced0e2dde5ca367f8d0c9e964334
1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
21 #define INPUT_FILENAME "DefineEditTextTest.swf"
23 #include "MovieTester.h"
24 #include "MovieClip.h"
25 #include "DisplayObject.h"
26 #include "DisplayList.h"
27 #include "log.h"
29 #include "check.h"
30 #include <string>
31 #include <cassert>
33 using namespace gnash;
34 using namespace std;
36 int
37 main(int /*argc*/, char** /*argv*/)
39 string filename = string(TGTDIR) + string("/") + string(INPUT_FILENAME);
40 MovieTester tester(filename);
42 gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
43 dbglogfile.setVerbosity(1);
45 MovieClip* root = tester.getRootMovie();
46 assert(root);
48 check_equals(root->get_frame_count(), 5);
49 check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
50 check_equals(root->get_current_frame(), 0);
52 for (int i=0; i<30; ++i)
53 tester.advance();
55 // TODO: use check_pixel for checking bacground colors