Index: third_party/WebKit/LayoutTests/media/media-source-append-multiple.html |
diff --git a/third_party/WebKit/LayoutTests/media/media-source-append-multiple.html b/third_party/WebKit/LayoutTests/media/media-source-append-multiple.html |
index e0738212bbec5d522caa41cb1bdd0260da95d23d..a70efcf6f67322f4bbf99f15f019a57aa97b917d 100644 |
--- a/third_party/WebKit/LayoutTests/media/media-source-append-multiple.html |
+++ b/third_party/WebKit/LayoutTests/media/media-source-append-multiple.html |
@@ -2,16 +2,18 @@ |
<html> |
<head> |
<script src=media-file.js></script> |
+ <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
+ (Please avoid writing new tests using video-test.js) --> |
<script src=video-test.js></script> |
<script> |
var audio, sourceA, sourceB; |
- |
+ |
function canplaythrough(e) |
{ |
testExpected("audio.currentSrc == sourceA.src", true); |
endTest(); |
} |
- |
+ |
function loadedMetadataA() |
{ |
consoleWrite("loadedMetadataA"); |
@@ -19,7 +21,7 @@ |
audio.appendChild(sourceB); |
waitForEventAndFail("loadedmetadata"); |
} |
- |
+ |
function onWindowLoad(e) |
{ |
audio = document.getElementById('a'); |
@@ -30,22 +32,22 @@ |
waitForEvent("loadeddata"); |
waitForEvent("canplay"); |
waitForEventOnce('canplaythrough', canplaythrough); |
- |
+ |
sourceA = document.createElement("source"); |
var audioFile = findMediaFile("audio", "content/test"); |
sourceA.setAttribute("src", audioFile); |
sourceB = document.createElement("source"); |
audioFile = findMediaFile("audio", "content/silence"); |
sourceB.setAttribute("src", audioFile); |
- |
+ |
waitForEventOnce("loadedmetadata", loadedMetadataA); |
audio.appendChild(sourceA); |
} |
- |
+ |
window.addEventListener('load', onWindowLoad, false); |
</script> |
</head> |
<body> |
<audio id="a"></audio> |
</body> |
-</html> |
+</html> |