Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/media/controls/overflow-fully-hidden.html |
| diff --git a/third_party/WebKit/LayoutTests/media/controls/overflow-fully-hidden.html b/third_party/WebKit/LayoutTests/media/controls/overflow-fully-hidden.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ce6afda6ef12f43b337b4675cf1e9de123b8656e |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/media/controls/overflow-fully-hidden.html |
| @@ -0,0 +1,48 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<script> |
| + internals.settings.setViewportEnabled(true); |
| + internals.settings.setViewportMetaEnabled(true); |
| +</script> |
| +<head> |
| +<title>Test that overflow-x: hidden with a large viewport doesn't clip the controls</title> |
| +<meta name='viewport' content='width=800'> |
| +<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> |
| +<style> |
| +body { |
| + overflow-x: hidden; |
| +} |
| +</style> |
| +<body> |
| + <video controls width=400 style='padding: 900px'></video> |
| + <video controls width=800 style='padding: 900px'></video> |
| + <video controls width=1200 style='padding: 900px'></video> |
| + <video controls width=600 style='padding: 900px'></video> |
| +</body> |
| +<script> |
| +test(_ => { |
| + const expectedWidth = [ |
| + "400px", |
| + "800px", |
| + "1200px", |
| + "600px", |
| + ]; |
| + |
| + var videos = document.querySelectorAll('video'); |
|
eae
2016/11/17 16:40:33
This doesn't really matter here but please keep in
mlamouri (slow - plz ping)
2016/11/18 14:53:50
Didn't realise this. Thanks :)
|
| + 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]); |
|
eae
2016/11/17 16:40:33
Try to avoid data-driven tests like this. They ten
mlamouri (slow - plz ping)
2016/11/18 14:53:50
I actually prefer data-driver tests because it all
|
| + } |
| +}); |
| +</script> |
| +</html> |