[GTK] media/event-attributes.html fails
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2012 11:57:52 +0000 (11:57 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2012 11:57:52 +0000 (11:57 +0000)
commitaa0b5d727f3a30054f4d90563b6253353a1835c1
treeb47d707bf40727eb191a704297904c0efbb0dc83
parentb338d3572c67c73c4c380939fd6f8a4e69d96f22
[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
LayoutTests/ChangeLog
LayoutTests/platform/gtk/Skipped
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
Tools/Scripts/webkitpy/layout_tests/port/base.py
Tools/Scripts/webkitpy/layout_tests/port/gtk.py