-
Notifications
You must be signed in to change notification settings - Fork 5
/
implementationtests.html
45 lines (42 loc) · 1.6 KB
/
implementationtests.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="./test_resources/qunit.css" type="text/css"/>
<script src="./mediafragments.js"></script>
<script src="./test_resources/jquery.js"></script>
<script type="text/javascript" src="./test_resources/qunit.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var uri = 'http://example.com/example.webm';
module("Media Fragments URI - Implementation Report");
var request = new XMLHttpRequest();
request.open('GET', './test_resources/testcases.tsv', false);
request.send(null);
if (request.status == 200) {
var script = '';
var tests = request.responseText;
tests.split(/\n/).forEach(function(test) {
var columns = test.split(/\t/);
script +=
'test("' + columns[0].replace('\'', "\'") + ' => ' + columns[2] + ' => ' + columns[1] + '", function() {\n' +
' expect(1);\n' +
' var should = ' + columns[3] + ';\n' +
' var is = MediaFragments.parseMediaFragmentsUri("' + columns[1] + '");\n' +
' delete is["toString"];\n' +
' deepEqual(is, should, \'\');\n' +
'});\n\n';
});
eval(script);
}
});
</script>
</head>
<body>
<h1 id="qunit-header">QUnit example</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests">
</ol>
</body>
</html>