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

Side by Side Diff: third_party/WebKit/LayoutTests/media/audio-controls-computed-display.html

Issue 2268373002: clean up media tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>&lt;audio> without controls has display:none irrespective of author CSS</ title> 2 <title>&lt;audio> without controls has display:none irrespective of author CSS</ title>
3 <script src="../resources/testharness.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <style> 5 <style>
6 audio { 6 audio {
7 display: inline !important; 7 display: inline !important;
8 } 8 }
9 </style> 9 </style>
10 <div id="log"></div> 10 <body>
11 <script> 11 <script>
12 test(function() { 12 test(function() {
13 var audio = document.createElement('audio'); 13 var audio = document.createElement('audio');
14 document.body.appendChild(audio); 14 document.body.appendChild(audio);
15 assert_equals(audio.clientWidth, 0); 15 assert_equals(audio.clientWidth, 0);
16 assert_equals(getComputedStyle(audio).display, "none"); 16 assert_equals(getComputedStyle(audio).display, "none");
17 audio.controls = true; 17 audio.controls = true;
18 assert_equals(audio.clientWidth, 300); 18 assert_equals(audio.clientWidth, 300);
19 assert_equals(getComputedStyle(audio).display, "inline"); 19 assert_equals(getComputedStyle(audio).display, "inline");
20 audio.controls = false; 20 audio.controls = false;
21 assert_equals(audio.clientWidth, 0); 21 assert_equals(audio.clientWidth, 0);
22 assert_equals(getComputedStyle(audio).display, "none"); 22 assert_equals(getComputedStyle(audio).display, "none");
23 }); 23 });
24 </script> 24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698