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

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

Issue 2499013003: Media Controls: don't "cut" controls if fully hidden. (Closed)
Patch Set: add tests 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/Source/core/layout/LayoutMedia.cpp » ('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 style='padding: 900px'></video>
22 <video controls width=800 style='padding: 900px'></video>
23 <video controls width=1200 style='padding: 900px'></video>
24 <video controls width=600 style='padding: 900px'></video>
25 </body>
26 <script>
27 test(_ => {
28 const expectedWidth = [
29 "400px",
30 "800px",
31 "1200px",
32 "600px",
33 ];
34
35 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 :)
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]);
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
45 }
46 });
47 </script>
48 </html>
OLDNEW
« 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