| Index: third_party/WebKit/LayoutTests/media/media-controls-overflow-visible.html
|
| diff --git a/third_party/WebKit/LayoutTests/media/media-controls-overflow-visible.html b/third_party/WebKit/LayoutTests/media/media-controls-overflow-visible.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..89b308956eb9bf25d05dd020e0e7ac61b8551c33
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/media/media-controls-overflow-visible.html
|
| @@ -0,0 +1,43 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<script>
|
| + internals.settings.setViewportEnabled(true);
|
| + internals.settings.setViewportMetaEnabled(true);
|
| +</script>
|
| +<head>
|
| +<title>Test that no overflow with a small viewport clips the controls</title>
|
| +<meta name='viewport' content='width=300'>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script src="media-file.js"></script>
|
| +<script src="media-controls.js"></script>
|
| +</head>
|
| +<body>
|
| + <video controls width=400></video>
|
| + <video controls width=800></video>
|
| + <video controls width=1200></video>
|
| + <video controls width=600 style='padding: 100px'></video>
|
| +</body>
|
| +<script>
|
| +test(_ => {
|
| + const expectedWidth = [
|
| + "400px",
|
| + "800px",
|
| + "1200px",
|
| + "600px",
|
| + ];
|
| +
|
| + var videos = document.querySelectorAll('video');
|
| + for (var i=0; i < videos.length; ++i) {
|
| + videos[i].src = findMediaFile('video', 'content/test');
|
| + }
|
| +
|
| + var forceLayout = document.body.offsetHeight;
|
| +
|
| + for (var i=0; i < videos.length; ++i) {
|
| + var controls = mediaControlsButton(videos[i], 'panel');
|
| + assert_equals(getComputedStyle(controls).width, expectedWidth[i]);
|
| + }
|
| +});
|
| +</script>
|
| +</html>
|
|
|