[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Video-E...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Video-E... |
Date: |
Wed, 23 Jan 2008 17:25:52 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/01/23 17:25:52
Modified files:
. : ChangeLog
testsuite/misc-ming.all: Video-EmbedSquareTest.c
Video-EmbedSquareTestRunner.cpp
Log message:
have mouse clicks change play state, check that play state of the root
drives play state of the video.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5479&r2=1.5480
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Video-EmbedSquareTest.c?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Video-EmbedSquareTestRunner.cpp?cvsroot=gnash&r1=1.9&r2=1.10
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5479
retrieving revision 1.5480
diff -u -b -r1.5479 -r1.5480
--- ChangeLog 23 Jan 2008 16:33:44 -0000 1.5479
+++ ChangeLog 23 Jan 2008 17:25:51 -0000 1.5480
@@ -1,5 +1,12 @@
2008-01-23 Sandro Santilli <address@hidden>
+ * testsuite/misc-ming.all/: Video-EmbedSquareTest.c,
+ Video-EmbedSquareTestRunner.cpp: have mouse clicks change
+ play state, check that play state of the root drives
+ play state of the video.
+
+2008-01-23 Sandro Santilli <address@hidden>
+
* libbase/log.{cpp,h}: append to the log instead of truncating.
This is so a web page containing multiple SWF movies doesn't
trigger writes to truncated logs.
Index: testsuite/misc-ming.all/Video-EmbedSquareTest.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Video-EmbedSquareTest.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- testsuite/misc-ming.all/Video-EmbedSquareTest.c 1 Jul 2007 10:54:47
-0000 1.3
+++ testsuite/misc-ming.all/Video-EmbedSquareTest.c 23 Jan 2008 17:25:52
-0000 1.4
@@ -71,6 +71,13 @@
stream = newSWFVideoStream_fromFile(flv);
item = SWFMovie_add(mo, (SWFBlock)stream);
+ // Mouse clicks toggle play/stop
+ add_actions(mo,
+ "_root.onMouseDown = function() {"
+ " if (stopped) { play(); stopped=false; }"
+ " else { stop(); stopped=true; }"
+ "};");
+
// TODO: dynamic frame rate adjust
frames = SWFVideoStream_getNumFrames(stream);
for(; frames > 0; frames--)
Index: testsuite/misc-ming.all/Video-EmbedSquareTestRunner.cpp
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/Video-EmbedSquareTestRunner.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- testsuite/misc-ming.all/Video-EmbedSquareTestRunner.cpp 21 Jan 2008
23:26:51 -0000 1.9
+++ testsuite/misc-ming.all/Video-EmbedSquareTestRunner.cpp 23 Jan 2008
17:25:52 -0000 1.10
@@ -58,6 +58,9 @@
int scale_x = 1;
int scale_y = 1;
+ size_t framecount = root->get_frame_count();
+ check_equals(framecount, 11);
+
// Just loop twice, so to catch crashes...
for (int j = 0; j < 2; ++j) {
@@ -70,6 +73,8 @@
// Frame 1
+ check_equals(root->get_current_frame(), 0); // 0-based
+
// Check the color in (1,1) - should be red
check_pixel(1, 1, 1, red, 5);
@@ -79,12 +84,14 @@
// Check the color in (1,30) - should be yellow
check_pixel(1, 35*scale_y, 1, yellow, 5);
- size_t framecount = root->get_frame_count();
- int frame = 1;
- int i = 0;
- while (frame++ < framecount) {
+ while (true)
+ {
// Frame X
tester.advance();
+ int framenum = root->get_current_frame();
+ cout << "---- Pixel checking in frame " << framenum+1
<< " play state " << root->get_play_state() << endl;
+
+ int i = (framenum-1)*10;
// Check the color in (9+i,1) - should be yellow
check_pixel((5 + i)*scale_x, 1, 1, yellow, 5);
@@ -101,7 +108,14 @@
check_pixel((45 + i)*scale_x, 1, 1, yellow, 5);
}
- i += 10;
+ if ( framenum == framecount-1 )
+ {
+ // check we're playing, or we'll never get to
next loop...
+ check_equals(root->get_play_state(),
sprite_instance::PLAY);
+ break;
+ }
+
+ tester.click();
}
tester.advance();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Video-E...,
Sandro Santilli <=