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

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

Issue 2534183003: Media Controls: don't "cut" controls if fully hidden. (Closed)
Patch Set: 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/Source/core/layout/LayoutMedia.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e7a2e965a6009f0bdd887c4bf81878891467ef57
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/controls/overflow-fully-hidden.html
@@ -0,0 +1,41 @@
+<!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(_ => {
+ var videos = document.querySelectorAll('video');
+ for (var video, i = 0; video = videos[i]; ++i) {
+ video.src = findMediaFile('video', 'content/test');
+ }
+
+ var forceLayout = document.body.offsetHeight;
+
+ assert_equals(getComputedStyle(mediaControlsButton(videos[0], 'panel')).width, '400px');
+ assert_equals(getComputedStyle(mediaControlsButton(videos[1], 'panel')).width, '800px');
+ assert_equals(getComputedStyle(mediaControlsButton(videos[2], 'panel')).width, '1200px');
+ assert_equals(getComputedStyle(mediaControlsButton(videos[3], 'panel')).width, '600px');
+});
+</script>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutMedia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698