blob: d8c3d196ecd3e20b0c46523f85e3883484160ae4 [file] [log] [blame]
<!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>