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
394b14b2
authored
2014-10-02 13:48:15 +0900
by
Tetsuya Morimoto
Committed by
Gary Katsevman
2014-10-02 15:08:14 -0400
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added a test for error.responseText
1 parent
4290c342
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
test/playlist-loader_test.js
test/playlist-loader_test.js
View file @
394b14b
...
...
@@ -240,6 +240,7 @@
test
(
'emits an error if a media refresh fails'
,
function
()
{
var
errors
=
0
,
errorResponseText
=
'custom error message'
,
loader
=
new
videojs
.
Hls
.
PlaylistLoader
(
'live.m3u8'
);
loader
.
on
(
'error'
,
function
()
{
...
...
@@ -251,10 +252,11 @@
'#EXTINF:10,\n'
+
'0.ts\n'
);
clock
.
tick
(
10
*
1000
);
// trigger a refresh
requests
.
pop
().
respond
(
500
);
requests
.
pop
().
respond
(
500
,
null
,
errorResponseText
);
strictEqual
(
errors
,
1
,
'emitted an error'
);
strictEqual
(
loader
.
error
.
status
,
500
,
'captured the status code'
);
strictEqual
(
loader
.
error
.
responseText
,
errorResponseText
,
'captured the responseText'
);
});
test
(
'switches media playlists when requested'
,
function
()
{
...
...
Please
register
or
sign in
to post a comment