@@ -36,32 +36,32 @@ describe("Media Player Test Suite", function () {
36
36
player = new MediaPlayer ( context ) ;
37
37
manifestLoader = system . getObject ( "manifestLoader" ) ;
38
38
source = "http://dashdemo.edgesuite.net/envivio/dashpr/clear/Manifest.mpd" ;
39
-
39
+
40
40
} ) ;
41
-
41
+
42
42
it ( "check whether initialized variable is initailised or not while attaching source" , function ( ) {
43
43
expect ( function ( ) { player . attachSource ( source ) } ) . toThrow ( ) ;
44
44
} ) ;
45
45
46
46
it ( "check whether initialized variable is initailised or not while attaching video" , function ( ) {
47
47
var element = document . createElement ( 'video' ) ;
48
- $ ( element ) . autoplay = true ;
48
+ element . autoplay = true ;
49
49
player . setAutoPlay ( true ) ;
50
- expect ( function ( ) { player . attachView ( $ ( element ) ) } ) . toThrow ( ) ;
50
+ expect ( function ( ) { player . attachView ( element ) } ) . toThrow ( ) ;
51
51
} ) ;
52
52
53
53
it ( "check whether initialized variable is initialized or not while playing" , function ( ) {
54
54
var element = document . createElement ( 'video' ) ;
55
- $ ( element ) . autoplay = true ;
55
+ element . autoplay = true ;
56
56
player . setAutoPlay ( true ) ;
57
- expect ( function ( ) { player . attachView ( $ ( element ) ) } ) . toThrow ( ) ;
57
+ expect ( function ( ) { player . attachView ( element ) } ) . toThrow ( ) ;
58
58
} ) ;
59
59
60
-
60
+
61
61
if ( window . location . href . indexOf ( "runner.html" ) > 0 ) {
62
-
62
+
63
63
describe ( "Media Player test Suite" , function ( ) {
64
-
64
+
65
65
beforeEach ( function ( ) {
66
66
// Set up DI.
67
67
system = new dijon . System ( ) ;
@@ -70,30 +70,30 @@ describe("Media Player Test Suite", function () {
70
70
context = new Dash . di . DashContext ( ) ;
71
71
system . injectInto ( context ) ;
72
72
player = new MediaPlayer ( context ) ;
73
-
73
+
74
74
} ) ;
75
-
75
+
76
76
it ( "check whether initialized variable is initialized or not while playing" , function ( ) {
77
- var result = false ;
77
+ var result = false ;
78
78
var festResult ;
79
-
79
+
80
80
element = document . createElement ( 'video' ) ;
81
81
player . startup ( ) ;
82
82
player . autoPlay = true ;
83
83
player . attachView ( $ ( element ) ) ;
84
-
84
+
85
85
manifestLoader = system . getObject ( 'manifestLoader' ) ;
86
-
86
+
87
87
manifestLoader . load ( source ) . then ( function ( manifestResult ) {
88
88
festResult = manifestResult ;
89
89
result = true ;
90
90
} ) ;
91
-
91
+
92
92
waitsFor ( function ( ) {
93
93
if ( result )
94
94
return true ;
95
95
} , "data is null" , 1000 ) ;
96
-
96
+
97
97
runs ( function ( ) {
98
98
expect ( festResult . xmlns ) . toEqual ( "urn:mpeg:DASH:schema:MPD:2011" ) ;
99
99
expect ( festResult . type ) . toEqual ( "static" ) ;
@@ -103,7 +103,7 @@ describe("Media Player Test Suite", function () {
103
103
expect ( festResult . profiles ) . toEqual ( "urn:mpeg:dash:profile:isoff-live:2011" ) ;
104
104
105
105
//AdaptationSet set1
106
-
106
+
107
107
expect ( festResult . Period . AdaptationSet [ 0 ] . mimeType ) . toEqual ( "video/mp4" ) ;
108
108
expect ( festResult . Period . AdaptationSet [ 0 ] . segmentAlignment ) . toBeTruthy ( ) ;
109
109
expect ( festResult . Period . AdaptationSet [ 0 ] . startWithSAP ) . toEqual ( 1 ) ;
@@ -131,28 +131,28 @@ describe("Media Player Test Suite", function () {
131
131
expect ( festResult . Period . AdaptationSet [ 1 ] . Representation . bandwidth ) . toEqual ( 56000 ) ;
132
132
133
133
} ) ;
134
- } ) ;
135
-
134
+ } ) ;
135
+
136
136
it ( "check whether initialized variable is initialized or not while playing with invalid source" , function ( ) {
137
- var result = false ;
137
+ var result = false ;
138
138
var festResult ;
139
-
139
+
140
140
element = document . createElement ( 'video' ) ;
141
141
player . startup ( ) ;
142
142
player . autoPlay = true ;
143
143
player . attachView ( $ ( element ) ) ;
144
-
144
+
145
145
manifestLoader = system . getObject ( 'manifestLoader' ) ;
146
146
source = "http://dashdemo.edgesuite.net/envivio/dashpr/clear/Manifestdd.mpd" ;
147
147
manifestLoader . load ( source ) . then ( function ( manifestResult ) {
148
148
expect ( festResult ) . toEqual ( undefined ) ;
149
-
149
+
150
150
} ) ;
151
151
152
- } ) ;
153
-
154
-
152
+ } ) ;
153
+
154
+
155
155
} ) ;
156
- }
156
+ }
157
157
158
- } ) ;
158
+ } ) ;
0 commit comments