Skip to content

Commit 9f4a070

Browse files
author
Nathan Weber
committed
Fix unit tests. Update baseline.
Merge branch 'development' of https://github.com/Dash-Industry-Forum/dash.js into development Conflicts: app/js/dash/DashManifestExtensions.js app/js/dash/DashMetricsExtensions.js
2 parents bc938ba + 5553987 commit 9f4a070

File tree

5 files changed

+240
-368
lines changed

5 files changed

+240
-368
lines changed

baseline.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@
77
<link rel="icon" type="image/png" href="http://dashpg.com/w/2012/09/dashif.ico" />
88

99
<!-- Libraries -->
10+
<!--
1011
<script src="app/lib/q.js"></script>
1112
<script src="app/lib/dijon.js"></script>
1213
<script src="app/lib/xml2json.js"></script>
1314
<script src="app/lib/objectiron.js"></script>
1415
<script src="app/lib/long.js"></script>
1516
<script src="app/lib/Math.js"></script>
17+
-->
1618

1719
<!-- Minified Dash -->
18-
<script src="dash.min.js"></script>
20+
<!--<script src="dash.min.js"></script>-->
1921

2022
<!-- Minified Dash & Libraries -->
21-
<!--<script src="dash.all.js"></script>-->
23+
<script src="dash.all.js"></script>
2224

2325
<script>
2426
function getUrlVars() {
@@ -44,7 +46,6 @@
4446
player = new MediaPlayer(context);
4547
player.startup();
4648

47-
player.setIsLive(false);
4849
player.attachSource(url);
4950

5051
video = document.querySelector(".dash-video-player video"),

test/js/dash/DashMetricsConverter_Suite.js

-125
This file was deleted.

test/js/streaming/MediaPlayer_Suite.js

+29-29
Original file line numberDiff line numberDiff line change
@@ -36,32 +36,32 @@ describe("Media Player Test Suite", function () {
3636
player = new MediaPlayer(context);
3737
manifestLoader = system.getObject("manifestLoader");
3838
source = "http://dashdemo.edgesuite.net/envivio/dashpr/clear/Manifest.mpd";
39-
39+
4040
});
41-
41+
4242
it("check whether initialized variable is initailised or not while attaching source", function () {
4343
expect(function() {player.attachSource(source)}).toThrow();
4444
});
4545

4646
it("check whether initialized variable is initailised or not while attaching video", function () {
4747
var element = document.createElement('video');
48-
$(element).autoplay = true;
48+
element.autoplay = true;
4949
player.setAutoPlay(true);
50-
expect(function() {player.attachView($(element))}).toThrow();
50+
expect(function() {player.attachView(element)}).toThrow();
5151
});
5252

5353
it("check whether initialized variable is initialized or not while playing", function () {
5454
var element = document.createElement('video');
55-
$(element).autoplay = true;
55+
element.autoplay = true;
5656
player.setAutoPlay(true);
57-
expect(function() {player.attachView($(element))}).toThrow();
57+
expect(function() {player.attachView(element)}).toThrow();
5858
});
5959

60-
60+
6161
if(window.location.href.indexOf("runner.html")>0){
62-
62+
6363
describe("Media Player test Suite", function () {
64-
64+
6565
beforeEach(function () {
6666
// Set up DI.
6767
system = new dijon.System();
@@ -70,30 +70,30 @@ describe("Media Player Test Suite", function () {
7070
context = new Dash.di.DashContext();
7171
system.injectInto(context);
7272
player = new MediaPlayer(context);
73-
73+
7474
});
75-
75+
7676
it("check whether initialized variable is initialized or not while playing", function () {
77-
var result=false;
77+
var result=false;
7878
var festResult;
79-
79+
8080
element = document.createElement('video');
8181
player.startup();
8282
player.autoPlay = true;
8383
player.attachView($(element));
84-
84+
8585
manifestLoader = system.getObject('manifestLoader');
86-
86+
8787
manifestLoader.load(source).then( function (manifestResult) {
8888
festResult=manifestResult;
8989
result=true;
9090
});
91-
91+
9292
waitsFor(function () {
9393
if(result)
9494
return true;
9595
}, "data is null", 1000);
96-
96+
9797
runs(function () {
9898
expect(festResult.xmlns).toEqual("urn:mpeg:DASH:schema:MPD:2011");
9999
expect(festResult.type).toEqual("static");
@@ -103,7 +103,7 @@ describe("Media Player Test Suite", function () {
103103
expect(festResult.profiles).toEqual("urn:mpeg:dash:profile:isoff-live:2011");
104104

105105
//AdaptationSet set1
106-
106+
107107
expect(festResult.Period.AdaptationSet[0].mimeType).toEqual("video/mp4");
108108
expect(festResult.Period.AdaptationSet[0].segmentAlignment).toBeTruthy();
109109
expect(festResult.Period.AdaptationSet[0].startWithSAP).toEqual(1);
@@ -131,28 +131,28 @@ describe("Media Player Test Suite", function () {
131131
expect(festResult.Period.AdaptationSet[1].Representation.bandwidth).toEqual(56000);
132132

133133
});
134-
});
135-
134+
});
135+
136136
it("check whether initialized variable is initialized or not while playing with invalid source", function () {
137-
var result=false;
137+
var result=false;
138138
var festResult;
139-
139+
140140
element = document.createElement('video');
141141
player.startup();
142142
player.autoPlay = true;
143143
player.attachView($(element));
144-
144+
145145
manifestLoader = system.getObject('manifestLoader');
146146
source="http://dashdemo.edgesuite.net/envivio/dashpr/clear/Manifestdd.mpd";
147147
manifestLoader.load(source).then( function (manifestResult) {
148148
expect(festResult).toEqual(undefined);
149-
149+
150150
});
151151

152-
});
153-
154-
152+
});
153+
154+
155155
});
156-
}
156+
}
157157

158-
});
158+
});

0 commit comments

Comments
 (0)