Bug 1289742. P2 - remove the e.canPlayType() test which is already done by MediaTestManager. r?kaku
MozReview-Commit-ID: 7Pe8CyHgmzB
--- a/dom/media/test/test_load_same_resource.html
+++ b/dom/media/test/test_load_same_resource.html
@@ -74,27 +74,25 @@ function tryClone(event) {
// on the second fetch. These resources have different lengths, so if the cloned element
// does a network fetch it will get a resource with the wrong length and we get a test
// failure.
function initTest(test, token) {
var elemType = /^audio/.test(test.type) ? "audio" : "video";
var e = document.createElement(elemType);
e.preload = "auto";
- if (e.canPlayType(test.type)) {
- e.src = test.name;
- if (test.duration) {
- e._expectedDuration = test.duration;
- }
- ok(true, "Trying to load " + test.name);
- e.addEventListener("loadeddata", tryClone);
- e.load();
- e.token = token;
- manager.started(token);
+ e.src = test.name;
+ if (test.duration) {
+ e._expectedDuration = test.duration;
}
+ ok(true, "Trying to load " + test.name);
+ e.addEventListener("loadeddata", tryClone);
+ e.load();
+ e.token = token;
+ manager.started(token);
}
manager.runTests(gCloneTests, initTest);
</script>
</pre>
</body>
</html>