haikuwebkit/LayoutTests/media/media-error-fired-once-expe...

5 lines
105 B
Plaintext
Raw Permalink Normal View History

Make AVFoundationEnabled preference available on iOS https://bugs.webkit.org/show_bug.cgi?id=183876 <rdar://problem/38726459> Reviewed by Youenn Fablet. Source/WebCore: Test: AVFoundationPref API test. * html/HTMLAudioElement.idl: There is no need for a runtime setting to enable/disable audio, there is already settings.mediaEnabled. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::prepareForLoad): Fail if there are no media engines registered. (WebCore::HTMLMediaElement::noneSupported): Return early if m_error has already been set. (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Remove a typo. * page/RuntimeEnabledFeatures.cpp: (WebCore::RuntimeEnabledFeatures::audioEnabled const): Deleted. * page/RuntimeEnabledFeatures.h: Source/WebKit: * Shared/WebPreferences.yaml: Set AVFoundationEnabled with DEFAULT_AVFOUNDATION_ENABLED. * Shared/WebPreferencesDefaultValues.h: * UIProcess/API/Cocoa/WKPreferences.mm: (-[WKPreferences _setAVFoundationEnabled:]): Enable for iOS. (-[WKPreferences _avFoundationEnabled]): Ditto. * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/video.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm: Added. (-[PreferenceTestMessageHandler userContentController:didReceiveScriptMessage:]): (TestWebKitAPI::AVFoundationPref::SetUp): (TestWebKitAPI::AVFoundationPref::testWithPreference): (TestWebKitAPI::TEST_F): LayoutTests: * media/media-error-fired-once-expected.txt: Added. * media/media-error-fired-once.html: Added. Canonical link: https://commits.webkit.org/199627@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229995 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-03-27 11:39:53 +00:00
RUN(video = document.createElement("video"))
RUN(video.src = "content/does-not-exist.mpeg")
END OF TEST