Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
526f7918
Commit
526f7918
authored
Nov 13, 2013
by
polesye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BLD-424: Add test to check speed change.
parent
81e1d18d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
+12
-5
No files found.
common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
View file @
526f7918
...
...
@@ -411,8 +411,6 @@
beforeEach
(
function
()
{
initialize
();
videoPlayer
.
currentTime
=
60
;
spyOn
(
videoPlayer
,
'updatePlayTime'
).
andCallThrough
();
spyOn
(
state
,
'setSpeed'
).
andCallThrough
();
spyOn
(
videoPlayer
,
'log'
).
andCallThrough
();
...
...
@@ -421,6 +419,8 @@
describe
(
'always'
,
function
()
{
beforeEach
(
function
()
{
videoPlayer
.
currentTime
=
60
;
videoPlayer
.
onSpeedChange
(
'0.75'
,
false
);
});
...
...
@@ -446,8 +446,8 @@
describe
(
'when the video is playing'
,
function
()
{
beforeEach
(
function
()
{
videoPlayer
.
currentTime
=
60
;
videoPlayer
.
play
();
videoPlayer
.
onSpeedChange
(
'0.75'
,
false
);
});
...
...
@@ -459,8 +459,6 @@
describe
(
'when the video is not playing'
,
function
()
{
beforeEach
(
function
()
{
videoPlayer
.
pause
();
videoPlayer
.
onSpeedChange
(
'0.75'
,
false
);
});
...
...
@@ -468,6 +466,15 @@
expect
(
videoPlayer
.
player
.
setPlaybackRate
)
.
toHaveBeenCalledWith
(
'0.75'
);
});
it
(
'video has a correct speed'
,
function
()
{
spyOn
(
videoPlayer
,
'onSpeedChange'
);
state
.
speed
=
'2.0'
;
videoPlayer
.
onPlay
();
expect
(
videoPlayer
.
onSpeedChange
).
toHaveBeenCalledWith
(
'2.0'
);
videoPlayer
.
onPlay
();
expect
(
videoPlayer
.
onSpeedChange
.
calls
.
length
).
toEqual
(
1
);
});
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment