3 Copyright (c) 2013 Samsung Electronics Co., Ltd.
5 Licensed under the Apache License, Version 2.0 (the License);
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
9 http://www.apache.org/licenses/LICENSE-2.0
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
19 Jakub Siewierski <j.siewierski@samsung.com>
24 <title>MessageService_email_sendMessage_without_successCallback</title>
25 <meta charset="utf-8"/>
26 <script type="text/javascript" src="../resources/unitcommon.js"></script>
27 <script type="text/javascript" src="support/messaging_common.js"></script>
33 //==== TEST: MessageService_email_sendMessage_without_successCallback
34 //==== LABEL Check without optional argument sendMessage(valid_message) (email)
35 //==== SPEC Tizen Web API:Communication:Messaging:MessageService:sendMessage M
36 //==== SPEC_URL https://developer.tizen.org/help/index.jsp?topic=/org.tizen.web.device.apireference/tizen/messaging.html
37 //==== ONLOAD_DELAY 180
39 //==== TEST_CRITERIA MR MMINA
40 setup({ timeout: 180000 });
41 var t = async_test("MessageService_email_sendMessage_without_successCallback", { timeout: 180000 }),
43 service, serviceListSuccess, serviceListError;
48 serviceListSuccess = t.step_func(function (services) {
49 assert_true(services.length > 0, "No email MessageService found.");
50 service = services[0];
52 datetime = tizen.time.getCurrentDateTime().toString();
53 message = new tizen.Message("messaging.email", {
56 to : [ TEST_EMAIL_RECIPIENT_1 ]
59 message.attachments = [new tizen.MessageAttachment(imagePathToSet, "image/jpg")];
61 sendMessageReturnValue = service.sendMessage(message);
62 assert_equals(sendMessageReturnValue, undefined, "sendMessage() return value is not void");
67 serviceListError = t.step_func(function (error) {
68 assert_unreached("failed to receive services: " + error.message);
71 tizen.messaging.getMessageServices("messaging.email", serviceListSuccess, serviceListError);