chromium/third_party/blink/web_tests/fullscreen/full-screen-prefixed-and-unprefixed.html

<!DOCTYPE html>
<title>Mixed prefixed and unprefixed requests</title>
<script src="full-screen-test.js"></script>
<div><span></span></div>
<script>
var callback;
function fullscreenChanged(event)
{
    if (callback)
        callback(event)
}
waitForEvent(document, "fullscreenchange", fullscreenChanged);
waitForEvent(document, "webkitfullscreenchange", fullscreenChanged);

var div = document.querySelector("div");
var span = document.querySelector("span");

function divEnteredFullscreen()
{
    testExpected("document.fullscreenElement", div);
    testExpected("document.webkitFullscreenElement", div);
    callback = spanEnteredFullscreen;
    runWithKeyDown(function() { span.requestFullscreen(); });
}

function spanEnteredFullscreen()
{
    testExpected("document.fullscreenElement", span);
    testExpected("document.webkitFullscreenElement", span);
    callback = spanExitedFullscreen;
    document.webkitExitFullscreen();
}

function spanExitedFullscreen()
{
    testExpected("document.fullscreenElement", div);
    testExpected("document.webkitFullscreenElement", div);
    callback = divExitedFullscreen;
    document.webkitExitFullscreen();
}

function divExitedFullscreen()
{
    testExpected("document.fullscreenElement", null);
    testExpected("document.webkitFullscreenElement", null);
    endTest();
}

callback = divEnteredFullscreen;
runWithKeyDown(function() { div.webkitRequestFullscreen(); });
</script>