[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11622: Wait for loads to happen rat
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11622: Wait for loads to happen rather than just assume they will in 5ms |
Date: |
Fri, 13 Nov 2009 23:18:00 +0100 |
User-agent: |
Bazaar (1.16.1) |
------------------------------------------------------------
revno: 11622
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Fri 2009-11-13 23:18:00 +0100
message:
Wait for loads to happen rather than just assume they will in 5ms
modified:
testsuite/misc-ming.all/loadMovieTestRunner.cpp
=== modified file 'testsuite/misc-ming.all/loadMovieTestRunner.cpp'
--- a/testsuite/misc-ming.all/loadMovieTestRunner.cpp 2009-11-11 23:17:29
+0000
+++ b/testsuite/misc-ming.all/loadMovieTestRunner.cpp 2009-11-13 22:18:00
+0000
@@ -116,12 +116,18 @@
tester->movePointerTo(80, 80);
check(tester->isMouseOverMouseEntity());
tester->pressMouseButton();
- usleep(5000); // give it some time... TODO: drop this test and use a
self-containment instead
- tester->advance(); // loads (should) happen on next advance
- coverartch =
const_cast<DisplayObject*>(tester->findDisplayItemByName(*root, "coverart"));
- check(coverart != coverartch->to_movie());
+
+ // Wait for the movie to load
+ // TODO: drop this test and use a self-containment instead
+ do {
+ usleep(500); // give it some time...
+ tester->advance(); // loads (should) happen on next advance
+ coverartch =
const_cast<DisplayObject*>(tester->findDisplayItemByName(*root, "coverart"));
+ } while (coverartch->to_movie() == coverart);
+
coverart = coverartch->to_movie();
check_equals(coverart->get_root()->url(), lynchURL.str());
+
tester->depressMouseButton();
// Check scribbling on the lynch
@@ -135,9 +141,15 @@
tester->movePointerTo(280, 80);
check(tester->isMouseOverMouseEntity());
tester->click();
- usleep(5000); // give it some time... TODO: drop this test and use a
self-containment instead
- tester->advance(); // loads (should) happen on next advance
- coverartch =
const_cast<DisplayObject*>(tester->findDisplayItemByName(*root, "coverart"));
+
+ // Wait for the movie to load
+ // TODO: drop this test and use a self-containment instead
+ do {
+ usleep(500); // give it some time...
+ tester->advance(); // loads (should) happen on next advance
+ coverartch =
const_cast<DisplayObject*>(tester->findDisplayItemByName(*root, "coverart"));
+ } while (coverartch->to_movie() == coverart);
+
coverart = coverartch->to_movie();
check_equals(coverart->get_root()->url(), greenURL.str());
// TODO: find a way to test if the jpeg is really displayed
@@ -154,9 +166,15 @@
tester->movePointerTo(480, 80);
check(tester->isMouseOverMouseEntity());
tester->click();
- usleep(5000); // give it some time... TODO: drop this test and use a
self-containment instead
- tester->advance(); // loads (should) happen on next advance
- coverartch =
const_cast<DisplayObject*>(tester->findDisplayItemByName(*root, "coverart"));
+
+ // Wait for the movie to load
+ // TODO: drop this test and use a self-containment instead
+ do {
+ usleep(500); // give it some time...
+ tester->advance(); // loads (should) happen on next advance
+ coverartch =
const_cast<DisplayObject*>(tester->findDisplayItemByName(*root, "coverart"));
+ } while (coverartch->to_movie() == coverart);
+
coverart = coverartch->to_movie();
check_equals(coverart->get_root()->url(), offspringURL.str());
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r11622: Wait for loads to happen rather than just assume they will in 5ms,
Sandro Santilli <=