4 Copyright (c) 2013 Samsung Electronics Co., Ltd.
6 Licensed under the Apache License, Version 2.0 (the License);
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
21 Andrzej Krolikowski <a.krolikowsk@samsung.com>
26 <title>Messaging/UTC_messaging</title>
27 <meta charset="utf-8">
28 <script type="text/javascript" src="../resources/unitcommon.js"></script>
29 <script type="text/javascript" src="support/messaging_common.js"></script>
36 //==== TEST: MessageStorage_findMessages_errorCallback_TypeMismatch_1
37 //==== LABEL check whether invoking 'findMessages' method with invalid error callback throws exception properly
38 //==== STEP check whether invoking 'findMessages' method with invalid error callback throws exception properly
41 //==== ONLOAD_DELAY 90
42 //==== SPEC Tizen Web API:Communication:Messaging:MessageStorage:findMessages M
43 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/messaging.html#findMessagesid2465847
44 //==== TEST_CRITERIA MC
45 setup({timeout: 90000});
47 var this_test = async_test("MessageStorage_findMessages_errorCallback_TypeMismatch_1", {timeout: 90000});
48 this_test.step(function () {
49 var testName, typeFilter, findMessagesCallback, getMessagingServicesCallback, onError;
51 testName = "findMessages test Argument 2, Invaild Test 01 : input [number] to argument 2";
53 typeFilter = new tizen.AttributeFilter("type", "EXACTLY", "messaging.sms");
55 findMessagesCallback = this_test.step_func(function (messages) {
56 assert_unreached("Unexpected findMessagesCallback");
59 getMessagingServicesCallback = this_test.step_func(function (services) {
60 assert_true(services.length > 0, "services not found");
62 name: TYPE_MISMATCH_ERR
64 services[0].messageStorage.findMessages(typeFilter, findMessagesCallback, 1);
66 return this_test.done();
69 onError = this_test.step_func(function (err) {
70 assert_unreached("Unexpected onError: " + err.message);
73 tizen.messaging.getMessageServices("messaging.sms", getMessagingServicesCallback, onError);