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..309e02eb4cd287b6a953d044ea944802680491f6 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/media/controls-repaint-for-network-change.html |
| @@ -0,0 +1,40 @@ |
| +<html> |
|
philipj_slow
2015/10/28 15:14:01
https://www.chromium.org/blink/coding-style/layout
liberato (no reviews please)
2015/10/29 16:10:25
Done.
|
| +<head> |
| +<script src="../resources/run-after-layout-and-paint.js"></script> |
| +<script> |
| + |
| +testRunner.waitUntilDone(); |
| + |
| +function test() { |
| + |
| + var video1 = document.getElementById("video1"); |
|
philipj_slow
2015/10/28 15:14:02
You might also use document.querySelectorAll("vide
liberato (no reviews please)
2015/10/29 16:10:25
Done.
|
| + var video2 = document.getElementById("video2"); |
| + var video3 = document.getElementById("video3"); |
| + |
| + runAfterLayoutAndPaint(function() { |
| + window.internals.setMediaElementNetworkState(video1, 0); |
| + window.internals.setMediaElementNetworkState(video2, 0); |
| + window.internals.setMediaElementNetworkState(video3, 0); |
| + |
| + // These will cause the play buttons to become enabled, and should |
| + // also cause a repaint. |
| + window.internals.setMediaElementNetworkState(video2, 2); |
| + window.internals.setMediaElementNetworkState(video3, 2); |
| + |
| + // This will cause the play button to go back to its original state. |
| + window.internals.setMediaElementNetworkState(video3, 0); |
| + |
| + testRunner.notifyDone(); |
| + }); |
| +} |
| +</script> |
| +</head> |
| + |
| +<body onload="test()"> |
| + <video id="video1" controls></video> |
| + <video id="video2" controls></video> |
| + <video id="video3" controls></video> |
| + <p>Test that network state transitions paint video controls properly.</p> |
|
philipj_slow
2015/10/28 15:14:01
Is it not possible to write a reliable test using
liberato (no reviews please)
2015/10/29 16:10:25
not that i could find. it seems to be an actual r
|
| +</body> |
| + |
| +</html> |