+++ /dev/null
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Li, Li <li.l.li@intel.com>
- Zoe, Zou <zoex.zou@intel.com>
- Ma,YueX <yuex.ma@intel.com>
-
--->
-
-<html>
-<head>
-<title>check if method conversationsAdded in MessageConversationChangeCB</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
-<script type="text/javascript" src="support/messaging_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: MessageConversationsChangeCallback_conversationsadded_exist
-//==== LABEL check if the attribute conversationsAdded in MessageConversationsChangeCallback
-//==== STEP check if the attribute conversationsadded in MessageConversationsChangeCallback
-//==== EXPECT The attribute is found
-//==== ONLOAD_DELAY 90
-//==== SPEC Tizen Web API:Communication:Messaging:MessageConversationsChangeCallback:conversationsadded M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/messaging.html
-//==== TEST_CRITERIA CBOA
-setup({timeout: 90000});
-
-var t = async_test("MessageConversationsChangeCallback_conversationsadded_exist", {timeout:90000}),
-conversationChangeCB, removeSuccessCB, removeErrorCB, conversationsArrayCB, findErrorCB,
-serviceListCB, serviceError, msg, service, filter;
-
-t.step(function () {
- conversationChangeCB = {
- conversationsupdated : t.step_func(function (conversations) {
- assert_unreached("should not in conversationsupdated: " + conversations.length);
- }),
- conversationsadded : t.step_func(function (conversations) {
- assert_true(conversations.length > 0, "No conversation added");
- t.done();
- }),
- conversationsremoved : t.step_func(function (conversations) {
- assert_unreached("should not in conversationsremoved: " + conversations.length);
- })
- };
-
- removeSuccessCB = t.step_func(function () {
- //conversation deleted so add listener and send new message to trigger conversationsadded
- service.messageStorage.addConversationsChangeListener(conversationChangeCB);
- msg = new tizen.Message("messaging.sms", {plainBody : "MessageConversationsChangeCallback test.",to : [ TEST_SMS_RECIPIENT_2 ]});
- // Send request
- service.sendMessage(msg);
- });
-
- removeErrorCB = t.step_func(function (error) {
- assert_unreached("removeConversations() error callback: name:" + error.name + ", msg:" + error.message);
- });
-
- conversationsArrayCB = t.step_func(function (conversations) {
- if (conversations.length === 0) {
- removeSuccessCB();
- } else {
- //conversation exists so delete it first
- service.messageStorage.removeConversations(conversations, removeSuccessCB, removeErrorCB);
- }
- });
-
- findErrorCB = t.step_func(function (error) {
- assert_unreached("findConversations() error callback: name:" + error.name + ", msg:" + error.message);
- });
-
- serviceListCB = t.step_func(function (services) {
- assert_true(services.length > 0, "No message service found");
- service = services[0];
- // precondition - find and remove conversation if already exists
- filter = new tizen.AttributeFilter("to", "CONTAINS", TEST_SMS_RECIPIENT_2);
- service.messageStorage.findConversations(filter, conversationsArrayCB, findErrorCB);
- });
-
- serviceError = t.step_func(function (error) {
- assert_unreached("getMessageServices() error callback: name:" + error.name + ", msg:" + error.message);
- });
-
- tizen.messaging.getMessageServices("messaging.sms", serviceListCB, serviceError);
-});
-</script>
-</body>
-</html>
+++ /dev/null
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Li, Li <li.l.li@intel.com>
- Zoe, Zou <zoex.zou@intel.com>
- Ma,YueX <yuex.ma@intel.com>
-
--->
-
-<html>
-<head>
-<title>check if method conversationsRemoved in MessageConversationChangeCB</title>
-
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
-<script type="text/javascript" src="support/messaging_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: MessageConversationsChangeCallback_conversationsremoved_exist
-//==== LABEL check if the attribute conversationsremoved in MessageConversationsChangeCallback
-//==== SPEC Tizen Web API:Communication:Messaging:MessageConversationsChangeCallback:conversationsremoved M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/messaging.html
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA CBOA
-setup({timeout: 90000});
-
-var t = async_test("MessageConversationsChangeCallback_conversationsremoved_exist", {timeout: 90000}),
- service, serviceError, serviceSuccess, messageStorage, onSuccess,
- findSuccess, conversationChangeListener, listenerId;
-
-t.step(function () {
- //cleanup after TC
- add_result_callback(function() {
- try {
- messageStorage.removeChangeListener(listenerId);
- } catch (err) {
- // do nothing in case removeChangeListener throw an exception
- }
- });
-
- conversationChangeListener = {
- conversationsupdated: t.step_func(function(conversations) {
- assert_unreached("conversationsupdated() invoked.");
- }),
- conversationsadded: t.step_func(function(conversations) {
- assert_unreached("conversationsadded() invoked.");
- }),
- conversationsremoved: t.step_func(function(conversations) {
- assert_greater_than(conversations.length, 0, "Received empty conversations array in conversationsremoved");
- t.done();
- })
- };
-
- findSuccess = t.step_func(function (conversations) {
- assert_greater_than(conversations.length, 0, "Received conversations services array");
- messageStorage.removeConversations(conversations);
- });
-
- onSuccess = t.step_func(function () {
- listenerId = messageStorage.addConversationsChangeListener(conversationChangeListener);
- messageStorage.findConversations(typeFilter, findSuccess);
- });
-
- serviceSuccess = t.step_func(function (services) {
- assert_greater_than(services.length, 0, "Received empty services array");
- service = services[0];
- messageStorage = service.messageStorage;
- addSMSDraft(t, service, smsMessageInitDict, onSuccess);
- });
-
- serviceError = t.step_func(function (error) {
- assert_unreached("getMessageServices() error callback: name:" + error.name + ", msg:" + error.message);
- });
-
- tizen.messaging.getMessageServices("messaging.sms", serviceSuccess, serviceError);
-});
-</script>
-</body>
-</html>
</spec>
</specs>
</testcase>
- <testcase purpose="check if the attribute conversationsAdded in MessageConversationsChangeCallback" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Communication/Messaging" execution_type="auto" priority="P1" id="MessageConversationsChangeCallback_conversationsadded_exist">
- <description>
- <steps>
- <step order="1">
- <step_desc>check if the attribute conversationsadded in MessageConversationsChangeCallback</step_desc>
- <expected>The attribute is found</expected>
- </step>
- </steps>
- <test_script_entry>/opt/tct-messaging-sms-tizen-tests/messaging/MessageConversationsChangeCallback_conversationsadded_exist.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="MessageConversationsChangeCallback" element_type="method" element_name="conversationsadded" specification="Messaging" section="Communication" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/messaging.html</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
<testcase purpose="check the function of conversationsadded in MessageConversationsChangeCallback by withfilter" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Communication/Messaging" execution_type="auto" priority="P2" id="MessageConversationsChangeCallback_conversationsadded_withfilter">
<description>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="check if the attribute conversationsremoved in MessageConversationsChangeCallback" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Communication/Messaging" execution_type="auto" priority="P1" id="MessageConversationsChangeCallback_conversationsremoved_exist">
- <description>
- <test_script_entry>/opt/tct-messaging-sms-tizen-tests/messaging/MessageConversationsChangeCallback_conversationsremoved_exist.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="MessageConversationsChangeCallback" element_type="method" element_name="conversationsremoved" specification="Messaging" section="Communication" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/messaging.html</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
<testcase purpose="check the function of conversationsupdated in MessageConversationsChangeCallback by withfilter" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Communication/Messaging" execution_type="auto" priority="P2" id="MessageConversationsChangeCallback_conversationsupdated_withfilter">
<description>
<steps>
<test_script_entry>/opt/tct-messaging-sms-tizen-tests/messaging/MessageConversation_sendFindRemove.html</test_script_entry>
</description>
</testcase>
- <testcase component="TizenAPI/Communication/Messaging" execution_type="auto" id="MessageConversationsChangeCallback_conversationsadded_exist" onload_delay="90" purpose="check if the attribute conversationsAdded in MessageConversationsChangeCallback">
- <description>
- <test_script_entry>/opt/tct-messaging-sms-tizen-tests/messaging/MessageConversationsChangeCallback_conversationsadded_exist.html</test_script_entry>
- </description>
- </testcase>
<testcase component="TizenAPI/Communication/Messaging" execution_type="auto" id="MessageConversationsChangeCallback_conversationsadded_withfilter" onload_delay="90" purpose="check the function of conversationsadded in MessageConversationsChangeCallback by withfilter">
<description>
<test_script_entry>/opt/tct-messaging-sms-tizen-tests/messaging/MessageConversationsChangeCallback_conversationsadded_withfilter.html</test_script_entry>
<test_script_entry>/opt/tct-messaging-sms-tizen-tests/messaging/MessageConversationsChangeCallback_conversationsadded_withoutfilter.html</test_script_entry>
</description>
</testcase>
- <testcase component="TizenAPI/Communication/Messaging" execution_type="auto" id="MessageConversationsChangeCallback_conversationsremoved_exist" onload_delay="90" purpose="check if the attribute conversationsremoved in MessageConversationsChangeCallback">
- <description>
- <test_script_entry>/opt/tct-messaging-sms-tizen-tests/messaging/MessageConversationsChangeCallback_conversationsremoved_exist.html</test_script_entry>
- </description>
- </testcase>
<testcase component="TizenAPI/Communication/Messaging" execution_type="auto" id="MessageConversationsChangeCallback_conversationsupdated_withfilter" onload_delay="90" purpose="check the function of conversationsupdated in MessageConversationsChangeCallback by withfilter">
<description>
<test_script_entry>/opt/tct-messaging-sms-tizen-tests/messaging/MessageConversationsChangeCallback_conversationsupdated_withfilter.html</test_script_entry>