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

Unified Diff: third_party/WebKit/LayoutTests/media/avtrack/addtrack.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/avtrack/addtrack.html
diff --git a/third_party/WebKit/LayoutTests/media/avtrack/addtrack.html b/third_party/WebKit/LayoutTests/media/avtrack/addtrack.html
index 18c9097a42aeaffe411185562585840e8ac8ff5c..f8e8e07827c4d38d14bf162bfb7f571a40ceaa7b 100644
--- a/third_party/WebKit/LayoutTests/media/avtrack/addtrack.html
+++ b/third_party/WebKit/LayoutTests/media/avtrack/addtrack.html
@@ -7,7 +7,6 @@
<script src="../media-file.js"></script>
</head>
<body>
- <div id="log"></div>
<script>
function addtrack_test(tagName, src, label)
{
@@ -29,30 +28,28 @@
async_test(function(t)
{
- var e = document.createElement(tagName);
- e.src = src;
+ var media = document.createElement(tagName);
+ media.src = src;
var expectedEvents = ["addtrack"];
var actualAudioEvents = [];
var actualVideoEvents = [];
- setupTrackListHandlers(t, e.audioTracks, actualAudioEvents, "audioTracks events");
- setupTrackListHandlers(t, e.videoTracks, actualVideoEvents, "videoTracks events");
+ setupTrackListHandlers(t, media.audioTracks, actualAudioEvents, "audioTracks events");
+ setupTrackListHandlers(t, media.videoTracks, actualVideoEvents, "videoTracks events");
- e.load();
+ media.load();
- e.addEventListener("loadedmetadata", t.step_func(function()
+ media.addEventListener("loadedmetadata", t.step_func_done(function()
{
assert_array_equals(actualAudioEvents, expectedEvents);
- if (e.videoTracks.length > 0) {
+ if (media.videoTracks.length > 0) {
assert_equals(label, "audio-video");
assert_array_equals(actualVideoEvents, expectedEvents);
} else {
assert_equals(label, "audio-only");
assert_equals(actualVideoEvents.length, 0);
}
-
- t.done();
}));
}, tagName + " : " + label);
}

Powered by Google App Engine
This is Rietveld 408576698