| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src=../video-test.js></script> |
| <script type="text/javascript"> |
| function doTest() |
| { |
| testSessionKind("content"); |
| testSessionKind("transient"); |
| testSessionKind("transient-solo"); |
| testSessionKind("ambient"); |
| testSessionKind(); |
| |
| consoleWrite(""); |
| endTest(); |
| } |
| |
| function testSessionKind(sessionKind) |
| { |
| consoleWrite("<br>---"); |
| |
| if (sessionKind != undefined) { |
| consoleWrite("Testing \"new MediaSession('" + sessionKind + "')\""); |
| session = new MediaSession(sessionKind); |
| } else { |
| consoleWrite("Testing \"new MediaSession()\""); |
| session = new MediaSession(); |
| } |
| |
| if (window.internals) |
| testExpected('internals.mediaSessionCurrentState(session)', "idle"); |
| consoleWrite("---"); |
| } |
| </script> |
| </head> |
| <body onload="doTest()"> |
| <p>New media sessions should be in an Idle state after creation.</p> |
| </body> |
| </html> |