Index: third_party/WebKit/LayoutTests/media/avtrack/video-track-selected.html |
diff --git a/third_party/WebKit/LayoutTests/media/avtrack/video-track-selected.html b/third_party/WebKit/LayoutTests/media/avtrack/video-track-selected.html |
index 32254ddac96b8fb63c02aa5d99e83005f247525c..a9f925fcb85ede8497ecf97589da727fc18f846c 100644 |
--- a/third_party/WebKit/LayoutTests/media/avtrack/video-track-selected.html |
+++ b/third_party/WebKit/LayoutTests/media/avtrack/video-track-selected.html |
@@ -7,34 +7,32 @@ |
<script src="../media-file.js"></script> |
</head> |
<body> |
- <div id="log"></div> |
<script> |
async_test(function(t) |
{ |
- var e = document.createElement("video"); |
- e.src = findMediaFile("video", "../content/test"); |
+ var video = document.createElement("video"); |
+ video.src = findMediaFile("video", "../content/test"); |
- e.onloadedmetadata = t.step_func(function() |
+ video.onloadedmetadata = t.step_func(function() |
{ |
- assert_equals(e.videoTracks.length, 1, "videoTracks.length"); |
- assert_equals(e.videoTracks.selectedIndex, 0, "videoTracks.selectedIndex (initial)"); |
- assert_true(e.videoTracks[0].selected, "videoTrack.selected (initial)"); |
- e.videoTracks[0].selected = false; |
- assert_equals(e.videoTracks.selectedIndex, -1, "videoTracks.selectedIndex (first setter)"); |
- assert_false(e.videoTracks[0].selected, "videoTrack.selected (first setter)"); |
+ assert_equals(video.videoTracks.length, 1, "videoTracks.length"); |
+ assert_equals(video.videoTracks.selectedIndex, 0, "videoTracks.selectedIndex (initial)"); |
+ assert_true(video.videoTracks[0].selected, "videoTrack.selected (initial)"); |
+ video.videoTracks[0].selected = false; |
+ assert_equals(video.videoTracks.selectedIndex, -1, "videoTracks.selectedIndex (first setter)"); |
+ assert_false(video.videoTracks[0].selected, "videoTrack.selected (first setter)"); |
- e.videoTracks.onchange = t.unreached_func("setting selected to false fired change event"); |
+ video.videoTracks.onchange = t.unreached_func("setting selected to false fired change event"); |
setTimeout(t.step_func(function() |
{ |
- e.videoTracks[0].selected = true; |
- assert_equals(e.videoTracks.selectedIndex, 0, "videoTracks.selectedIndex (second setter)"); |
- assert_true(e.videoTracks[0].selected, "videoTrack.selected (second setter)"); |
+ video.videoTracks[0].selected = true; |
+ assert_equals(video.videoTracks.selectedIndex, 0, "videoTracks.selectedIndex (second setter)"); |
+ assert_true(video.videoTracks[0].selected, "videoTrack.selected (second setter)"); |
- e.videoTracks.onchange = t.step_func(function() |
+ video.videoTracks.onchange = t.step_func_done(function() |
{ |
- assert_equals(e.videoTracks.selectedIndex, 0, "videoTracks.selectedIndex (change event)"); |
- assert_true(e.videoTracks[0].selected, "videoTrack.selected (change event)"); |
- t.done(); |
+ assert_equals(video.videoTracks.selectedIndex, 0, "videoTracks.selectedIndex (change event)"); |
+ assert_true(video.videoTracks[0].selected, "videoTrack.selected (change event)"); |
}); |
}), 0); |
}); |