onprogress: t.step_func(function (id, receivedSize, totalSize) {
try {
tizen.download.cancel(id);
- } catch (e) { }
+ } catch (e) {
+ assert_unreached("cancel() failed: " + e.name + " with message: " + e.message);
+ }
}),
onpaused: t.step_func(function (id) {
assert_unreached("onpaused should not be reached");
onprogress: t.step_func(function (id, receivedSize, totalSize) {
try {
tizen.download.pause(downloadId);
- } catch (e) { }
+ } catch (e) {
+ assert_unreached("pause() failed: " + e.name + " with message: " + e.message);
+ }
}),
onpaused: t.step_func(function (id) {
assert_type(id, "long", "id type should be a number");
try {
tizen.download.cancel(downloadId);
- } catch (e) { }
+ } catch (e) {
+ assert_unreached("cancel() failed: " + e.name + " with message: " + e.message);
+ }
}),
oncanceled: t.step_func(function (id) {
t.done();
assert_true(receivedSize >= 0 && receivedSize <= totalSize, "The length of receivedSize between zero and totalSize");
try {
tizen.download.cancel(downloadId);
- } catch (e) { }
+ } catch (e) {
+ assert_unreached("cancel() failed: " + e.name + " with message: " + e.message);
+ }
}),
onpaused: t.step_func(function (id) {
assert_unreached("onpaused should not be reached");
assert_not_equals(id, null, "id valid");
try {
retValue = tizen.download.cancel(downloadId);
- } catch(e) { }
+ } catch(e) {
+ assert_unreached("cancel() failed: " + e.name + " with message: " + e.message);
+ }
}),
onpaused: t.step_func(function (id) {
assert_unreached("onpaused should not be reached");
assert_not_equals(id, null, "id should not be null");
try {
retValue = tizen.download.pause(downloadId);
- } catch (e) { }
+ } catch (e) {
+ assert_unreached("pause() failed: " + e.name + " with message: " + e.message);
+ }
}),
onpaused: t.step_func(function (id) {
assert_equals(tizen.download.getState(downloadId), "PAUSED", "DownloadId not paused");
try {
tizen.download.cancel(downloadId);
- } catch (e) { }
+ } catch (e) {
+ assert_unreached("cancel() failed: " + e.name + " with message: " + e.message);
+ }
}),
oncanceled: t.step_func(function (id) {
assert_equals(retValue, undefined, "pause returns wrong value");
else {
try {
tizen.download.cancel(downloadId);
- } catch (e) { }
+ } catch (e) {
+ assert_unreached("cancel() failed: " + e.name + " with message: " + e.message);
+ }
}
}),
onpaused: t.step_func(function (id) {
}
try {
tizen.download.cancel(downloadId);
- } catch (e) {}
+ } catch (e) {
+ assert_unreached("cancel() failed: " + e.name + " with message: " + e.message);
+ }
t.done();
});
}
try {
tizen.download.cancel(downloadId);
- } catch (e) {}
+ } catch (e) {
+ assert_unreached("cancel() failed: " + e.name + " with message: " + e.message);
+ }
t.done();
});