| <script src=video-test.js></script> |
| window.addEventListener('load', async event => { |
| failTest(`<br>This test requires internals!`); |
| consoleWrite("<br>** Check state initially.") |
| state = internals.nowPlayingState; |
| testExpected('state.haveEverRegisteredAsNowPlayingApplication', false); |
| consoleWrite("<br>** Suspend process.") |
| run('internals.applicationWillBecomeInactive()'); |
| state = internals.nowPlayingState; |
| testExpected('state.haveEverRegisteredAsNowPlayingApplication', false); |
| consoleWrite("<br>** Activate process.") |
| run('internals.applicationDidBecomeActive()'); |
| state = internals.nowPlayingState; |
| testExpected('state.haveEverRegisteredAsNowPlayingApplication', false); |
| <p>NowPlaying status should not be updated when no media is active.</p> |