[iOS] Enable media layout tests to run simultaneously by ignoring system-level interr...
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Sep 2015 19:14:36 +0000 (19:14 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Sep 2015 19:14:36 +0000 (19:14 +0000)
commit31b024b8554fdbe5a0a16ff1f226fa078154deb4
treed67370ca3c9c6974ecd4314557f48e7422ebddf4
parent6d560f75586f99b1218682dc81638c6c6be6ddca
[iOS] Enable media layout tests to run simultaneously by ignoring system-level interruptions
https://bugs.webkit.org/show_bug.cgi?id=148807

Reviewed by Eric Carlson.

Add an internal property that, when set, will cause system-level interruption notifications
(e.g., due to simultaneous media playback in separate processes) to be ignored by the
PlatformMediaSessionManager, and cause the media playback sessions to continue normally, if
inaudibly.

* platform/audio/PlatformMediaSessionManager.h:
(WebCore::PlatformMediaSessionManager::willIgnoreSystemInterruptions):
(WebCore::PlatformMediaSessionManager::setWillIgnoreSystemInterruptions):
* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper interruption:]):
(-[WebMediaSessionHelper applicationWillEnterForeground:]):
(-[WebMediaSessionHelper applicationDidBecomeActive:]):
(-[WebMediaSessionHelper applicationWillResignActive:]):
(-[WebMediaSessionHelper applicationDidEnterBackground:]):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/audio/PlatformMediaSessionManager.h
Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm
Source/WebCore/testing/Internals.cpp