Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: third_party/WebKit/LayoutTests/media/media-controls-overflow-hidden.html

Issue 2470503003: Media controls max width is the width of the viewport. (Closed)
Patch Set: dcheck Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/media-controls-overflow-visible.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/media-controls-overflow-hidden.html
diff --git a/third_party/WebKit/LayoutTests/media/media-controls-overflow-hidden.html b/third_party/WebKit/LayoutTests/media/media-controls-overflow-hidden.html
new file mode 100644
index 0000000000000000000000000000000000000000..dea8af9df85f93130bb754837e75a1e6ab179958
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/media-controls-overflow-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></video>
+ <video controls width=800></video>
+ <video controls width=1200></video>
+ <video controls width=600 style='padding: 300px'></video>
+</body>
+<script>
+test(_ => {
+ const expectedWidth = [
+ "400px",
+ "800px",
+ "800px",
+ "500px",
+ ];
+
+ 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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/media-controls-overflow-visible.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698