Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/media/controls-repaint-for-network-change.html |
| diff --git a/third_party/WebKit/LayoutTests/media/controls-repaint-for-network-change.html b/third_party/WebKit/LayoutTests/media/controls-repaint-for-network-change.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6c1356cf6fe6d2c41b36eac5a02945c368f5ab6a |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/media/controls-repaint-for-network-change.html |
| @@ -0,0 +1,34 @@ |
| +<!DOCTYPE html> |
| +<style> |
| + /* restrict to just the play button, so the slider doesn't mismatch */ |
| + audio { |
| + width: 40px; |
| + height: 40px; |
| + } |
| +</style> |
| +<script src="../resources/run-after-layout-and-paint.js"></script> |
| +<script src=media-file.js></script> |
| + |
| +<audio controls></audio> |
| +<audio controls></audio> |
| +<p>Test that network state transitions paint audio controls properly.</p> |
| + |
| +<script> |
| + |
| +testRunner.waitUntilDone(); |
| + |
| +var audios = document.querySelectorAll("audio"); |
| +var src = findMediaFile("audio", "content/empty"); |
|
philipj_slow
2015/11/03 09:04:06
This ended up unused.
|
| + |
| +runAfterLayoutAndPaint(function() { |
| + window.internals.setMediaElementNetworkState(audios[0], 0); |
|
philipj_slow
2015/11/03 09:04:06
Hmm, wasn't networkState already 0?
|
| + window.internals.setMediaElementNetworkState(audios[1], 0); |
| + |
| + // These will cause the play buttons to become enabled, and should |
| + // also cause a repaint. |
| + window.internals.setMediaElementNetworkState(audios[1], 2); |
| + |
| + testRunner.notifyDone(); |
| +}); |
| +</script> |
| + |