</spec>
</specs>
</testcase>
- <testcase purpose="Time_TZDate_toLocalTimezone" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P1" id="Time_TZDate_toLocalTimezone">
- <description>
- <steps>
- <step order="1">
- <step_desc>check Time_TZDate_toLocalTimezone</step_desc>
- <expected>Time_TZDate_toLocalTimezone pass</expected>
- </step>
- </steps>
- <test_script_entry>/opt/tct-time-tizen-tests/time/Time_TZDate_toLocalTimezone.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="TZDate" element_type="method" element_name="toLocalTimezone" specification="Time" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/time.html</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
<testcase purpose="Check if TZDate.setMinutes() works properly" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P1" id="Time_TZDate_setMinutes_normal">
<description>
<test_script_entry>/opt/tct-time-tizen-tests/time/Time_TZDate_setMinutes_normal.html</test_script_entry>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if TZDate.difference() with string representation of date throws exception" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P2" id="Time_TZDate_difference_compareWithStringTZDate">
- <description>
- <test_script_entry>/opt/tct-time-tizen-tests/time/Time_TZDate_difference_compareWithStringTZDate.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="TZDate" element_type="method" element_name="difference" specification="Time" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api/tizen/time.html</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
<testcase purpose="Check if TZDate.difference() with wrong string argument throws exception" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P2" id="Time_TZDate_difference_compareWithCharacter">
<description>
<test_script_entry>/opt/tct-time-tizen-tests/time/Time_TZDate_difference_compareWithCharacter.html</test_script_entry>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if TZDate.equalsTo() called with string representation of date throws an exception" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P2" id="Time_TZDate_equalsTo_stringTZDate">
- <description>
- <test_script_entry>/opt/tct-time-tizen-tests/time/Time_TZDate_equalsTo_stringTZDate.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="TZDate" element_type="method" element_name="equalsTo" specification="Time" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api/tizen/time.html</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
<testcase purpose="Check if TZDate.equalsTo() with number argument throws an exception" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P2" id="Time_TZDate_equalsTo_number">
<description>
<test_script_entry>/opt/tct-time-tizen-tests/time/Time_TZDate_equalsTo_number.html</test_script_entry>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if TZDate.laterThan() with string representation of date throws an exception" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P1" id="Time_TZDate_laterThan_stringTZDate">
- <description>
- <test_script_entry>/opt/tct-time-tizen-tests/time/Time_TZDate_laterThan_stringTZDate.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="TZDate" element_type="method" element_name="laterThan" specification="Time" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api/tizen/time.html</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
<testcase purpose="Check if TZDate.laterThan() with wrong number argument throws an exception" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P2" id="Time_TZDate_laterThan_number">
<description>
<test_script_entry>/opt/tct-time-tizen-tests/time/Time_TZDate_laterThan_number.html</test_script_entry>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if TZDate.setMinutes() called with value greater than upper limit don't set the minutes" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P2" id="Time_TZDate_setMinutes_boundaryBiggerThanUpper">
- <description>
- <test_script_entry>/opt/tct-time-tizen-tests/time/Time_TZDate_setMinutes_boundaryBiggerThanUpper.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="TZDate" element_type="method" element_name="setMinutes" specification="Time" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api/tizen/time.html</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
<testcase purpose="Check if TZDate.setMinutes() called with value less than lower limit don't set the minutes" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P2" id="Time_TZDate_setMinutes_boundaryLessThanLower">
<description>
<test_script_entry>/opt/tct-time-tizen-tests/time/Time_TZDate_setMinutes_boundaryLessThanLower.html</test_script_entry>
</spec>
</specs>
</testcase>
- <testcase purpose="check if time format is valid" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P1" id="TimeUtil_getTimeFormat_valid">
- <description>
- <test_script_entry>/opt/tct-time-tizen-tests/time/TimeUtil_getTimeFormat_valid.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="TimeUtil" element_type="method" element_name="getTimeFormat" specification="Time" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/time.html</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
<testcase purpose="check TimeUtil interface isLeapYear method with parameter zero" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P1" id="TimeUtil_isLeapYear_allZero">
<description>
<test_script_entry>/opt/tct-time-tizen-tests/time/TimeUtil_isLeapYear_allZero.html</test_script_entry>
</spec>
</specs>
</testcase>
- <testcase purpose="tizen.TZDate.laterThan () WRONG argument(s)" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P1" id="TZDate_laterThan_with_null">
+ <testcase purpose="Check argument null validation in laterThan method in TZDate." type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P1" id="TZDate_laterThan_with_null">
<description>
<test_script_entry>/opt/tct-time-tizen-tests/time/TZDate_laterThan_with_null.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="check whether getAvailableTimezones() method correctly returns identifiers of time zones supported by the device" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P1" id="TimeUtil_getAvailableTimezones_with_additional_parameter">
- <description>
- <test_script_entry>/opt/tct-time-tizen-tests/time/TimeUtil_getAvailableTimezones_with_additional_parameter.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="TimeUtil" element_type="method" element_name="getAvailableTimezones" specification="Time" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html#getAvailableTimezonesid2619543</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
<testcase purpose="Check if getAvailableTimezones method exists in TimeManager." type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P1" id="TimeUtil_getAvailableTimezones_exist">
<description>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="check whether getDateFormat() method correctly returns the date format according to the system's locale settings" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P1" id="TimeUtil_getDateFormat_for_different_date">
- <description>
- <test_script_entry>/opt/tct-time-tizen-tests/time/TimeUtil_getDateFormat_for_different_date.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="TimeUtil" element_type="method" element_name="getDateFormat" specification="Time" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html#getDateFormatid2619638</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
<testcase purpose="Check if getDateFormat method exists in TimeManager." type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P1" id="TimeUtil_getDateFormat_exist">
<description>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="check whether getLocalTimezone() method returns the identifier of the local system time zone correctly" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P1" id="TimeUtil_getLocalTimezone_extra_arg">
- <description>
- <test_script_entry>/opt/tct-time-tizen-tests/time/TimeUtil_getLocalTimezone_extra_arg.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="TimeUtil" element_type="method" element_name="getLocalTimezone" specification="Time" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html#getLocalTimezoneid2619465</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
<testcase purpose="Check if getLocalTimezone method exists in TimeManager." type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P1" id="TimeUtil_getLocalTimezone_exist">
<description>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="Check TimeDuration methods" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P3" id="TimeDuration_batch_testing">
- <description>
- <test_script_entry>/opt/tct-time-tizen-tests/time/TimeDuration_batch_testing.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="TimeDuration" usage="true" specification="Time" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
<testcase purpose="Check addDuration method for invalid length" type="compliance" status="approved" component="TizenAPI/System/Time" execution_type="auto" priority="P2" id="TZDate_addDuration_invalidLength">
<description>
<test_script_entry>/opt/tct-time-tizen-tests/time/TZDate_addDuration_invalidLength.html</test_script_entry>
date = new Date(2013, 2, 27);
currentTZDate = new tizen.TZDate(date);
returnedValue = currentTZDate.getUTCDay();
- assert_equals(returnedValue, 3, "day check");
+ assert_equals(returnedValue, 2, "day check");
});
</script>
date = new Date(2013, 2, 27, 18);
currentTZDate = new tizen.TZDate(date);
returnedValue = currentTZDate.getUTCHours();
- assert_equals(returnedValue, 18, "hours check");
+ assert_equals(returnedValue, 9, "hours check");
});
</script>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html#isDSTid2622784
//==== TEST_CRITERIA MR MNA
test(function () {
- var currentTZDate = tizen.time.getCurrentDateTime(), returnedValue;
- returnedValue = currentTZDate.isDST();
+ var dateTZDate = new tizen.TZDate(2013, 2, 27, 18, 33), returnedValue;
+ returnedValue = dateTZDate.isDST();
assert_false(returnedValue, "false check");
});
</script>
-
</body>
-
</html>
<div id="log"></div>
<script>
//==== TEST: TZDate_laterThan_with_null
-//==== LABEL tizen.TZDate.laterThan () WRONG argument(s)
+//==== LABEL Check argument null validation in laterThan method in TZDate.
//==== SPEC Tizen Web API:System:Time:TZDate:laterThan M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html#laterThanid2622143
//==== TEST_CRITERIA MMA
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html#toDateStringid2622494
//==== TEST_CRITERIA
test(function () {
- var expectedDateString = "Fri Nov 11 2011", i = 0, date;
- date = new Date(2011, 10, 11);
+ var expectedDateString = "Friday, November 11, 2011", i = 0, date;
+ date = new tizen.TZDate(2011, 10, 11);
assert_equals(date.toDateString(), expectedDateString, this.name);
for (i = 0; i < testAdditionalParamArray.length; i++) {
assert_equals(date.toDateString(testAdditionalParamArray[i]), expectedDateString, this.name);
+++ /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:
- Han, RuiJingXA <ruijingx.a.han@intel.com>
- Roman Frolow <r.frolow@samsung.com>
-
--->
-<html>
-<head>
-<title>TimeDuration_batch_testing</title>
-<script type="text/javascript" src="support/time_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: TimeDuration_batch_testing
-//==== LABEL: Check TimeDuration methods
-//==== PRIORITY: P3
-//==== SPEC: Tizen Web API:System:Time:TimeDuration:TimeDuration U
-//==== SPEC_URL: https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html
-//==== TEST_CRITERIA
-var t = async_test("Time_TimeDuration_batch_testing", {timeout: 90000}),
- d1, d2, res, i, diff, TimeTesting;
-setup({timeout: 90000});
-t.step(function () {
- TimeTesting = [
- {f_value: 1, f_unit: "HOURS", s_value: 120, s_unit: "MINS", method: "lessThan"},
- {f_value: 2, f_unit: "HOURS", s_value: 120, s_unit: "MINS", method: "lessThan", negate: true},
- {f_value: 2, f_unit: "HOURS", s_value: 110, s_unit: "MINS", method: "greaterThan"},
- {f_value: 2, f_unit: "HOURS", s_value: 140, s_unit: "MINS", method: "greaterThan", negate: true},
- {f_value: 2, f_unit: "HOURS", s_value: 120, s_unit: "MINS", method: "greaterThan", negate: true},
- {f_value: 120, f_unit: "MINS", s_value: 1, s_unit: "HOURS", method: "equalsTo", negate: true},
- {f_value: 2, f_unit: "DAYS", s_value: 47, s_unit: "HOURS", method: "equalsTo", negate: true},
- {f_value: 21, f_unit: "SECS", s_value: 23, s_unit: "SECS", method: "difference", diff_length: -2, diff_unit: "SECS"},
- {f_value: 21, f_unit: "MINS", s_value: 23, s_unit: "MINS", method: "difference", diff_length: -2, diff_unit: "MINS"},
- {f_value: 21, f_unit: "MSECS", s_value: 230, s_unit: "MSECS", method: "difference", diff_length: -209, diff_unit: "MSECS"},
- {f_value: 21, f_unit: "HOURS", s_value: 23, s_unit: "HOURS", method: "difference", diff_length: -2, diff_unit: "HOURS"}
- ];
- for (i = 1; i < TimeTesting.length; i++) {
- if (TimeTesting[i].method === "difference") {
- d1 = new tizen.TimeDuration(TimeTesting[i].f_value, TimeTesting[i].f_unit);
- d2 = new tizen.TimeDuration(TimeTesting[i].s_value, TimeTesting[i].s_unit);
- diff = d1.difference(d2);
- assert_equals(diff.length, TimeTesting[i].diff_length,
- "TimeDuration: wrong length difference for " + TimeTesting[i].f_value +
- " " + TimeTesting[i].f_unit + " and " + TimeTesting[i].s_value + " " + TimeTesting[i].s_unit);
- assert_equals(diff.unit, TimeTesting[i].diff_unit,
- "TimeDuration: wrong unit difference for " + TimeTesting[i].f_value +
- " " + TimeTesting[i].f_unit + " and " + TimeTesting[i].s_value + " " + TimeTesting[i].s_unit);
-
- } else {
- d1 = new tizen.TimeDuration(TimeTesting[i].f_value, TimeTesting[i].f_unit);
- d2 = new tizen.TimeDuration(TimeTesting[i].s_value, TimeTesting[i].s_unit);
- res = d1[TimeTesting[i].method](d2);
- if (TimeTesting[i].negate) {
- res = !res;
- }
- assert_true(res,
- "TimeDuration: " + TimeTesting[i].f_value + " " +
- TimeTesting[i].f_unit + (TimeTesting[i].negate ? " " : " not ") +
- TimeTesting[i].method + " " + TimeTesting[i].s_value + " " + TimeTesting[i].s_unit);
- }
- }
- t.done();
-});
-</script>
-</body>
-</html>
-
//==== TEST_CRITERIA CONSTRM CONSTRA
test(function () {
var timeduration = new tizen.TimeDuration(20, "DAYS");
+ assert_true(timeduration instanceof tizen.TimeDuration, "TimeDuration check");
assert_type(timeduration, "object", "type check");
assert_equals(timeduration.length, 20, "length attribute value check");
assert_equals(timeduration.unit, "DAYS", "unit attribute value check");
//==== TEST_CRITERIA CONSTRM CONSTRA
test(function () {
var timeduration = new tizen.TimeDuration(20);
+ assert_true(timeduration instanceof tizen.TimeDuration, "TimeDuration check");
assert_type(timeduration, "object", "type check");
assert_equals(timeduration.length, 20, "length attribute value check");
}, "TimeDuration_constructor_minimal");
timeDuration1 = new tizen.TimeDuration(1, "DAYS");
timeDuration2 = new tizen.TimeDuration(60, "DAYS");
returnedValue = timeDuration1.difference(timeDuration2);
- assert_true(returnedValue instanceof tizen.TimeDuration);
+ assert_true(returnedValue instanceof tizen.TimeDuration, "TimeDuration check");
assert_equals(returnedValue.length, -59, "length check");
+ assert_equals(returnedValue.unit, "DAYS", "length check");
}, "TimeDuration_difference");
</script>
//==== TEST_CRITERIA MMINA MR
test(function () {
var d1 = null, d2 = null;
-
d1 = new tizen.TimeDuration(1, "DAYS");
d2 = new tizen.TimeDuration(2, "DAYS");
- assert_not_equals(d2.difference(d1), null, "null check");
assert_true(d2.difference(d1) instanceof tizen.TimeDuration, "check type tizen.TimeDuration");
});
</script>
+++ /dev/null
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-
--->
-<html lang="en">
-
-<head>
-<title>calendar/UTC_time_</title>
-<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
-<script type="text/javascript" src="support/time_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: TimeUtil_getAvailableTimezones_with_additional_parameter
-//==== LABEL check whether getAvailableTimezones() method correctly returns identifiers of time zones supported by the device
-//==== SPEC Tizen Web API:System:Time:TimeUtil:getAvailableTimezones M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html#getAvailableTimezonesid2619543
-//==== TEST_CRITERIA
-test(function () {
- var i, timeZones;
-
- for (i = 0; i < testAdditionalParamArray.length; i++) {
- timeZones = tizen.time.getAvailableTimezones(testAdditionalParamArray[i]);
- assert_true(isArray(timeZones), "testGetAvailableTimeZones()");
- }
-});
-
-</script>
-</body>
-</html>
+++ /dev/null
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-
--->
-<html lang="en">
-
-<head>
-<title>calendar/UTC_time_</title>
-<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
-<script type="text/javascript" src="support/time_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-// TESTS
-
-//==== TEST: TimeUtil_getDateFormat_for_different_date
-//==== LABEL check whether getDateFormat() method correctly returns the date format according to the system's locale settings
-//==== SPEC Tizen Web API:System:Time:TimeUtil:getDateFormat M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html#getDateFormatid2619638
-//==== TEST_CRITERIA MMINA MR
-test(function () {
- var defaultDateFormat = tizen.time.getDateFormat(),
- expectedDefaultDateFormat = "D, d M y",
- expectedShortDateFormat = "d/m/y",
- expectedNotShortDateFormat = "D, d M y",
- shortDateFormat = tizen.time.getDateFormat(null),
- shortDateFormat1 = tizen.time.getDateFormat(undefined),
- shortDateFormat2 = tizen.time.getDateFormat(true),
- notShortDateFormat = tizen.time.getDateFormat(false), i;
-
- assert_type(defaultDateFormat, "string", "testGetDateFormat()");
- assert_equals(defaultDateFormat, expectedDefaultDateFormat, "testGetDateFormat()");
-
- assert_type(shortDateFormat, "string", "testGetDateFormat()");
- assert_equals(shortDateFormat, expectedDefaultDateFormat, "testGetDateFormat()");
-
- assert_type(shortDateFormat1, "string", "testGetDateFormat()");
- assert_equals(shortDateFormat1, expectedDefaultDateFormat, "testGetDateFormat()");
-
- assert_type(shortDateFormat2, "string", "testGetDateFormat() ");
- assert_equals(shortDateFormat2, expectedShortDateFormat, "testGetDateFormat() ");
-
- assert_type(notShortDateFormat, "string", "testGetDateFormat()");
- assert_equals(notShortDateFormat, expectedNotShortDateFormat, "testGetDateFormat() ");
-
- for (i = 0; i < testAdditionalParamArray.length; i++) {
- notShortDateFormat = tizen.time.getDateFormat(false, testAdditionalParamArray[i]);
- assert_type(notShortDateFormat, "string", "testGetDateFormat()");
- assert_equals(notShortDateFormat, expectedNotShortDateFormat, "testGetDateFormat() ");
- }
-}, "TimeUtil_getDateFormat_for_different_date");
-
-
-</script>
-</body>
-</html>
+++ /dev/null
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-
--->
-<html lang="en">
-
-<head>
-<title>calendar/UTC_time_</title>
-<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
-<script type="text/javascript" src="support/time_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-// TESTS
-
-//==== TEST: TimeUtil_getLocalTimezone_extra_arg
-//==== LABEL check whether getLocalTimezone() method returns the identifier of the local system time zone correctly
-//==== SPEC Tizen Web API:System:Time:TimeUtil:getLocalTimezone M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/time.html#getLocalTimezoneid2619465
-//==== TEST_CRITERIA MNA MR
-test(function () {
- var timeZone = tizen.time.getLocalTimezone(), expectedTimeZone = "Asia/Seoul", i;
-
- assert_type(timeZone, "string", "testGetLocalTimeZone() ");
- assert_equals(timeZone, expectedTimeZone, "testGetLocalTimeZone()");
-
- for (i = 0; i < testAdditionalParamArray.length; i++) {
- timeZone = tizen.time.getLocalTimezone(testAdditionalParamArray[i]);
- assert_type(timeZone, "string", "testGetLocalTimeZone() ");
- assert_equals(timeZone, expectedTimeZone, "testGetLocalTimeZone()");
- }
-});
-
-</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:
- Lei, ZhanX <zhanx.lei@intel.com>
- Han, RuiJingXA <ruijingx.a.han@intel.com>
-
--->
-<html>
-<head>
-<title>TimeUtil interface getTimeFormat method valid check - usage test of interface </title>
-<script type="text/javascript" src="../resources/testharness.js"></script>
-<script type="text/javascript" src="../resources/testharnessreport.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: TimeUtil_getTimeFormat_valid
-//==== LABEL check if time format is valid
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:System:Time:TimeUtil:getTimeFormat M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/time.html
-//==== TEST_CRITERIA MNA MR
-test(function () {
- var timeFormat = null;
- timeFormat = tizen.time.getTimeFormat();
- assert_true(timeFormat === "h:m:s ap" || timeFormat === "h:m:s", "h:m:s ap" + "h:m:s" +" is valid value" );
-}, "TimeUtil_getTimeFormat_valid");
-</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:
- Han, RuiJingXA <ruijingx.a.han@intel.com>
-
--->
-
-<html>
-<head>
-<title>Time_TZDate_difference_compareWithStringTZDate</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
-<script type="text/javascript" src="./support/time_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: Time_TZDate_difference_compareWithStringTZDate
-//==== LABEL Check if TZDate.difference() with string representation of date throws exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:System:Time:TZDate:difference M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api/tizen/time.html
-//==== TEST_CRITERIA MC
-test(function () {
- var tzStr = tizen.time.getCurrentDateTime().toString();
- assert_throws("TYPE_MISMATCH_ERR",
- function () {
- tizen.time.getCurrentDateTime().difference(tzStr);
- }, "Specific TypeMismatchError exception.");
-}, "Time_TZDate_difference_compareWithStringTZDate");
-</script>
-</body>
-</html>
var tzOther = tizen.time.getCurrentDateTime().toLocalTimezone(),
res = tizen.time.getCurrentDateTime().earlierThan(tzOther);
- assert_false(res, "TZDate is earlier than another, result should be true");
+ assert_false(res, "earlierThan check");
}, "Time_TZDate_earlierThan_timezone");
</script>
</body>
+++ /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:
- Han, RuiJingXA <ruijingx.a.han@intel.com>
-
--->
-<html>
-<head>
-<title>Time_TZDate_equalsTo_stringTZDate</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
-<script type="text/javascript" src="./support/time_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: Time_TZDate_equalsTo_stringTZDate
-//==== LABEL Check if TZDate.equalsTo() called with string representation of date throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:System:Time:TZDate:equalsTo M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api/tizen/time.html
-//==== TEST_CRITERIA MC
-test(function () {
- var tzStr = tizen.time.getCurrentDateTime().toString();
-
- assert_throws("TYPE_MISMATCH_ERR",
- function () { tizen.time.getCurrentDateTime().equalsTo(tzStr);},
- "Specific TypeMismatchError exception.");
-}, "Time_TZDate_equalsTo_stringTZDate");
-</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:
- Han, RuiJingXA <ruijingx.a.han@intel.com>
-
--->
-
-<html>
-<head>
-<title></title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
-<script type="text/javascript" src="./support/time_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: Time_TZDate_laterThan_stringTZDate
-//==== LABEL Check if TZDate.laterThan() with string representation of date throws an exception
-//==== SPEC Tizen Web API:System:Time:TZDate:laterThan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api/tizen/time.html
-//==== TEST_CRITERIA MMINA MR
-test(function () {
- var tzStr = tizen.time.getCurrentDateTime().toString();
-
- assert_throws("TYPE_MISMATCH_ERR",
- function () {
- tizen.time.getCurrentDateTime().laterThan(tzStr);
- }, "Specific TypeMismatchError exception.");
-}, "Time_TZDate_laterThan_stringTZDate");
-</script>
-</body>
-</html>
tz.setSeconds(tz.getSeconds() + 1);
res = tz.laterThan(tzOther);
- assert_true(res," TZDate is earlier than another, result should be true");
+ assert_true(res,"laterThan check");
}, "Time_TZDate_laterThan_timezone");
</script>
</body>
res = tizen.time.getCurrentDateTime().laterThan(tzOther);
assert_equals(tzyCur-1, tzyOther, "laterThan check");
- assert_true(res,"TZDate is earlier than another, result should be false");
+ assert_true(res,"laterThan check");
}, "Time_TZDate_laterThan_true");
</script>
</body>
+++ /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:
- Han, JingX <jingx.han@intel.com>
-
--->
-
-<html>
-<head>
-<title>Time_TZDate_setMinutes_boundaryBiggerThanUpper</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: Time_TZDate_setMinutes_boundaryBiggerThanUpper
-//==== LABEL Check if TZDate.setMinutes() called with value greater than upper limit don't set the minutes
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:System:Time:TZDate:setMinutes M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api/tizen/time.html
-//==== TEST_CRITERIA
-test(function () {
- var set_mins = 60,
- tz = tizen.time.getCurrentDateTime(),
- myDate, minsAfterSet;
-
- tz.setMinutes(set_mins);
- myDate = new Date();
- minsAfterSet = myDate.getMinutes();
-
- assert_not_equals(minsAfterSet, set_mins, "60 shouldn't be set to system's minute");
-}, "Time_TZDate_setMinutes_boundaryBiggerThanUpper");
-</script>
-</body>
-</html>
tz.setMonth(set_month);
monthAfterSet = tz.getMonth();
- assert_equals(monthAfterSet, set_month, "upper limit 11 month could be set correctly");
+ assert_equals(monthAfterSet, set_month, "getMonth check");
}, "Time_TZDate_setMonth_boundaryUpperLimit");
</script>
</body>
var set_secs = "abc01", myDate, secsAfterSet;
tizen.time.getCurrentDateTime().setSeconds(set_secs);
- myDate = new Date();
+ myDate = new Date(2013, 2, 27, 18, 42, 48, 100);
secsAfterSet = myDate.getSeconds();
- assert_not_equals(secsAfterSet, set_secs, "Invalid seconds abc01 shouldn't be set to system's seconds");
+ assert_not_equals(secsAfterSet, set_secs, "getSeconds check");
}, "Time_TZDate_setSeconds_invalidSeconds");
</script>
</body>
tz.setUTCFullYear(set_UTCFullYear);
yearAfterSet = tz.getUTCFullYear();
- assert_not_equals(yearAfterSet, set_UTCFullYear,"-1 shouldn't be set to system date's year");
+ assert_not_equals(yearAfterSet, set_UTCFullYear,"getUTCFullYear check");
}, "Time_TZDate_setUTCFullYear_invalidYear");
</script>
</body>
dt.setUTCMilliseconds(set_UTCMs);
UTCMsAfterSet = dt.getUTCMilliseconds();
- assert_gap_less_than(UTCMsAfterSet,set_UTCMs, 100);
+ assert_equals(UTCMsAfterSet, set_UTCMs, "getUTCMilliseconds check");
}, "Time_TZDate_setUTCMilliseconds_normal");
</script>
</body>
myDate = new Date();
UTCMinsAfterSet = myDate.getUTCMinutes();
- assert_not_equals(UTCMinsAfterSet,set_UTCMins,"decimal shouldn't be set to system's UTCMinute");
+ assert_not_equals(UTCMinsAfterSet, set_UTCMins, "getUTCMinutes check");
}, "Time_TZDate_setUTCMinutes_boundaryLessThanLower");
</script>
</body>
//==== PRE TBD
//==== TEST_CRITERIA
test(function () {
- var set_UTCSecs = 5.5, myDate, UTCSecsAfterSet;
- tizen.time.getCurrentDateTime().setUTCSeconds(set_UTCSecs);
- myDate = new Date();
- UTCSecsAfterSet = myDate.getUTCSeconds();
- assert_not_equals(UTCSecsAfterSet,set_UTCSecs,"decimal shouldn't be set to system's UTCSeconds");
+ var set_UTCSecs = 5.5, UTCSecsAfterSet, tz;
+ tz = tizen.time.getCurrentDateTime();
+ tz.setUTCSeconds(set_UTCSecs);
+ UTCSecsAfterSet = tz.getUTCSeconds();
+ assert_not_equals(UTCSecsAfterSet, set_UTCSecs, "decimal shouldn't be set to system's UTCSeconds");
});
</script>
//==== PRE TBD
//==== TEST_CRITERIA
test(function () {
- var set_UTCSecs = 60, myDate, UTCSecsAfterSet;
- tizen.time.getCurrentDateTime().setUTCSeconds(set_UTCSecs);
- myDate = new Date();
+ var set_UTCSecs = 60, myDate, UTCSecsAfterSet,
+ tz = tizen.time.getCurrentDateTime();
+ tz.setUTCSeconds(set_UTCSecs);
UTCSecsAfterSet = myDate.getUTCSeconds();
- assert_not_equals(UTCSecsAfterSet,set_UTCSecs,"BiggerThanUpper boundary value 60 shouldn't be set to system's UTCSeconds");
+ assert_not_equals(UTCSecsAfterSet, set_UTCSecs, "BiggerThanUpper boundary value 60 shouldn't be set to system's UTCSeconds");
});
</script>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api/tizen/time.html
//==== TEST_CRITERIA
test(function () {
- var set_UTCSecs = "abc01", myDate, UTCSecsAfterSet;
- tizen.time.getCurrentDateTime().setUTCSeconds(set_UTCSecs);
- myDate = new Date();
- UTCSecsAfterSet = myDate.getUTCSeconds();
+ var set_UTCSecs = "abc01", UTCSecsAfterSet,
+ tz = tizen.time.getCurrentDateTime();
+ tz.setUTCSeconds(set_UTCSecs);
+ UTCSecsAfterSet = tz.getUTCSeconds();
assert_not_equals(UTCSecsAfterSet, set_UTCSecs, "Invalid UTCSeconds abc01 shouldn't be set to system's UTCSeconds");
assert_type(UTCSecsAfterSet, "number", "type check");
});
+++ /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:
- Cici Li <cici.x.li@intel.com>
- Jenny Cao <jenny.q.cao@intel.com>
- Han, JingX <jingx.han@intel.com>
-
--->
-<html>
-<head>
-<title>Tizen Time API - Time Interface - toLocalTimezone </title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
-<script type="text/javascript" src="support/time_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: Time_TZDate_toLocalTimezone
-//==== LABEL Time_TZDate_toLocalTimezone
-//==== STEP check Time_TZDate_toLocalTimezone
-//==== EXPECT Time_TZDate_toLocalTimezone pass
-//==== SPEC Tizen Web API:System:Time:TZDate:toLocalTimezone M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/time.html
-//==== TEST_CRITERIA MNA MR
-test(function () {
- var tz = tizen.time.getCurrentDateTime(), tzToL;
- tzToL = tz.toLocalTimezone();
- assert_equals(tz.toString(), tzToL.toString(), "toLocalTimezone check");
- assert_type(tz, "object", "check object");
-});
-
-</script>
-</body>
-</html>
-