blob: edb6da2e92273a77a9459a1de3b8e36775c2d497 [file] [log] [blame]
<!-- webkit-test-runner [ enableModernMediaControls=false ] -->
<body>
<p>This tests that the video element's controls in full screen mode flip the layout of the volume controls in RTL mode.</p>
<video id="video" width="300"></video>
<script src="full-screen-test.js"></script>
<script src="../media/media-controls.js"></script>
<script>
var callback;
var shadowRoot;
var volumeBox;
var video = document.getElementById('video');
waitForEvent(document, 'webkitfullscreenchange', function() {
if (window.internals) {
testExpected("shadowRoot = internals.shadowRoot(video)", null, "!=");
testExpected("volumeBox = mediaControlsElement(shadowRoot.firstChild, '-webkit-media-controls-volume-slider-container')", null, "!=");
testExpected("volumeBox.classList.contains('uses-ltr-user-interface-layout-direction')", true, "==");
testExpected("document.defaultView.getComputedStyle(volumeBox)['transform']", 'none', "==");
window.internals.setUserInterfaceLayoutDirection("RTL");
testExpected("volumeBox.classList.contains('uses-ltr-user-interface-layout-direction')", false, "==");
testExpected("document.defaultView.getComputedStyle(volumeBox)['transform']", 'matrix(-1, 0, 0, 1, 23, 0)', "==");
window.internals.setUserInterfaceLayoutDirection("LTR");
testExpected("volumeBox.classList.contains('uses-ltr-user-interface-layout-direction')", true, "==");
testExpected("document.defaultView.getComputedStyle(volumeBox)['transform']", 'none', "==");
} else
logResult(false, "window.internals == undefined");
endTest();
});
runWithKeyDown(function() { video.webkitRequestFullScreen() });
</script>
</body>