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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <script>
4 internals.settings.setViewportEnabled(true);
5 internals.settings.setViewportMetaEnabled(true);
6 </script>
7 <head>
8 <title>Test that overflow-x: hidden with a large viewport doesn't clip the contr ols</title>
9 <meta name='viewport' content='width=800'>
10 <script src="../resources/testharness.js"></script>
11 <script src="../resources/testharnessreport.js"></script>
12 <script src="media-file.js"></script>
13 <script src="media-controls.js"></script>
14 </head>
15 <style>
16 body {
17 overflow-x: hidden;
18 }
19 </style>
20 <body>
21 <video controls width=400></video>
22 <video controls width=800></video>
23 <video controls width=1200></video>
24 <video controls width=600 style='padding: 300px'></video>
25 </body>
26 <script>
27 test(_ => {
28 const expectedWidth = [
29 "400px",
30 "800px",
31 "800px",
32 "500px",
33 ];
34
35 var videos = document.querySelectorAll('video');
36 for (var i=0; i < videos.length; ++i) {
37 videos[i].src = findMediaFile('video', 'content/test');
38 }
39
40 var forceLayout = document.body.offsetHeight;
41
42 for (var i=0; i < videos.length; ++i) {
43 var controls = mediaControlsButton(videos[i], 'panel');
44 assert_equals(getComputedStyle(controls).width, expectedWidth[i]);
45 }
46 });
47 </script>
48 </html>
OLDNEW
« 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