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

Unified Diff: third_party/WebKit/LayoutTests/media/autoplay-clears-autoplaying-flag.html

Issue 2268373002: clean up media tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/autoplay-clears-autoplaying-flag.html
diff --git a/third_party/WebKit/LayoutTests/media/autoplay-clears-autoplaying-flag.html b/third_party/WebKit/LayoutTests/media/autoplay-clears-autoplaying-flag.html
index 779c683e3dd7d98f412a667e895968de979592c1..a6c5ba589bf26344e7f8407536bc94f05f33fadb 100644
--- a/third_party/WebKit/LayoutTests/media/autoplay-clears-autoplaying-flag.html
+++ b/third_party/WebKit/LayoutTests/media/autoplay-clears-autoplaying-flag.html
@@ -3,23 +3,20 @@
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="media-file.js"></script>
-<div id="log"></div>
<script>
async_test(function(t)
{
- var a = document.createElement('audio');
- a.src = 'data:audio/wav;base64,UklGRjQAAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YRAAAAAAAAAA//8CAP3/BAD7/wQA';
- a.autoplay = true;
- a.addEventListener('ended', function()
+ var audio = document.createElement('audio');
+ audio.src = 'data:audio/wav;base64,UklGRjQAAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YRAAAAAAAAAA//8CAP3/BAD7/wQA';
+ audio.autoplay = true;
+ audio.addEventListener('ended', function()
{
- a.currentTime = 0;
+ audio.currentTime = 0;
});
- a.addEventListener('seeked', t.step_func(function()
+ audio.addEventListener('seeked', t.step_func_done(function()
{
- assert_true(a.paused);
- assert_true(a.readyState == a.HAVE_ENOUGH_DATA);
- t.done();
+ assert_true(audio.paused);
+ assert_true(audio.readyState == audio.HAVE_ENOUGH_DATA);
}));
- document.body.appendChild(a);
});
</script>

Powered by Google App Engine
This is Rietveld 408576698