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

Unified 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: ...because NeedsRebaseline is not a platform type. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698