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

Side by Side Diff: third_party/WebKit/LayoutTests/media/media-controls-overflow-visible.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
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 no overflow with a small viewport clips the controls</title>
9 <meta name='viewport' content='width=300'>
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 <body>
16 <video controls width=400></video>
17 <video controls width=800></video>
18 <video controls width=1200></video>
19 <video controls width=600 style='padding: 100px'></video>
20 </body>
21 <script>
22 test(_ => {
23 const expectedWidth = [
24 "400px",
25 "800px",
26 "1200px",
27 "600px",
28 ];
29
30 var videos = document.querySelectorAll('video');
31 for (var i=0; i < videos.length; ++i) {
32 videos[i].src = findMediaFile('video', 'content/test');
33 }
34
35 var forceLayout = document.body.offsetHeight;
36
37 for (var i=0; i < videos.length; ++i) {
38 var controls = mediaControlsButton(videos[i], 'panel');
39 assert_equals(getComputedStyle(controls).width, expectedWidth[i]);
40 }
41 });
42 </script>
43 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698