Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
videojs-contrib-hls
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
414389a8
authored
2014-09-22 18:28:56 -0400
by
Gary Katsevman
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
PR comment updates
1 parent
358ec163
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
20 deletions
test/videojs-hls_test.js
test/videojs-hls_test.js
View file @
414389a
...
...
@@ -741,13 +741,14 @@ test('when outstanding XHRs are cancelled, they get aborted properly', function(
ok
(
requests
[
1
].
aborted
,
'XHR aborted'
);
strictEqual
(
requests
.
length
,
3
,
'opened new XHR'
);
notEqual
(
player
.
hls
.
segmentXhr_
.
url
,
requests
[
1
].
url
,
'
the segment xhr is nulled out
'
);
notEqual
(
player
.
hls
.
segmentXhr_
.
url
,
requests
[
1
].
url
,
'
a new segment is request that is not the aborted one
'
);
strictEqual
(
readystatechanges
,
0
,
'onreadystatechange was not called'
);
});
test
(
'segmentXhr is properly nulled out when dispose is called'
,
function
()
{
var
readystatechanges
=
0
,
oldDispose
=
videojs
.
Flash
.
prototype
.
dispose
;
var
readystatechanges
=
0
,
oldDispose
=
videojs
.
Flash
.
prototype
.
dispose
;
videojs
.
Flash
.
prototype
.
dispose
=
function
()
{};
player
.
src
({
...
...
@@ -756,15 +757,6 @@ test('segmentXhr is properly nulled out when dispose is called', function() {
});
openMediaSource
(
player
);
standardXHRResponse
(
requests
[
0
]);
player
.
hls
.
media
=
{
segments
:
[{
uri
:
'0.ts'
,
duration
:
10
},
{
uri
:
'1.ts'
,
duration
:
10
}]
};
// trigger a segment download request
player
.
trigger
(
'timeupdate'
);
...
...
@@ -1200,14 +1192,15 @@ test('disposes the playlist loader', function() {
});
test
(
'remove event handlers on dispose'
,
function
()
{
var
player
,
handlers
=
[],
timeupdateOff
=
0
,
waitingOff
=
0
,
oldOff
,
type
,
handler
,
i
;
var
player
,
handlers
=
[],
timeupdateOff
=
0
,
waitingOff
=
0
,
oldOff
,
type
,
handler
,
i
;
player
=
createPlayer
();
player
.
src
({
...
...
Please
register
or
sign in
to post a comment