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

Side by Side Diff: LayoutTests/media/audio-controls-style-invalidation.html

Issue 1170583002: Recalc style or reattach when adding or removing the audio controls attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Style invalidation when adding/removing audio controls</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <div id="log"></div>
6 <script>
7 test(function() {
8 var audio = document.createElement('audio');
9 document.body.appendChild(audio);
10 // Note: The clientWidth getter in this assert will force a layout.
11 // Without that, the test would pass for the wrong reasons.
12 assert_equals(audio.clientWidth, 0);
13 audio.controls = true;
14 assert_equals(audio.clientWidth, 300);
15 }, "Style invalidation when adding audio controls");
16
17 test(function() {
18 var audio = document.createElement('audio');
19 document.body.appendChild(audio);
20 audio.controls = true;
21 assert_equals(audio.clientWidth, 300);
22 audio.controls = false;
23 assert_equals(audio.clientWidth, 0);
24 }, "Style invalidation when removing audio controls");
25 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/label/label-contains-other-interactive-content.html ('k') | Source/core/html/HTMLAudioElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698