var t = async_test(document.title, {timeout: 30000}), mcServer, mcClient, mcServerInfo, playbackListener, watcherId, beforedata;
t.step(function () {
+ add_result_callback(function(){
+ mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
+ });
playbackListener = {
onmetadatachanged: t.step_func(function(metadata) {
assert_type(metadata, "object", "metadata should be an object");
assert_equals(JSON.stringify(metadata), JSON.stringify(beforedata), "metadata should be updated");
- mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
t.done();
})
};
var t = async_test(document.title, {timeout: 30000}), mcServer, mcClient, mcServerInfo, playbackListener, watcherId;
t.step(function () {
+ add_result_callback(function(){
+ mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
+ });
playbackListener = {
onplaybackchanged: t.step_func(function(state, position) {
assert_type(state, "string", "state should be a string");
assert_equals(state, "STOP", "state should be PLAY");
assert_type(position, "long", "position should be a long");
- mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
t.done();
})
};
var t = async_test(document.title, {timeout: 30000}), mcServer, mcClient, mcServerInfo, playbackListener, watcherId = null;
t.step(function () {
+ add_result_callback(function(){
+ mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
+ });
playbackListener = {
onrepeatstatechanged: t.step_func(function(state) {
assert_type(state, "string", "state should be a string");
assert_equals(state, "REPEAT_ALL", "state should be updated");
- mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
t.done();
})
};
var t = async_test(document.title, {timeout: 30000}), mcServer, mcClient, mcServerInfo, playbackListener, watcherId, beforemode;
t.step(function () {
+ add_result_callback(function(){
+ mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
+ });
playbackListener = {
onshufflemodechanged: t.step_func(function(mode) {
assert_type(mode, "boolean", "mode should be a boolean");
assert_equals(mode, !beforemode, "mode should be updated");
- mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
t.done();
})
};