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); |
} |