Source/WebKit2:
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Oct 2014 18:20:12 +0000 (18:20 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Oct 2014 18:20:12 +0000 (18:20 +0000)
commitc7e5cef8c2497c35f7702f767c935129980c888f
treea3e71ab92572e7e39e74f3f2fe204335ec7d212e
parentf3a704d6885de485752c54c6977ad352992e22a3
Source/WebKit2:
Implement WKPageIsPlayingAudio().
https://bugs.webkit.org/show_bug.cgi?id=137048

Reviewed by Darin Adler.

* UIProcess/API/C/WKPage.cpp:
(WKPageIsPlayingAudio):

Tools:
Add a test for WKPageIsPlayingAudio().
https://bugs.webkit.org/show_bug.cgi?id=137048

Reviewed by Darin Adler.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
Add file-with-video.html, test.mp4, and WKPageIsPlayingAudio.cpp to the project.
* TestWebKitAPI/Tests/WebKit2/WKPageIsPlayingAudio.cpp: Added.
(TestWebKitAPI::nullJavaScriptCallback):
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::isPlayingAudioDidChangeCallback):
(TestWebKitAPI::setUpClients):
(TestWebKitAPI::TEST):
This test loads a page with a video in it. When the page is loaded, we first check that
WKPageIsPlayingAudio() returns false for the page. Then we call a method to start the video.
When the WKPageUIClient::isPlayingAudioDidChange callback gets called, check that WKPageIsPlayingAudio()
now returns true for the page.
* TestWebKitAPI/Tests/WebKit2/file-with-video.html: Added.
* TestWebKitAPI/Tests/WebKit2/test.mp4: Added.
This is a video copied from LayoutTests/media/content.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKit2/WKPageIsPlayingAudio.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebKit2/file-with-video.html [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebKit2/test.mp4 [new file with mode: 0644]