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

Unified Diff: LayoutTests/media/audio-controls-do-not-fade-out.html

Issue 302603003: Cleanup tests related to controls hiding/fading in/out (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | LayoutTests/media/media-controls.js » ('j') | LayoutTests/media/media-controls.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/audio-controls-do-not-fade-out.html
diff --git a/LayoutTests/media/audio-controls-do-not-fade-out.html b/LayoutTests/media/audio-controls-do-not-fade-out.html
index ff5bd6e065bf2a292b773458aec852410d553cc9..89310a37c1e27f46e5fa0549c6225edab9b151fa 100644
--- a/LayoutTests/media/audio-controls-do-not-fade-out.html
+++ b/LayoutTests/media/audio-controls-do-not-fade-out.html
@@ -13,15 +13,16 @@
testRunner.dumpAsText();
}
- document.getElementById("audio").addEventListener("timeupdate", function(e)
+ var audio = document.getElementById("audio");
+ audio.addEventListener("playing", function()
{
- if (e.target.currentTime < 4) {
- return;
- }
- var controls = mediaControlsElement(internals.shadowRoot(e.target).firstChild, "-webkit-media-controls-panel");
- var opacity = getComputedStyle(controls).opacity;
- document.getElementById("result").innerText = opacity < 1 ? "FAIL" : "PASS";
- testRunner.notifyDone();
+ runAfterControlsHidden(function()
+ {
+ var controls = mediaControlsButton(audio, "panel");
+ var opacity = getComputedStyle(controls).opacity;
+ document.getElementById("result").innerText = opacity < 1 ? "FAIL" : "PASS";
philipj_slow 2014/05/26 13:38:47 testExpected("getComputedStyle(controls).opacity",
fs 2014/05/26 15:02:09 Done.
+ testRunner.notifyDone();
+ }, audio);
});
</script>
</body>
« no previous file with comments | « no previous file | LayoutTests/media/media-controls.js » ('j') | LayoutTests/media/media-controls.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698