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
b10e15b4
authored
2014-09-24 14:24:34 -0700
by
Alex Rubin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Updated test
1 parent
f7632439
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
test/videojs-hls_test.js
test/videojs-hls_test.js
View file @
b10e15b
...
...
@@ -1111,21 +1111,17 @@ test('resets the switching algorithm if a request times out', function() {
'reset to the lowest bitrate playlist'
);
});
asyncTest
(
'handles xhr timeouts correctly'
,
function
(
assert
)
{
var
testTimeout
=
setTimeout
(
function
()
{
// since we are faking xhr, the test will hang if we don't
// manually end it (ontimeout will never be called)
ok
(
false
,
'request was not completed'
);
start
();
},
10
*
1000
);
test
(
'handles xhr timeouts correctly'
,
function
(
assert
)
{
expect
(
1
);
var
clock
=
sinon
.
useFakeTimers
();
videojs
.
Hls
.
xhr
({
url
:
'http://example.com'
,
timeout
:
1
},
function
(
error
)
{
assert
.
strictEqual
(
error
,
'timeout'
,
'called with timeout error'
);
clearTimeout
(
testTimeout
);
start
();
});
clock
.
tick
(
1
);
clock
.
restore
();
});
test
(
'disposes the playlist loader'
,
function
()
{
...
...
Please
register
or
sign in
to post a comment