[GTK] media/event-attributes.html fails
https://bugs.webkit.org/show_bug.cgi?id=71662
Patch by Simon Pena <spena@igalia.com> on 2012-04-11
Reviewed by Philippe Normand.
Source/WebCore:
In MediaPlayerPrivateGStreamer::didEnd, when EOS is reached, don't
synchronize position and duration on regular playback. That is:
synchronize it (and fire the durationChange signal) only on reverse
playback.
This change makes media/event-attributes.html pass. It was
previously failing because an additional durationChange signal was
emitted.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Avoid
sending durationChange signal on regular playback.
Tools:
PulseAudio's module "module-stream-restore" allows saving the volume
of a stream, restoring it the next time it runs.
This affects the tests, since DumpRenderTree's volume settings are
saved between test runs, and tests relying on specific volume values
would miss some volumeChange events (or get additional ones).
This patch hooks on the existing GtkPort setup_test_run method and
creates a new clean_up_test_run method, so PulseAudio's module is
unloaded (if found) before running the tests, and restored (if it
was there previously) after they finished, ensuring the tests run in
the right environment.
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._clean_up_run): Invoke the port implementation of
clean_up_test_run.
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.clean_up_test_run): Add an empty implementation of
clean_up_test_run.
* Scripts/webkitpy/layout_tests/port/gtk.py:
(GtkPort._unload_pulseaudio_module): Unloads the offending
pulseaudio module, if found.
(GtkPort):
(GtkPort._restore_pulseaudio_module): Restores the offending
pulseaudio module, if it was there previously.
(GtkPort.setup_test_run): Calls _unload_pulseaudio_module.
(GtkPort.clean_up_test_run): Calls _restore_pulseaudio_module.
LayoutTests:
Unskip tests media/video-seek-past-end-playing and
media/sources-fallback-codecs, which no longer fail, and
media/event-attributes, which is fixed with this patch.
* platform/gtk/Skipped: Unskip media/video-seek-past-end-playing,
media/sources-fallback-codecs and media/event-attributes
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113849
268f45cc-cd09-0410-ab3c-
d52691b4dbfc