Commit fcabd6ce authored by Glenn Adams's avatar Glenn Adams

Populate level 4 ac3, mpeg2audio, mpeg2ts, mpeg2video configurations.

parent 244e5fad
......@@ -4,5 +4,16 @@
"local": "ac3.txt",
"dontFetch": true,
"dontFetchReason": "specification is final",
"helpers": []
"helpers": [
"MediaAC3AudioFormat"
],
"tests": [
{
"name": "MediaAC3AudioFormat",
"helper": "MediaAC3AudioFormat",
"code": "run(t)",
"async": true,
"timeout": 10000
}
]
}
"use strict";
function run(t) {
var defProperties = t.properties.def;
var e = document.createElement('audio');
var mimeType = 'audio/ac3';
var canPlay = e.canPlayType(mimeType)
test(function() {
assert_not_equals(canPlay, '', 'can play type ' + mimeType + ' must return non-empty string');
}, defProperties.expandedName + '-can-play-type');
if ((canPlay === 'maybe') || (canPlay === 'probably')) {
e.src = './resources/test.mp2ts';
e.autoplay = true;
e.onended = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
e.onrror = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
document.body.appendChild(e);
} else {
t.done();
}
}
function loadComplete(defProperties, e, evt) {
var eTarget = evt.target;
test(function() {
assert_equals(eTarget, e, 'onload target must be original image element');
}, defProperties.expandedName + '-target-matches');
test(function() {
assert_true('error' in eTarget, 'video element must have error property');
assert_equals(eTarget.error, null, 'error must be null');
}, defProperties.expandedName + '-no-error');
}
\ No newline at end of file
Sun, 19 Oct 2014 04:00:08 GMT
\ No newline at end of file
Sun, 19 Oct 2014 07:00:08 GMT
\ No newline at end of file
Sun, 19 Oct 2014 04:02:28 GMT
\ No newline at end of file
Sun, 19 Oct 2014 07:02:29 GMT
\ No newline at end of file
"use strict";
function run(t) {
var defProperties = t.properties.def;
var e = document.createElement('audio');
var mimeType = 'audio/mpeg';
var canPlay = e.canPlayType(mimeType)
test(function() {
assert_not_equals(canPlay, '', 'can play type ' + mimeType + ' must return non-empty string');
}, defProperties.expandedName + '-can-play-type');
if ((canPlay === 'maybe') || (canPlay === 'probably')) {
e.src = './resources/test.mp3';
e.autoplay = true;
e.onended = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
e.onrror = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
document.body.appendChild(e);
} else {
t.done();
}
}
function loadComplete(defProperties, e, evt) {
var eTarget = evt.target;
test(function() {
assert_equals(eTarget, e, 'onload target must be original image element');
}, defProperties.expandedName + '-target-matches');
test(function() {
assert_true('error' in eTarget, 'video element must have error property');
assert_equals(eTarget.error, null, 'error must be null');
}, defProperties.expandedName + '-no-error');
}
\ No newline at end of file
......@@ -4,5 +4,16 @@
"local": "mpeg2audio.txt",
"dontFetch": true,
"dontFetchReason": "specification is final",
"helpers": []
"helpers": [
"MediaMPEG2AudioFormat"
],
"tests": [
{
"name": "MediaMPEG2AudioFormat",
"helper": "MediaMPEG2AudioFormat",
"code": "run(t)",
"async": true,
"timeout": 10000
}
]
}
"use strict";
function run(t) {
var defProperties = t.properties.def;
var e = document.createElement('video');
var mimeType = 'video/mp2t';
var canPlay = e.canPlayType(mimeType)
test(function() {
assert_not_equals(canPlay, '', 'can play type ' + mimeType + ' must return non-empty string');
}, defProperties.expandedName + '-can-play-type');
if ((canPlay === 'maybe') || (canPlay === 'probably')) {
e.src = './resources/test.m2ts';
e.autoplay = true;
e.onended = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
e.onrror = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
document.body.appendChild(e);
} else {
t.done();
}
}
function loadComplete(defProperties, e, evt) {
var eTarget = evt.target;
test(function() {
assert_equals(eTarget, e, 'onload target must be original image element');
}, defProperties.expandedName + '-target-matches');
test(function() {
assert_true('error' in eTarget, 'video element must have error property');
assert_equals(eTarget.error, null, 'error must be null');
}, defProperties.expandedName + '-no-error');
}
\ No newline at end of file
......@@ -4,5 +4,16 @@
"local": "mpeg2ts.txt",
"dontFetch": true,
"dontFetchReason": "specification is final",
"helpers": []
"helpers": [
"MediaMPEG2TSFormat"
],
"tests": [
{
"name": "MediaMPEG2TSFormat",
"helper": "MediaMPEG2TSFormat",
"code": "run(t)",
"async": true,
"timeout": 31000
}
]
}
"use strict";
function run(t) {
var defProperties = t.properties.def;
var e = document.createElement('video');
var mimeType = 'video/mpeg';
var canPlay = e.canPlayType(mimeType)
test(function() {
assert_not_equals(canPlay, '', 'can play type ' + mimeType + ' must return non-empty string');
}, defProperties.expandedName + '-can-play-type');
if ((canPlay === 'maybe') || (canPlay === 'probably')) {
e.src = './resources/test.m2v';
e.autoplay = true;
e.onended = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
e.onrror = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
document.body.appendChild(e);
} else {
t.done();
}
}
function loadComplete(defProperties, e, evt) {
var eTarget = evt.target;
test(function() {
assert_equals(eTarget, e, 'onload target must be original image element');
}, defProperties.expandedName + '-target-matches');
test(function() {
assert_true('error' in eTarget, 'video element must have error property');
assert_equals(eTarget.error, null, 'error must be null');
}, defProperties.expandedName + '-no-error');
}
\ No newline at end of file
......@@ -4,5 +4,16 @@
"local": "mpeg2video.txt",
"dontFetch": true,
"dontFetchReason": "specification is final",
"helpers": []
"helpers": [
"MediaMPEG2VideoFormat"
],
"tests": [
{
"name": "MediaMPEG2VideoFormat",
"helper": "MediaMPEG2VideoFormat",
"code": "run(t)",
"async": true,
"timeout": 10000
}
]
}
Sun, 19 Oct 2014 04:12:14 GMT
\ No newline at end of file
Sun, 19 Oct 2014 07:11:32 GMT
\ No newline at end of file
<!-- Copyright (C) 2014, Cable Television Laboratories, Inc. & Skynav, Inc. -->
<!-- DO NOT EDIT! This test was generated by $(CVP2TS)/tools/level2/generate/generate.js. -->
<!doctype html>
<meta charset='utf-8'>
<title>Test MediaAC3AudioFormat</title>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src='/tools/common/level4.js'></script>
<script src='./helpers/MediaAC3AudioFormat.js'></script>
<script type='text/plain' id='testDef'>
{"name":"MediaAC3AudioFormat","helper":"MediaAC3AudioFormat","code":"run(t)","async":true,"timeout":10000}
</script>
<h1>Test MediaAC3AudioFormat Support</h1>
<div id='log'></div>
<script>
level4Async('ac3', JSON.parse(document.getElementById('testDef').textContent), function(t){return run(t);});
</script>
"use strict";
function run(t) {
var defProperties = t.properties.def;
var e = document.createElement('audio');
var mimeType = 'audio/ac3';
var canPlay = e.canPlayType(mimeType)
test(function() {
assert_not_equals(canPlay, '', 'can play type ' + mimeType + ' must return non-empty string');
}, defProperties.expandedName + '-can-play-type');
if ((canPlay === 'maybe') || (canPlay === 'probably')) {
e.src = './resources/test.mp2ts';
e.autoplay = true;
e.onended = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
e.onrror = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
document.body.appendChild(e);
} else {
t.done();
}
}
function loadComplete(defProperties, e, evt) {
var eTarget = evt.target;
test(function() {
assert_equals(eTarget, e, 'onload target must be original image element');
}, defProperties.expandedName + '-target-matches');
test(function() {
assert_true('error' in eTarget, 'video element must have error property');
assert_equals(eTarget.error, null, 'error must be null');
}, defProperties.expandedName + '-no-error');
}
\ No newline at end of file
"use strict";
function run(t) {
var defProperties = t.properties.def;
var e = document.createElement('audio');
var mimeType = 'audio/mpeg';
var canPlay = e.canPlayType(mimeType)
test(function() {
assert_not_equals(canPlay, '', 'can play type ' + mimeType + ' must return non-empty string');
}, defProperties.expandedName + '-can-play-type');
if ((canPlay === 'maybe') || (canPlay === 'probably')) {
e.src = './resources/test.mp3';
e.autoplay = true;
e.onended = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
e.onrror = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
document.body.appendChild(e);
} else {
t.done();
}
}
function loadComplete(defProperties, e, evt) {
var eTarget = evt.target;
test(function() {
assert_equals(eTarget, e, 'onload target must be original image element');
}, defProperties.expandedName + '-target-matches');
test(function() {
assert_true('error' in eTarget, 'video element must have error property');
assert_equals(eTarget.error, null, 'error must be null');
}, defProperties.expandedName + '-no-error');
}
\ No newline at end of file
<!-- Copyright (C) 2014, Cable Television Laboratories, Inc. & Skynav, Inc. -->
<!-- DO NOT EDIT! This test was generated by $(CVP2TS)/tools/level2/generate/generate.js. -->
<!doctype html>
<meta charset='utf-8'>
<title>Test MediaMPEG2AudioFormat</title>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src='/tools/common/level4.js'></script>
<script src='./helpers/MediaMPEG2AudioFormat.js'></script>
<script type='text/plain' id='testDef'>
{"name":"MediaMPEG2AudioFormat","helper":"MediaMPEG2AudioFormat","code":"run(t)","async":true,"timeout":10000}
</script>
<h1>Test MediaMPEG2AudioFormat Support</h1>
<div id='log'></div>
<script>
level4Async('mpeg2audio', JSON.parse(document.getElementById('testDef').textContent), function(t){return run(t);});
</script>
"use strict";
function run(t) {
var defProperties = t.properties.def;
var e = document.createElement('video');
var mimeType = 'video/mp2t';
var canPlay = e.canPlayType(mimeType)
test(function() {
assert_not_equals(canPlay, '', 'can play type ' + mimeType + ' must return non-empty string');
}, defProperties.expandedName + '-can-play-type');
if ((canPlay === 'maybe') || (canPlay === 'probably')) {
e.src = './resources/test.m2ts';
e.autoplay = true;
e.onended = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
e.onrror = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
document.body.appendChild(e);
} else {
t.done();
}
}
function loadComplete(defProperties, e, evt) {
var eTarget = evt.target;
test(function() {
assert_equals(eTarget, e, 'onload target must be original image element');
}, defProperties.expandedName + '-target-matches');
test(function() {
assert_true('error' in eTarget, 'video element must have error property');
assert_equals(eTarget.error, null, 'error must be null');
}, defProperties.expandedName + '-no-error');
}
\ No newline at end of file
<!-- Copyright (C) 2014, Cable Television Laboratories, Inc. & Skynav, Inc. -->
<!-- DO NOT EDIT! This test was generated by $(CVP2TS)/tools/level2/generate/generate.js. -->
<!doctype html>
<meta charset='utf-8'>
<title>Test MediaMPEG2TSFormat</title>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src='/tools/common/level4.js'></script>
<script src='./helpers/MediaMPEG2TSFormat.js'></script>
<script type='text/plain' id='testDef'>
{"name":"MediaMPEG2TSFormat","helper":"MediaMPEG2TSFormat","code":"run(t)","async":true,"timeout":31000}
</script>
<h1>Test MediaMPEG2TSFormat Support</h1>
<div id='log'></div>
<script>
level4Async('mpeg2ts', JSON.parse(document.getElementById('testDef').textContent), function(t){return run(t);});
</script>
"use strict";
function run(t) {
var defProperties = t.properties.def;
var e = document.createElement('video');
var mimeType = 'video/mpeg';
var canPlay = e.canPlayType(mimeType)
test(function() {
assert_not_equals(canPlay, '', 'can play type ' + mimeType + ' must return non-empty string');
}, defProperties.expandedName + '-can-play-type');
if ((canPlay === 'maybe') || (canPlay === 'probably')) {
e.src = './resources/test.m2v';
e.autoplay = true;
e.onended = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
e.onrror = t.step_func_done(function(evt) {
loadComplete(defProperties, e, evt);
});
document.body.appendChild(e);
} else {
t.done();
}
}
function loadComplete(defProperties, e, evt) {
var eTarget = evt.target;
test(function() {
assert_equals(eTarget, e, 'onload target must be original image element');
}, defProperties.expandedName + '-target-matches');
test(function() {
assert_true('error' in eTarget, 'video element must have error property');
assert_equals(eTarget.error, null, 'error must be null');
}, defProperties.expandedName + '-no-error');
}
\ No newline at end of file
<!-- Copyright (C) 2014, Cable Television Laboratories, Inc. & Skynav, Inc. -->
<!-- DO NOT EDIT! This test was generated by $(CVP2TS)/tools/level2/generate/generate.js. -->
<!doctype html>
<meta charset='utf-8'>
<title>Test MediaMPEG2VideoFormat</title>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src='/tools/common/level4.js'></script>
<script src='./helpers/MediaMPEG2VideoFormat.js'></script>
<script type='text/plain' id='testDef'>
{"name":"MediaMPEG2VideoFormat","helper":"MediaMPEG2VideoFormat","code":"run(t)","async":true,"timeout":10000}
</script>
<h1>Test MediaMPEG2VideoFormat Support</h1>
<div id='log'></div>
<script>
level4Async('mpeg2video', JSON.parse(document.getElementById('testDef').textContent), function(t){return run(t);});
</script>
......@@ -44,14 +44,20 @@
name: defName,
expandedName: makeExpandedName(spec, def)
};
var properties = {
def: defProperties
};
if ('timeout' in def) {
properties.timeout = def.timeout;
}
if (!!tester && ((tester != 'undefined') && (tester != 'null'))) {
if (typeof tester == 'function') {
if (!async) {
test(function() {
tester.apply(this);
}, defProperties.expandedName + '-tester-sync', {def: defProperties});
}, defProperties.expandedName + '-tester-sync', properties);
} else
async_test(tester, defProperties.expandedName + '-tester-async', {def: defProperties});
async_test(tester, defProperties.expandedName + '-tester-async', properties);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment