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

Side by Side Diff: third_party/WebKit/LayoutTests/media/controls-repaint-for-network-change.html

Issue 1417683004: Media controls refer to less magic state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cl feedback. Created 5 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 <style>
3 /* restrict to just the play button, so the slider doesn't mismatch */
4 audio {
5 width: 40px;
6 height: 40px;
7 }
8 </style>
9 <script src="../resources/run-after-layout-and-paint.js"></script>
10 <script src=media-file.js></script>
11
12 <audio controls></audio>
13 <audio controls></audio>
14 <p>Test that network state transitions paint audio controls properly.</p>
15
16 <script>
17
18 testRunner.waitUntilDone();
19
20 var audios = document.querySelectorAll("audio");
21 var src = findMediaFile("audio", "content/empty");
philipj_slow 2015/11/03 09:04:06 This ended up unused.
22
23 runAfterLayoutAndPaint(function() {
24 window.internals.setMediaElementNetworkState(audios[0], 0);
philipj_slow 2015/11/03 09:04:06 Hmm, wasn't networkState already 0?
25 window.internals.setMediaElementNetworkState(audios[1], 0);
26
27 // These will cause the play buttons to become enabled, and should
28 // also cause a repaint.
29 window.internals.setMediaElementNetworkState(audios[1], 2);
30
31 testRunner.notifyDone();
32 });
33 </script>
34
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698