compositing/video tests time out on Lion
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Oct 2011 17:42:18 +0000 (17:42 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Oct 2011 17:42:18 +0000 (17:42 +0000)
commit459c31319693b4c66e22f8e8ff345365ad794637
treeef3ac6802830d3942bd9aac754281b0ec0639438
parent9cc9922b007eb187bb73154cf1ff7f3c85695000
compositing/video tests time out on Lion
https://bugs.webkit.org/show_bug.cgi?id=70448

Reviewed by Simon Fraser.

Source/WebCore:

AVFoundation will not begin loading or decoding media until a consumer for that media is present.
For video-only media, this means that an AVPlayerLayer must be created and attached to the
AVPlayer before the load state will ever reach "canPlayThrough". Once the metadata for a media
is loaded, create a AVPlayerLayer if the media has a video track.

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::updateStates):

LayoutTests:

* compositing/video/video-poster.html: Seek, instead of play, to trigger
    creation of a layer
* http/tests/media/video-load-twice.html: Use waitForEventOnce so that
    canPlayThrough listener is triggered only once.
* media/video-test.js: Add a new function, waitForEventOnce.
(waitForEventOnce):
(waitForEvent._eventCallback):
(waitForEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@98359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/video/video-poster-expected.txt
LayoutTests/compositing/video/video-poster.html
LayoutTests/http/tests/media/video-load-twice.html
LayoutTests/media/video-test.js
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp