Fix off-by-one result comparisons in media tests on Windows Debug builds
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Aug 2009 17:58:55 +0000 (17:58 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Aug 2009 17:58:55 +0000 (17:58 +0000)
commit1287038d11fa160ee121fd57f696471bb62a48f5
treeea772b767df6b3724235ebf9235c7313be52b7eb
parente1f37f85db0cabcd25c01e51c5611d207c9a439f
Fix off-by-one result comparisons in media tests on Windows Debug builds

media/video-played.html seems always to time out in Windows Debug
builds. A race condition between media/video-test.js's "hang" timer and
DumpRenderTree's built-in "watchdog" timer was causing results for
media/video-played.html to be printed twice, causing all future media
tests to be compared to the previous test's results.

The fix is to make the watchdog timer got through the same code path
as calling notifyDone manually, so that the results will only get
printed once. A subsequent patch will remove video-test.js's hang
timer entirely, since it is redundant.

Fixes <http://webkit.org/b/28265>.

Reviewed by Mark Rowe.

* DumpRenderTree/LayoutTestController.cpp:
(LayoutTestController::waitToDumpWatchdogTimerFired): Added. Code came
from Gtk/Mac/Win's watchdog timer handlers, but we now call
notifyDone() instead of dump() so that a subsequent call to
notifyDone() won't print the results out again.

* DumpRenderTree/LayoutTestController.h: Added
waitToDumpWatchdogTimerFired.

* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(waitToDumpWatchdogFired):
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(waitUntilDoneWatchdogFired):
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(waitUntilDoneWatchdogFired):
Changed to call waitToDumpWatchdogTimerFired.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@47213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/LayoutTestController.cpp
WebKitTools/DumpRenderTree/LayoutTestController.h
WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp