-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetChangeCallback_onchange</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetChangeCallback_onchange
-//==== LABEL Check if onchange() is called with valid argument
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetChangeCallback:onchange M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 120
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 120000});
-
-var t = async_test(document.title, {timeout: 120000}), widgetChangeCb, id, myWidget, watchId;
-
-t.step(function () {
- add_result_callback(function () {
- try {
- myWidget.removeStateChangeListener(watchId);
- } catch (err) {
- }
- });
-
- widgetChangeCb = t.step_func(function (instance, event) {
- assert_not_equals(instance, null, "instance should not be null");
- assert_not_equals(instance, undefined, "instance should not be undefined");
- assert_type(instance, "object", "instance isn't an object");
- assert_own_property(instance, "widget", "instance doesn't have widget property");
- assert_own_property(instance, "id", "instance doesn't have id property");
- assert_not_equals(event, null, "event should not be null");
- assert_not_equals(event, undefined, "event should not be undefined");
- assert_type(event, "string", "event isn't an string");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- watchId = myWidget.addStateChangeListener(widgetChangeCb);
- alert("Go to home screen to delete the added widget before press [OK] button");
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetChangeCallback_onchange</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetChangeCallback_onchange\r
+//==== LABEL Check if onchange() is called with valid argument\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetChangeCallback:onchange M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 120\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 120000});\r
+\r
+var t = async_test(document.title, {timeout: 120000}), widgetChangeCb, id, myWidget, watchId;\r
+\r
+t.step(function () {\r
+ add_result_callback(function () {\r
+ try {\r
+ myWidget.removeStateChangeListener(watchId);\r
+ } catch (err) {\r
+ }\r
+ });\r
+\r
+ widgetChangeCb = t.step_func(function (instance, event) {\r
+ assert_not_equals(instance, null, "instance should not be null");\r
+ assert_not_equals(instance, undefined, "instance should not be undefined");\r
+ assert_type(instance, "object", "instance isn't an object");\r
+ assert_own_property(instance, "widget", "instance doesn't have widget property");\r
+ assert_own_property(instance, "id", "instance doesn't have id property");\r
+ assert_not_equals(event, null, "event should not be null");\r
+ assert_not_equals(event, undefined, "event should not be undefined");\r
+ assert_type(event, "string", "event isn't an string");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ watchId = myWidget.addStateChangeListener(widgetChangeCb);\r
+ alert("Go to home screen to delete the added widget before press [OK] button");\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetContentCallback_onsuccess</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetContentCallback_onsuccess
-//==== LABEL Check if onsuccess() is called with valid argument
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetContentCallback:onsuccess M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,
- contentSuccessCb, contentErrorCb;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- contentErrorCb = t.step_func(function (error) {
- assert_unreached("getContent() errorCallback invoked: " + error.name + " msg: " + error.message);
- });
-
- contentSuccessCb = t.step_func(function (data) {
- assert_not_equals(data, null, "data should not be null");
- assert_not_equals(data, undefined, "data should not be undefined");
- assert_type(data, "object", "data isn't an object");
- t.done();
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- wdInstance.getContent(contentSuccessCb, contentErrorCb);
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetContentCallback_onsuccess</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetContentCallback_onsuccess\r
+//==== LABEL Check if onsuccess() is called with valid argument\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetContentCallback:onsuccess M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,\r
+ contentSuccessCb, contentErrorCb;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ contentErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getContent() errorCallback invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ contentSuccessCb = t.step_func(function (data) {\r
+ assert_not_equals(data, null, "data should not be null");\r
+ assert_not_equals(data, undefined, "data should not be undefined");\r
+ assert_type(data, "object", "data isn't an object");\r
+ t.done();\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ wdInstance.getContent(contentSuccessCb, contentErrorCb);\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_changeUpdatePeriod</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_changeUpdatePeriod
-//==== LABEL Check if WidgetInstance::changeUpdatePeriod method works correctly
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:changeUpdatePeriod M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA MR
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance, retVal = null;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- retVal = wdInstance.changeUpdatePeriod(10);
- assert_equals(retVal, undefined, "changeUpdatePeriod() should return undefined.");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_changeUpdatePeriod</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_changeUpdatePeriod\r
+//==== LABEL Check if WidgetInstance::changeUpdatePeriod method works correctly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:changeUpdatePeriod M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA MR\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance, retVal = null;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ retVal = wdInstance.changeUpdatePeriod(10);\r
+ assert_equals(retVal, undefined, "changeUpdatePeriod() should return undefined.");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_changeUpdatePeriod_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_changeUpdatePeriod_exist
-//==== LABEL Check if WidgetInstance::changeUpdatePeriod method exists
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:changeUpdatePeriod M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA ME
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- check_method_exists(wdInstance, "changeUpdatePeriod");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_changeUpdatePeriod_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_changeUpdatePeriod_exist\r
+//==== LABEL Check if WidgetInstance::changeUpdatePeriod method exists\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:changeUpdatePeriod M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ check_method_exists(wdInstance, "changeUpdatePeriod");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_changeUpdatePeriod_seconds_invalid</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_changeUpdatePeriod_seconds_invalid
-//==== LABEL Check if changeUpdatePeriod method throws InvalidValuesError when seconds is invalid
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:changeUpdatePeriod M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA MC
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- assert_throws(INVALID_VALUES_EXCEPTION, function () {
- wdInstance.changeUpdatePeriod(0);
- }, "InvalidValuesError should be thrown with error seconds");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_changeUpdatePeriod_seconds_invalid</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_changeUpdatePeriod_seconds_invalid\r
+//==== LABEL Check if changeUpdatePeriod method throws InvalidValuesError when seconds is invalid\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:changeUpdatePeriod M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ assert_throws(INVALID_VALUES_EXCEPTION, function () {\r
+ wdInstance.changeUpdatePeriod(0);\r
+ }, "InvalidValuesError should be thrown with error seconds");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
--->
-
-<html>
-<head>
-<title>WidgetInstance_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_extend
-//==== LABEL Check if WidgetInstance object is extendable
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:WidgetInstance U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA OBX
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- check_extensibility(wdInstance);
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>WidgetInstance_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_extend\r
+//==== LABEL Check if WidgetInstance object is extendable\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:WidgetInstance U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA OBX\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ check_extensibility(wdInstance);\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_getContent</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_getContent
-//==== LABEL Check if WidgetInstance::getContent method works correctly
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:getContent M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA MR
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,
- contentSuccessCb, contentErrorCb, retVal = null;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- contentErrorCb = t.step_func(function (error) {
- assert_unreached("getContent() errorCallback invoked: " + error.name + " msg: " + error.message);
- });
-
- contentSuccessCb = t.step_func(function () {
- assert_equals(retVal, undefined, "getContent() should return undefined.");
- t.done();
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- retVal = wdInstance.getContent(contentSuccessCb, contentErrorCb);
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_getContent</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_getContent\r
+//==== LABEL Check if WidgetInstance::getContent method works correctly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:getContent M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA MR\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,\r
+ contentSuccessCb, contentErrorCb, retVal = null;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ contentErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getContent() errorCallback invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ contentSuccessCb = t.step_func(function () {\r
+ assert_equals(retVal, undefined, "getContent() should return undefined.");\r
+ t.done();\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ retVal = wdInstance.getContent(contentSuccessCb, contentErrorCb);\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_getContent_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_getContent_errorCallback_TypeMismatch
-//==== LABEL Check if WidgetInstance:getContent with incorrect errorCallback argument throws an exception
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:getContent M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA MC
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,
- contentSuccessCb, i, conversionTable;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- contentSuccessCb = t.step_func(function () {
- assert_unreached("getContent() successCallback should not be invoked");
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- conversionTable = getTypeConversionExceptions("functionObject", false);
- for (i = 0; i < conversionTable.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- wdInstance.getContent(contentSuccessCb, conversionTable[i][0]);
- }, "TypeMismatchError exception should be thrown");
- }
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_getContent_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_getContent_errorCallback_TypeMismatch\r
+//==== LABEL Check if WidgetInstance:getContent with incorrect errorCallback argument throws an exception\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:getContent M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,\r
+ contentSuccessCb, i, conversionTable;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ contentSuccessCb = t.step_func(function () {\r
+ assert_unreached("getContent() successCallback should not be invoked");\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ wdInstance.getContent(contentSuccessCb, conversionTable[i][0]);\r
+ }, "TypeMismatchError exception should be thrown");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_getContent_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_getContent_errorCallback_invalid_cb
-//==== LABEL Check if WidgetInstance:getContent throws exception when errorCallback is invalid
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:getContent M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,
- contentSuccessCb, invalidCallback;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- invalidCallback = {
- onerror: t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + " msg: " + error.message);
- })
- };
-
- contentSuccessCb = t.step_func(function () {
- assert_unreached("getContent() successCallback should not be invoked");
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- wdInstance.getContent(contentSuccessCb, invalidCallback);
- }, "Exception should be thrown when given incorrect errorCallback");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_getContent_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_getContent_errorCallback_invalid_cb\r
+//==== LABEL Check if WidgetInstance:getContent throws exception when errorCallback is invalid\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:getContent M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,\r
+ contentSuccessCb, invalidCallback;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ invalidCallback = {\r
+ onerror: t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + " msg: " + error.message);\r
+ })\r
+ };\r
+\r
+ contentSuccessCb = t.step_func(function () {\r
+ assert_unreached("getContent() successCallback should not be invoked");\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ wdInstance.getContent(contentSuccessCb, invalidCallback);\r
+ }, "Exception should be thrown when given incorrect errorCallback");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_getContent_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_getContent_exist
-//==== LABEL Check if WidgetInstance::getContent method exists
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:getContent M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA ME
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- check_method_exists(wdInstance, "getContent");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_getContent_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_getContent_exist\r
+//==== LABEL Check if WidgetInstance::getContent method exists\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:getContent M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ check_method_exists(wdInstance, "getContent");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_getContent_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_getContent_misarg
-//==== LABEL Check if WidgetInstance::getContent throws exception when mandatory params are missing
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:getContent M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- wdInstance.getContent();
- }, "exception should be thrown when mandatory params are missing");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_getContent_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_getContent_misarg\r
+//==== LABEL Check if WidgetInstance::getContent throws exception when mandatory params are missing\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:getContent M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ wdInstance.getContent();\r
+ }, "exception should be thrown when mandatory params are missing");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_getContent_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_getContent_successCallback_TypeMismatch
-//==== LABEL Check if WidgetInstance:getContent with incorrect successCallback argument throws an exception
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:getContent M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA MC
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,
- contentErrorCb, i, conversionTable;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- contentErrorCb = t.step_func(function () {
- assert_unreached("getContent() errorCallback should not be invoked");
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- conversionTable = getTypeConversionExceptions("functionObject", false);
- for (i = 0; i < conversionTable.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- wdInstance.getContent(conversionTable[i][0], contentErrorCb);
- }, "TypeMismatchError exception should be thrown");
- }
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_getContent_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_getContent_successCallback_TypeMismatch\r
+//==== LABEL Check if WidgetInstance:getContent with incorrect successCallback argument throws an exception\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:getContent M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,\r
+ contentErrorCb, i, conversionTable;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ contentErrorCb = t.step_func(function () {\r
+ assert_unreached("getContent() errorCallback should not be invoked");\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ wdInstance.getContent(conversionTable[i][0], contentErrorCb);\r
+ }, "TypeMismatchError exception should be thrown");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_getContent_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_getContent_successCallback_invalid_cb
-//==== LABEL Check if WidgetInstance:getContent throws exception when successCallback is invalid
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:getContent M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,
- contentErrorCb, invalidCallback;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- invalidCallback = {
- onsuccess: t.step_func(function () {
- assert_unreached("Invalid successCallback should not be invoked");
- })
- };
-
- contentErrorCb = t.step_func(function () {
- assert_unreached("getContent() errorCallback should not be invoked");
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- wdInstance.getContent(invalidCallback, contentErrorCb);
- }, "Exception should be thrown when given incorrect successCallback");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_getContent_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_getContent_successCallback_invalid_cb\r
+//==== LABEL Check if WidgetInstance:getContent throws exception when successCallback is invalid\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:getContent M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,\r
+ contentErrorCb, invalidCallback;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ invalidCallback = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Invalid successCallback should not be invoked");\r
+ })\r
+ };\r
+\r
+ contentErrorCb = t.step_func(function () {\r
+ assert_unreached("getContent() errorCallback should not be invoked");\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ wdInstance.getContent(invalidCallback, contentErrorCb);\r
+ }, "Exception should be thrown when given incorrect successCallback");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_id_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_id_attribute
-//==== LABEL Check if attribute id of WidgetInstance exists, has type string and is readonly
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:id A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- check_readonly(wdInstance, "id", wdInstance.id, "string", wdInstance.id + "5");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_id_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_id_attribute\r
+//==== LABEL Check if attribute id of WidgetInstance exists, has type string and is readonly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:id A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ check_readonly(wdInstance, "id", wdInstance.id, "string", wdInstance.id + "5");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_sendContent</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_sendContent
-//==== LABEL Check if WidgetInstance::sendContent method works correctly
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:sendContent M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA MR
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,
- retVal = null, data;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- retVal = wdInstance.sendContent(data, true);
- assert_equals(retVal, undefined, "sendContent() should return undefined.");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- data = {
- data1 : 'test1',
- data2 : 'test2'
- };
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_sendContent</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_sendContent\r
+//==== LABEL Check if WidgetInstance::sendContent method works correctly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:sendContent M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA MR\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,\r
+ retVal = null, data;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ retVal = wdInstance.sendContent(data, true);\r
+ assert_equals(retVal, undefined, "sendContent() should return undefined.");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ data = {\r
+ data1 : 'test1',\r
+ data2 : 'test2'\r
+ };\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_sendContent_data_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_sendContent_data_TypeMismatch
-//==== LABEL Check if WidgetInstance:sendContent with incorrect data argument throws an exception
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:sendContent M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA MC
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,
- i, conversionTable;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- conversionTable = getTypeConversionExceptions("object", false);
- for (i = 0; i < conversionTable.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- wdInstance.sendContent(conversionTable[i][0]);
- }, "TypeMismatchError exception should be thrown");
- }
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_sendContent_data_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_sendContent_data_TypeMismatch\r
+//==== LABEL Check if WidgetInstance:sendContent with incorrect data argument throws an exception\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:sendContent M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance,\r
+ i, conversionTable;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ conversionTable = getTypeConversionExceptions("object", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ wdInstance.sendContent(conversionTable[i][0]);\r
+ }, "TypeMismatchError exception should be thrown");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_sendContent_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_sendContent_exist
-//==== LABEL Check if WidgetInstance::sendContent method exists
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:sendContent M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA ME
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- check_method_exists(wdInstance, "sendContent");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_sendContent_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_sendContent_exist\r
+//==== LABEL Check if WidgetInstance::sendContent method exists\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:sendContent M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ check_method_exists(wdInstance, "sendContent");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_sendContent_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_sendContent_misarg
-//==== LABEL Check if WidgetInstance::sendContent throws exception when mandatory params are missing
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:sendContent M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- wdInstance.sendContent();
- }, "exception should be thrown when mandatory params are missing");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_sendContent_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_sendContent_misarg\r
+//==== LABEL Check if WidgetInstance::sendContent throws exception when mandatory params are missing\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:sendContent M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ wdInstance.sendContent();\r
+ }, "exception should be thrown when mandatory params are missing");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-<html>
-<head>
-<title>WidgetInstance_widget_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstance_widget_attribute
-//==== LABEL Check if attribute widget of WidgetInstance exists, has type object and is readonly
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:widget A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- wdInstance = instances[0];
- assert_own_property(wdInstance, "widget", "wdInstance does not own widget property.");
- assert_type(wdInstance.widget, "object", "widget should be an object");
- wdInstance.widget = null;
- assert_not_equals(wdInstance.widget, null, "widget should not be modified");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>WidgetInstance_widget_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstance_widget_attribute\r
+//==== LABEL Check if attribute widget of WidgetInstance exists, has type object and is readonly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstance:widget A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, wdInstance;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("getInstances() errorCallback is invoked: " + error.name + " msg: " + error.msg);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ wdInstance = instances[0];\r
+ assert_own_property(wdInstance, "widget", "wdInstance does not own widget property.");\r
+ assert_type(wdInstance.widget, "object", "widget should be an object");\r
+ wdInstance.widget = null;\r
+ assert_not_equals(wdInstance.widget, null, "widget should not be modified");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>WidgetInstancesCallback_onsuccess</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetInstancesCallback_onsuccess
-//==== LABEL Test whether WidgetInstancesCallback:onsuccess is called with argument of proper type
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstancesCallback:onsuccess M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("Error occured: " + error.name + ": " + error.message);
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- assert_type(instances, "array", "instances is not an arry");
- assert_type(instances[0], "object", "WidgetInstance instance is not an object");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>WidgetInstancesCallback_onsuccess</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetInstancesCallback_onsuccess\r
+//==== LABEL Test whether WidgetInstancesCallback:onsuccess is called with argument of proper type\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetInstancesCallback:onsuccess M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("Error occured: " + error.name + ": " + error.message);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ assert_type(instances, "array", "instances is not an arry");\r
+ assert_type(instances[0], "object", "WidgetInstance instance is not an object");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>WidgetServiceManager_getWidget</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetServiceManager_getWidget
-//==== LABEL Check if WidgetServiceManager::getWidget method works correctly
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetServiceManager:getWidget M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA MR
-
-test(function () {
- var id, myWidget;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- assert_type(myWidget, "object", "widget should be an object");
- assert_equals(myWidget.id, id, "widget id should be equal to id.");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>WidgetServiceManager_getWidget</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetServiceManager_getWidget\r
+//==== LABEL Check if WidgetServiceManager::getWidget method works correctly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetServiceManager:getWidget M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MR\r
+\r
+test(function () {\r
+ var id, myWidget;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ assert_type(myWidget, "object", "widget should be an object");\r
+ assert_equals(myWidget.id, id, "widget id should be equal to id.");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>WidgetVariant_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetVariant_extend
-//==== LABEL Check if WidgetVariant object is extendable
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:WidgetVariant U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== TEST_CRITERIA OBX
-
-test(function () {
- var id, myWidget, wdVariant;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- wdVariant = myWidget.getVariant("4x4");
- check_extensibility(wdVariant);
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>WidgetVariant_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetVariant_extend\r
+//==== LABEL Check if WidgetVariant object is extendable\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:WidgetVariant U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA OBX\r
+\r
+test(function () {\r
+ var id, myWidget, wdVariant;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ wdVariant = myWidget.getVariant("4x4");\r
+ check_extensibility(wdVariant);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>WidgetVariant_height_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetVariant_height_attribute
-//==== LABEL Check if attribute height of WidgetVariant exists, has type long and is readonly
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:height A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ARO
-
-test(function () {
- var id, myWidget, wdVariant;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- wdVariant = myWidget.getVariant("4x4");
- check_readonly(wdVariant, "height", wdVariant.height, "long", wdVariant.height + 5);
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>WidgetVariant_height_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetVariant_height_attribute\r
+//==== LABEL Check if attribute height of WidgetVariant exists, has type long and is readonly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:height A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+test(function () {\r
+ var id, myWidget, wdVariant;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ wdVariant = myWidget.getVariant("4x4");\r
+ check_readonly(wdVariant, "height", wdVariant.height, "long", wdVariant.height + 5);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>WidgetVariant_needsFrame_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetVariant_needsFrame_attribute
-//==== LABEL Check if attribute needsFrame of WidgetVariant exists, has type boolean and is readonly
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:needsFrame A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ARO
-
-test(function () {
- var id, myWidget, wdVariant;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- wdVariant = myWidget.getVariant("4x4");
- check_readonly(wdVariant, "needsFrame", wdVariant.needsFrame, "boolean", !wdVariant.needsFrame);
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>WidgetVariant_needsFrame_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetVariant_needsFrame_attribute\r
+//==== LABEL Check if attribute needsFrame of WidgetVariant exists, has type boolean and is readonly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:needsFrame A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+test(function () {\r
+ var id, myWidget, wdVariant;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ wdVariant = myWidget.getVariant("4x4");\r
+ check_readonly(wdVariant, "needsFrame", wdVariant.needsFrame, "boolean", !wdVariant.needsFrame);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>WidgetVariant_needsMouseEvents_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetVariant_needsMouseEvents_attribute
-//==== LABEL Check if attribute needsMouseEvents of WidgetVariant exists, has type boolean and is readonly
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:needsMouseEvents A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ARO
-
-test(function () {
- var id, myWidget, wdVariant;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- wdVariant = myWidget.getVariant("4x4");
- check_readonly(wdVariant, "needsMouseEvents", wdVariant.needsMouseEvents, "boolean", !wdVariant.needsMouseEvents);
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>WidgetVariant_needsMouseEvents_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetVariant_needsMouseEvents_attribute\r
+//==== LABEL Check if attribute needsMouseEvents of WidgetVariant exists, has type boolean and is readonly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:needsMouseEvents A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+test(function () {\r
+ var id, myWidget, wdVariant;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ wdVariant = myWidget.getVariant("4x4");\r
+ check_readonly(wdVariant, "needsMouseEvents", wdVariant.needsMouseEvents, "boolean", !wdVariant.needsMouseEvents);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>WidgetVariant_needsTouchEffect_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetVariant_needsTouchEffect_attribute
-//==== LABEL Check if attribute needsTouchEffect of WidgetVariant exists, has type boolean and is readonly
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:needsTouchEffect A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ARO
-
-test(function () {
- var id, myWidget, wdVariant;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- wdVariant = myWidget.getVariant("4x4");
- check_readonly(wdVariant, "needsTouchEffect", wdVariant.needsTouchEffect, "boolean", !wdVariant.needsTouchEffect);
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>WidgetVariant_needsTouchEffect_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetVariant_needsTouchEffect_attribute\r
+//==== LABEL Check if attribute needsTouchEffect of WidgetVariant exists, has type boolean and is readonly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:needsTouchEffect A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+test(function () {\r
+ var id, myWidget, wdVariant;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ wdVariant = myWidget.getVariant("4x4");\r
+ check_readonly(wdVariant, "needsTouchEffect", wdVariant.needsTouchEffect, "boolean", !wdVariant.needsTouchEffect);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>WidgetVariant_previewImagePath_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetVariant_previewImagePath_attribute
-//==== LABEL Check if attribute previewImagePath of WidgetVariant exists, has type DOMString and is readonly
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:previewImagePath A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ARO
-
-test(function () {
- var id, myWidget, wdVariant;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- wdVariant = myWidget.getVariant("4x4");
- check_readonly(wdVariant, "previewImagePath", wdVariant.previewImagePath, "string", wdVariant.previewImagePath + "test");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>WidgetVariant_previewImagePath_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetVariant_previewImagePath_attribute\r
+//==== LABEL Check if attribute previewImagePath of WidgetVariant exists, has type DOMString and is readonly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:previewImagePath A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+test(function () {\r
+ var id, myWidget, wdVariant;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ wdVariant = myWidget.getVariant("4x4");\r
+ check_readonly(wdVariant, "previewImagePath", wdVariant.previewImagePath, "string", wdVariant.previewImagePath + "test");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>WidgetVariant_sizeType_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetVariant_sizeType_attribute
-//==== LABEL Check if attribute sizeType of WidgetVariant exists, has type DOMString and is readonly
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:sizeType A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ARO AVL
-
-test(function () {
- var id, myWidget, wdVariant, sizeTypeRange;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- wdVariant = myWidget.getVariant("4x4");
- check_readonly(wdVariant, "sizeType", wdVariant.sizeType, "string", "5x6");
-
- sizeTypeRange = ["1x1", "2x1", "2x2", "4x1", "4x2", "4x3", "4x4", "4x5", "4x6", "EASY_1x1", "EASY_3x1", "EASY_3x3", "FULL"];
- assert_in_array(wdVariant.sizeType, sizeTypeRange, "invalid WidgetSizeType");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>WidgetVariant_sizeType_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetVariant_sizeType_attribute\r
+//==== LABEL Check if attribute sizeType of WidgetVariant exists, has type DOMString and is readonly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:sizeType A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO AVL\r
+\r
+test(function () {\r
+ var id, myWidget, wdVariant, sizeTypeRange;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ wdVariant = myWidget.getVariant("4x4");\r
+ check_readonly(wdVariant, "sizeType", wdVariant.sizeType, "string", "5x6");\r
+\r
+ sizeTypeRange = ["1x1", "2x1", "2x2", "4x1", "4x2", "4x3", "4x4", "4x5", "4x6", "EASY_1x1", "EASY_3x1", "EASY_3x3", "FULL"];\r
+ assert_in_array(wdVariant.sizeType, sizeTypeRange, "invalid WidgetSizeType");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>WidgetVariant_width_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetVariant_width_attribute
-//==== LABEL Check if attribute width of WidgetVariant exists, has type long and is readonly
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:width A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ARO
-
-test(function () {
- var id, myWidget, wdVariant;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- wdVariant = myWidget.getVariant("4x4");
- check_readonly(wdVariant, "width", wdVariant.width, "long", wdVariant.width + 5);
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>WidgetVariant_width_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetVariant_width_attribute\r
+//==== LABEL Check if attribute width of WidgetVariant exists, has type long and is readonly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariant:width A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+test(function () {\r
+ var id, myWidget, wdVariant;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ wdVariant = myWidget.getVariant("4x4");\r
+ check_readonly(wdVariant, "width", wdVariant.width, "long", wdVariant.width + 5);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>WidgetVariantsCallback_onsuccess</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: WidgetVariantsCallback_onsuccess
-//==== LABEL Test whether WidgetVariantsCallback:onsuccess is called with argument of proper type
-//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariantsCallback:onsuccess M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, id, myWidget;
-
-t.step(function () {
- widgetSuccessCb = t.step_func(function (instances) {
- assert_type(instances, "array", "instances is not an arry");
- assert_type(instances[0], "object", "WidgetVariant instance is not an object");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getVariants(widgetSuccessCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>WidgetVariantsCallback_onsuccess</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: WidgetVariantsCallback_onsuccess\r
+//==== LABEL Test whether WidgetVariantsCallback:onsuccess is called with argument of proper type\r
+//==== SPEC Tizen Web API:TBD:WidgetService:WidgetVariantsCallback:onsuccess M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, id, myWidget;\r
+\r
+t.step(function () {\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ assert_type(instances, "array", "instances is not an arry");\r
+ assert_type(instances[0], "object", "WidgetVariant instance is not an object");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getVariants(widgetSuccessCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-
-<html>
-<head>
-<title>Widget_addStateChangeListener</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_addStateChangeListener
-//==== LABEL Check if Widget::addStateChangeListener method works correctly
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:addStateChangeListener M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 120
-//==== TEST_CRITERIA MR
-
-setup({timeout: 120000});
-
-var t = async_test(document.title, {timeout: 120000}), widgetChangeCb, id, myWidget, watchId;
-
-t.step(function () {
- add_result_callback(function () {
- try {
- myWidget.removeStateChangeListener(watchId);
- } catch (err) {
- }
- });
-
- widgetChangeCb = t.step_func(function () {
- assert_type(watchId, "long", "The type of return value should be Long.");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- watchId = myWidget.addStateChangeListener(widgetChangeCb);
- alert("Go to home screen to delete the added widget before press [OK] button");
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_addStateChangeListener</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_addStateChangeListener\r
+//==== LABEL Check if Widget::addStateChangeListener method works correctly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:addStateChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 120\r
+//==== TEST_CRITERIA MR\r
+\r
+setup({timeout: 120000});\r
+\r
+var t = async_test(document.title, {timeout: 120000}), widgetChangeCb, id, myWidget, watchId;\r
+\r
+t.step(function () {\r
+ add_result_callback(function () {\r
+ try {\r
+ myWidget.removeStateChangeListener(watchId);\r
+ } catch (err) {\r
+ }\r
+ });\r
+\r
+ widgetChangeCb = t.step_func(function () {\r
+ assert_type(watchId, "long", "The type of return value should be Long.");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ watchId = myWidget.addStateChangeListener(widgetChangeCb);\r
+ alert("Go to home screen to delete the added widget before press [OK] button");\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-
-<html>
-<head>
-<title>Widget_addStateChangeListener_callback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_addStateChangeListener_callback_TypeMismatch
-//==== LABEL Check if addStateChangeListener() with incorrect callback argument throws an exception
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:addStateChangeListener M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MC
-
-test(function () {
- var callback, i, conversionTable, exceptionName, id, myWidget;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- conversionTable = getTypeConversionExceptions("functionObject", false);
- for (i = 0; i < conversionTable.length; i++) {
- callback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName}, function () {
- myWidget.addStateChangeListener(callback);
- }, "Given incorrect callback.");
- }
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_addStateChangeListener_callback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_addStateChangeListener_callback_TypeMismatch\r
+//==== LABEL Check if addStateChangeListener() with incorrect callback argument throws an exception\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:addStateChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+test(function () {\r
+ var callback, i, conversionTable, exceptionName, id, myWidget;\r
+ console.log(ARCH);\r
+ console.log(ARMV8);\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ callback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({name: exceptionName}, function () {\r
+ myWidget.addStateChangeListener(callback);\r
+ }, "Given incorrect callback.");\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-
-<html>
-<head>
-<title>Widget_addStateChangeListener_callback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_addStateChangeListener_callback_invalid_cb
-//==== LABEL Check if addStateChangeListener() throws exception when callback has non callable attribute
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:addStateChangeListener M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MTL
-
-test(function () {
- var callback, i, incorrectListener, exceptionName, id, myWidget;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- incorrectListener = getListenerConversionExceptions(["onchange"]);
- for(i = 0; i < incorrectListener.length; i++) {
- callback = incorrectListener[i][0];
- exceptionName = incorrectListener[i][1];
-
- assert_throws({name: exceptionName}, function () {
- myWidget.addStateChangeListener(callback);
- }, exceptionName + " should be thrown - given incorrect callback.");
- }
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_addStateChangeListener_callback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_addStateChangeListener_callback_invalid_cb\r
+//==== LABEL Check if addStateChangeListener() throws exception when callback has non callable attribute\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:addStateChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTL\r
+\r
+test(function () {\r
+ var callback, i, incorrectListener, exceptionName, id, myWidget;\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ incorrectListener = getListenerConversionExceptions(["onchange"]);\r
+ for(i = 0; i < incorrectListener.length; i++) {\r
+ callback = incorrectListener[i][0];\r
+ exceptionName = incorrectListener[i][1];\r
+\r
+ assert_throws({name: exceptionName}, function () {\r
+ myWidget.addStateChangeListener(callback);\r
+ }, exceptionName + " should be thrown - given incorrect callback.");\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-
-<html>
-<head>
-<title>Widget_addStateChangeListener_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_addStateChangeListener_exist
-//==== LABEL Check if Widget::addStateChangeListener method exists
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:addStateChangeListener M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== TEST_CRITERIA ME
-
-test(function () {
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- var id = "apiwidserv.widgetarm", myWidget;
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- var id = "apiwidserv.widgetx86", myWidget;
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- check_method_exists(myWidget, "addStateChangeListener");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_addStateChangeListener_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_addStateChangeListener_exist\r
+//==== LABEL Check if Widget::addStateChangeListener method exists\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:addStateChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+ if(ARMV7 || ARMV8){\r
+ var id = "apiwidserv.widgetarm", myWidget;\r
+ }\r
+ else if(X86){\r
+ var id = "apiwidserv.widgetx86", myWidget;\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ check_method_exists(myWidget, "addStateChangeListener");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-
-<html>
-<head>
-<title>Widget_addStateChangeListener_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_addStateChangeListener_misarg
-//==== LABEL Check if Widget::addStateChangeListener throws exception when mandatory params are missing
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:addStateChangeListener M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MMA
-
-test(function () {
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- var id = "apiwidserv.widgetarm", myWidget;
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- var id = "apiwidserv.widgetx86", myWidget;
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- myWidget.addStateChangeListener();
- }, "exception should be thrown when mandatory params are missing");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_addStateChangeListener_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_addStateChangeListener_misarg\r
+//==== LABEL Check if Widget::addStateChangeListener throws exception when mandatory params are missing\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:addStateChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MMA\r
+\r
+test(function () {\r
+ if(ARMV7 || ARMV8){\r
+ var id = "apiwidserv.widgetarm", myWidget;\r
+ }\r
+ else if(X86){\r
+ var id = "apiwidserv.widgetx86", myWidget;\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ myWidget.addStateChangeListener();\r
+ }, "exception should be thrown when mandatory params are missing");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_applicationId_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_applicationId_attribute
-//==== LABEL Check if attribute applicationId of Widget exists, has type DOMString and is readonly
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:applicationId A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ARO
-
-test(function () {
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- var id = "apiwidserv.widgetarm", myWidget;
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- var id = "apiwidserv.widgetx86", myWidget;
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- check_readonly(myWidget, "applicationId", myWidget.applicationId, "string", "org.tizen.contacts");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_applicationId_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_applicationId_attribute\r
+//==== LABEL Check if attribute applicationId of Widget exists, has type DOMString and is readonly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:applicationId A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+test(function () {\r
+ if(ARMV7 || ARMV8){\r
+ var id = "apiwidserv.widgetarm", myWidget;\r
+ }\r
+ else if(X86){\r
+ var id = "apiwidserv.widgetx86", myWidget;\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ check_readonly(myWidget, "applicationId", myWidget.applicationId, "string", "org.tizen.contacts");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_extend
-//==== LABEL Check if Widget object is extendable
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:Widget U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== TEST_CRITERIA OBX
-
-test(function () {
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- var id = "apiwidserv.widgetarm", myWidget;
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- var id = "apiwidserv.widgetx86", myWidget;
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- check_extensibility(myWidget);
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_extend\r
+//==== LABEL Check if Widget object is extendable\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:Widget U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA OBX\r
+\r
+test(function () {\r
+ if(ARMV7 || ARMV8){\r
+ var id = "apiwidserv.widgetarm", myWidget;\r
+ }\r
+ else if(X86){\r
+ var id = "apiwidserv.widgetx86", myWidget;\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ check_extensibility(myWidget);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getInstances</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getInstances
-//==== LABEL Check if Widget::getInstances method works correctly
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA MR MMINA
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, id, myWidget, retVal;
-
-t.step(function () {
- widgetSuccessCb = t.step_func(function (instances) {
- assert_equals(retVal, undefined, "getInstances() should return undefined.");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- retVal = myWidget.getInstances(widgetSuccessCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getInstances</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getInstances\r
+//==== LABEL Check if Widget::getInstances method works correctly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA MR MMINA\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, id, myWidget, retVal;\r
+\r
+t.step(function () {\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ assert_equals(retVal, undefined, "getInstances() should return undefined.");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ retVal = myWidget.getInstances(widgetSuccessCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getInstances_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getInstances_errorCallback_TypeMismatch
-//==== LABEL Check if Widget:getInstances with incorrect errorCallback argument throws an exception
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MC
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), i, conversionTable, widgetSuccessCb, id, myWidget;
-
-t.step(function () {
- widgetSuccessCb = t.step_func(function(instances) {
- assert_unreached("successCallback should not be invoked");
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
-
- conversionTable = getTypeConversionExceptions("functionObject", true);
- for (i = 0; i < conversionTable.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- myWidget.getInstances(widgetSuccessCb, conversionTable[i][0]);
- }, "TypeMismatchError exception should be thrown");
- }
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getInstances_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getInstances_errorCallback_TypeMismatch\r
+//==== LABEL Check if Widget:getInstances with incorrect errorCallback argument throws an exception\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), i, conversionTable, widgetSuccessCb, id, myWidget;\r
+\r
+t.step(function () {\r
+ widgetSuccessCb = t.step_func(function(instances) {\r
+ assert_unreached("successCallback should not be invoked");\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ myWidget.getInstances(widgetSuccessCb, conversionTable[i][0]);\r
+ }, "TypeMismatchError exception should be thrown");\r
+ }\r
+ t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getInstances_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getInstances_errorCallback_invalid_cb
-//==== LABEL Check if WidgetService:getInstances throws exception when errorCallback is invalid
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, invalidCallback, id, myWidget;
-
-t.step(function () {
- invalidCallback = {
- onerror: t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + " msg: " + error.message);
- })
- };
-
- widgetSuccessCb = t.step_func(function (instances) {
- assert_unreached("successCallback should not be invoked");
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
-
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- myWidget.getInstances(widgetSuccessCb, invalidCallback);
- }, "Exception should be thrown when given incorrect errorCallback");
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getInstances_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getInstances_errorCallback_invalid_cb\r
+//==== LABEL Check if WidgetService:getInstances throws exception when errorCallback is invalid\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, invalidCallback, id, myWidget;\r
+\r
+t.step(function () {\r
+ invalidCallback = {\r
+ onerror: t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + " msg: " + error.message);\r
+ })\r
+ };\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ assert_unreached("successCallback should not be invoked");\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ myWidget.getInstances(widgetSuccessCb, invalidCallback);\r
+ }, "Exception should be thrown when given incorrect errorCallback");\r
+ t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getInstances_errorCallback_invoked_NotFoundError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getInstances_errorCallback_invoked_NotFoundError
-//==== LABEL Check if getInstances invokes errorCallback with NotFoundError when no widgets added to the screen
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MERRCB
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_equals(error.name, "NotFoundError", "Incorrect error name.");
- t.done();
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- assert_unreached("successCallback should not be invoked");
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getInstances_errorCallback_invoked_NotFoundError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getInstances_errorCallback_invoked_NotFoundError\r
+//==== LABEL Check if getInstances invokes errorCallback with NotFoundError when no widgets added to the screen\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_equals(error.name, "NotFoundError", "Incorrect error name.");\r
+ t.done();\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ assert_unreached("successCallback should not be invoked");\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getInstances_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getInstances_exist
-//==== LABEL Check if Widget::getInstances method exists
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== TEST_CRITERIA ME
-
-test(function () {
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- var id = "apiwidserv.widgetarm", myWidget;
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- var id = "apiwidserv.widgetx86", myWidget;
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- check_method_exists(myWidget, "getInstances");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getInstances_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getInstances_exist\r
+//==== LABEL Check if Widget::getInstances method exists\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+ if(ARMV7 || ARMV8){\r
+ var id = "apiwidserv.widgetarm", myWidget;\r
+ }\r
+ else if(X86){\r
+ var id = "apiwidserv.widgetx86", myWidget;\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ check_method_exists(myWidget, "getInstances");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getInstances_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getInstances_misarg
-//==== LABEL Check if Widget::getInstances throws exception when mandatory params are missing
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MMA
-
-test(function () {
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- var id = "apiwidserv.widgetarm", myWidget;
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- var id = "apiwidserv.widgetx86", myWidget;
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- myWidget.getInstances();
- }, "exception should be thrown when mandatory params are missing");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getInstances_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getInstances_misarg\r
+//==== LABEL Check if Widget::getInstances throws exception when mandatory params are missing\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MMA\r
+\r
+test(function () {\r
+ if(ARMV7 || ARMV8){\r
+ var id = "apiwidserv.widgetarm", myWidget;\r
+ }\r
+ else if(X86){\r
+ var id = "apiwidserv.widgetx86", myWidget;\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ myWidget.getInstances();\r
+ }, "exception should be thrown when mandatory params are missing");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getInstances_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getInstances_successCallback_TypeMismatch
-//==== LABEL Check if Widget:getInstances with incorrect successCallback argument throws an exception
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MC
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), i, conversionTable, id, myWidget;
-
-t.step(function () {
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
-
- conversionTable = getTypeConversionExceptions("functionObject", false);
- for (i = 0; i < conversionTable.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- myWidget.getInstances(conversionTable[i][0]);
- }, "TypeMismatchError exception should be thrown");
- }
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getInstances_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getInstances_successCallback_TypeMismatch\r
+//==== LABEL Check if Widget:getInstances with incorrect successCallback argument throws an exception\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), i, conversionTable, id, myWidget;\r
+\r
+t.step(function () {\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ myWidget.getInstances(conversionTable[i][0]);\r
+ }, "TypeMismatchError exception should be thrown");\r
+ }\r
+ t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getInstances_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getInstances_successCallback_invalid_cb
-//==== LABEL Check if Widget:getInstances throws exception when successCallback is invalid
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), invalidCallback, id, myWidget;
-
-t.step(function () {
- invalidCallback = {
- onsuccess: t.step_func(function (instances) {
- assert_unreached("Invalid success callback should not be invoked");
- })
- };
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
-
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- myWidget.getInstances(invalidCallback);
- }, "Exception should be thrown when given incorrect successCallback");
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getInstances_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getInstances_successCallback_invalid_cb\r
+//==== LABEL Check if Widget:getInstances throws exception when successCallback is invalid\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), invalidCallback, id, myWidget;\r
+\r
+t.step(function () {\r
+ invalidCallback = {\r
+ onsuccess: t.step_func(function (instances) {\r
+ assert_unreached("Invalid success callback should not be invoked");\r
+ })\r
+ };\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ myWidget.getInstances(invalidCallback);\r
+ }, "Exception should be thrown when given incorrect successCallback");\r
+ t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getInstances_with_errorCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getInstances_with_errorCallback
-//==== LABEL Check if Widget::getInstances method works correctly with errorCallback
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 90
-//==== TEST_CRITERIA MOA MR
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, retVal;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("Error occured: " + error.name + ": " + error.message);
- });
-
- widgetSuccessCb = t.step_func(function (instances) {
- assert_equals(retVal, undefined, "getInstances() should return undefined.");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- retVal = myWidget.getInstances(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getInstances_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getInstances_with_errorCallback\r
+//==== LABEL Check if Widget::getInstances method works correctly with errorCallback\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getInstances M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 90\r
+//==== TEST_CRITERIA MOA MR\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, retVal;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("Error occured: " + error.name + ": " + error.message);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function (instances) {\r
+ assert_equals(retVal, undefined, "getInstances() should return undefined.");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ retVal = myWidget.getInstances(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getName</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getName
-//==== LABEL Check if Widget::getName method works correctly
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getName M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA MR MMINA
-
-test(function () {
- var id, myWidget, retVal;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- retVal = myWidget.getName();
- assert_type(retVal, "string", "getName should return string");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getName</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getName\r
+//==== LABEL Check if Widget::getName method works correctly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getName M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MR MMINA\r
+\r
+test(function () {\r
+ var id, myWidget, retVal;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ retVal = myWidget.getName();\r
+ assert_type(retVal, "string", "getName should return string");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getName_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getName_exist
-//==== LABEL Check if Widget::getName method exists
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getName M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== TEST_CRITERIA ME
-
-test(function () {
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- var id = "apiwidserv.widgetarm", myWidget;
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- var id = "apiwidserv.widgetx86", myWidget;
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- check_method_exists(myWidget, "getName");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getName_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getName_exist\r
+//==== LABEL Check if Widget::getName method exists\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getName M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+ if(ARMV7 || ARMV8){\r
+ var id = "apiwidserv.widgetarm", myWidget;\r
+ }\r
+ else if(X86){\r
+ var id = "apiwidserv.widgetx86", myWidget;\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ check_method_exists(myWidget, "getName");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getName_with_locale</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getName_with_locale
-//==== LABEL Check if Widget::getName method works correctly with locale
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getName M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA MOA MR
-
-test(function () {
- var id, myWidget, retVal;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- retVal = myWidget.getName("en-us");
- assert_type(retVal, "string", "getName should return string");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getName_with_locale</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getName_with_locale\r
+//==== LABEL Check if Widget::getName method works correctly with locale\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getName M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MOA MR\r
+\r
+test(function () {\r
+ var id, myWidget, retVal;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ retVal = myWidget.getName("en-us");\r
+ assert_type(retVal, "string", "getName should return string");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getVariant</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getVariant
-//==== LABEL Check if Widget::getVariant method works correctly
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariant M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA MR
-
-test(function () {
- var id, myWidget, retVal;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- retVal = myWidget.getVariant("4x4");
- assert_type(retVal, "object", "getVariant should return Object");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getVariant</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getVariant\r
+//==== LABEL Check if Widget::getVariant method works correctly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariant M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MR\r
+\r
+test(function () {\r
+ var id, myWidget, retVal;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ retVal = myWidget.getVariant("4x4");\r
+ assert_type(retVal, "object", "getVariant should return Object");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getVariant_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getVariant_exist
-//==== LABEL Check if Widget::getVariant method exists
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariant M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== TEST_CRITERIA ME
-
-test(function () {
- var id, myWidget;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- check_method_exists(myWidget, "getVariant");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getVariant_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getVariant_exist\r
+//==== LABEL Check if Widget::getVariant method exists\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariant M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+ var id, myWidget;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ check_method_exists(myWidget, "getVariant");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_getVariant_sizeType_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getVariant_sizeType_TypeMismatch
-//==== LABEL Check if Widget:getVariant with incorrect sizeType argument throws an exception
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariant M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MC
-
-test(function () {
- var id, myWidget, i, conversionTable;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- conversionTable = getTypeConversionExceptions("enum", false);
- for (i = 0; i < conversionTable.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- myWidget.getVariant(conversionTable[i][0]);
- }, "TypeMismatchError exception should be thrown");
- }
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getVariant_sizeType_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getVariant_sizeType_TypeMismatch\r
+//==== LABEL Check if Widget:getVariant with incorrect sizeType argument throws an exception\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariant M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+test(function () {\r
+ var id, myWidget, i, conversionTable;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ conversionTable = getTypeConversionExceptions("enum", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ myWidget.getVariant(conversionTable[i][0]);\r
+ }, "TypeMismatchError exception should be thrown");\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-
-<html>
-<head>
-<title>Widget_getVariants</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getVariants
-//==== LABEL Check if Widget::getVariants method works correctly
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA MR MMINA
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, id, myWidget, retVal;
-
-t.step(function () {
- widgetSuccessCb = t.step_func(function () {
- assert_equals(retVal, undefined, "getVariants() should return undefined.");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- retVal = myWidget.getVariants(widgetSuccessCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getVariants</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getVariants\r
+//==== LABEL Check if Widget::getVariants method works correctly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MR MMINA\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, id, myWidget, retVal;\r
+\r
+t.step(function () {\r
+ widgetSuccessCb = t.step_func(function () {\r
+ assert_equals(retVal, undefined, "getVariants() should return undefined.");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ retVal = myWidget.getVariants(widgetSuccessCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-
-<html>
-<head>
-<title>Widget_getVariants_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getVariants_errorCallback_TypeMismatch
-//==== LABEL Check if Widget:getVariants with incorrect errorCallback argument throws an exception
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MC
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), i, conversionTable, widgetSuccessCb, id, myWidget;
-
-t.step(function () {
- widgetSuccessCb = t.step_func(function() {
- assert_unreached("successCallback should not be invoked");
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
-
- conversionTable = getTypeConversionExceptions("functionObject", true);
- for (i = 0; i < conversionTable.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- myWidget.getVariants(widgetSuccessCb, conversionTable[i][0]);
- }, "TypeMismatchError exception should be thrown");
- }
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getVariants_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getVariants_errorCallback_TypeMismatch\r
+//==== LABEL Check if Widget:getVariants with incorrect errorCallback argument throws an exception\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), i, conversionTable, widgetSuccessCb, id, myWidget;\r
+\r
+t.step(function () {\r
+ widgetSuccessCb = t.step_func(function() {\r
+ assert_unreached("successCallback should not be invoked");\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ myWidget.getVariants(widgetSuccessCb, conversionTable[i][0]);\r
+ }, "TypeMismatchError exception should be thrown");\r
+ }\r
+ t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-
-<html>
-<head>
-<title>Widget_getVariants_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getVariants_errorCallback_invalid_cb
-//==== LABEL Check if WidgetService:getVariants throws exception when errorCallback is invalid
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, invalidCallback, id, myWidget;
-
-t.step(function () {
- invalidCallback = {
- onerror: t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + " msg: " + error.message);
- })
- };
-
- widgetSuccessCb = t.step_func(function () {
- assert_unreached("successCallback should not be invoked");
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
-
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- myWidget.getVariants(widgetSuccessCb, invalidCallback);
- }, "Exception should be thrown when given incorrect errorCallback");
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getVariants_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getVariants_errorCallback_invalid_cb\r
+//==== LABEL Check if WidgetService:getVariants throws exception when errorCallback is invalid\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, invalidCallback, id, myWidget;\r
+\r
+t.step(function () {\r
+ invalidCallback = {\r
+ onerror: t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + " msg: " + error.message);\r
+ })\r
+ };\r
+\r
+ widgetSuccessCb = t.step_func(function () {\r
+ assert_unreached("successCallback should not be invoked");\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ myWidget.getVariants(widgetSuccessCb, invalidCallback);\r
+ }, "Exception should be thrown when given incorrect errorCallback");\r
+ t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-
-<html>
-<head>
-<title>Widget_getVariants_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getVariants_exist
-//==== LABEL Check if Widget::getVariants method exists
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== TEST_CRITERIA ME
-
-test(function () {
- var id, myWidget;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- check_method_exists(myWidget, "getVariants");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getVariants_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getVariants_exist\r
+//==== LABEL Check if Widget::getVariants method exists\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+ var id, myWidget;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ check_method_exists(myWidget, "getVariants");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-
-<html>
-<head>
-<title>Widget_getVariants_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getVariants_misarg
-//==== LABEL Check if Widget::getVariants throws exception when mandatory params are missing
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MMA
-
-test(function () {
- var id, myWidget;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- myWidget.getVariants();
- }, "exception should be thrown when mandatory params are missing");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getVariants_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getVariants_misarg\r
+//==== LABEL Check if Widget::getVariants throws exception when mandatory params are missing\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MMA\r
+\r
+test(function () {\r
+ var id, myWidget;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ myWidget.getVariants();\r
+ }, "exception should be thrown when mandatory params are missing");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-
-<html>
-<head>
-<title>Widget_getVariants_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getVariants_successCallback_TypeMismatch
-//==== LABEL Check if Widget:getVariants with incorrect successCallback argument throws an exception
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MC
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), i, conversionTable, id, myWidget;
-
-t.step(function () {
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
-
- conversionTable = getTypeConversionExceptions("functionObject", false);
- for (i = 0; i < conversionTable.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- myWidget.getVariants(conversionTable[i][0]);
- }, "TypeMismatchError exception should be thrown");
- }
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getVariants_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getVariants_successCallback_TypeMismatch\r
+//==== LABEL Check if Widget:getVariants with incorrect successCallback argument throws an exception\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), i, conversionTable, id, myWidget;\r
+\r
+t.step(function () {\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ myWidget.getVariants(conversionTable[i][0]);\r
+ }, "TypeMismatchError exception should be thrown");\r
+ }\r
+ t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-
-<html>
-<head>
-<title>Widget_getVariants_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getVariants_successCallback_invalid_cb
-//==== LABEL Check if Widget:getVariants throws exception when successCallback is invalid
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), invalidCallback, id, myWidget;
-
-t.step(function () {
- invalidCallback = {
- onsuccess: t.step_func(function () {
- assert_unreached("Invalid success callback should not be invoked");
- })
- };
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
-
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- myWidget.getVariants(invalidCallback);
- }, "Exception should be thrown when given incorrect successCallback");
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getVariants_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getVariants_successCallback_invalid_cb\r
+//==== LABEL Check if Widget:getVariants throws exception when successCallback is invalid\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), invalidCallback, id, myWidget;\r
+\r
+t.step(function () {\r
+ invalidCallback = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Invalid success callback should not be invoked");\r
+ })\r
+ };\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ myWidget.getVariants(invalidCallback);\r
+ }, "Exception should be thrown when given incorrect successCallback");\r
+ t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Wei Ji <wei.ji@samsung.com>
-
--->
-
-<html>
-<head>
-<title>Widget_getVariants_with_errorCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_getVariants_with_errorCallback
-//==== LABEL Check if Widget::getVariants method works correctly with errorCallback
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA MOA MR
-
-setup({timeout: 90000});
-
-var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, retVal;
-
-t.step(function () {
- widgetErrorCb = t.step_func(function (error) {
- assert_unreached("errorCallback invoked: " + error.code + " msg: " + error.message);
- });
-
- widgetSuccessCb = t.step_func(function () {
- assert_equals(retVal, undefined, "getVariants() should return undefined.");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- retVal = myWidget.getVariants(widgetSuccessCb, widgetErrorCb);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Wei Ji <wei.ji@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_getVariants_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_getVariants_with_errorCallback\r
+//==== LABEL Check if Widget::getVariants method works correctly with errorCallback\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:getVariants M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MOA MR\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}), widgetSuccessCb, widgetErrorCb, id, myWidget, retVal;\r
+\r
+t.step(function () {\r
+ widgetErrorCb = t.step_func(function (error) {\r
+ assert_unreached("errorCallback invoked: " + error.code + " msg: " + error.message);\r
+ });\r
+\r
+ widgetSuccessCb = t.step_func(function () {\r
+ assert_equals(retVal, undefined, "getVariants() should return undefined.");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ retVal = myWidget.getVariants(widgetSuccessCb, widgetErrorCb);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_id_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_id_attribute
-//==== LABEL Check if attribute id of Widget exists, has type DOMString and is readonly
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:id A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ARO
-
-test(function () {
- var id, myWidget;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- check_readonly(myWidget, "id", id, "string", "org.tizen.contacts.widget");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_id_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_id_attribute\r
+//==== LABEL Check if attribute id of Widget exists, has type DOMString and is readonly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:id A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+test(function () {\r
+ var id, myWidget;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ check_readonly(myWidget, "id", id, "string", "org.tizen.contacts.widget");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_noDisplay_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_noDisplay_attribute
-//==== LABEL Check if attribute noDisplay of Widget exists, has type boolean and is readonly
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:noDisplay A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ARO
-
-test(function () {
- var id, myWidget;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- check_readonly(myWidget, "noDisplay", myWidget.noDisplay, "boolean", !myWidget.noDisplay);
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_noDisplay_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_noDisplay_attribute\r
+//==== LABEL Check if attribute noDisplay of Widget exists, has type boolean and is readonly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:noDisplay A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+test(function () {\r
+ var id, myWidget;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ check_readonly(myWidget, "noDisplay", myWidget.noDisplay, "boolean", !myWidget.noDisplay);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_packageId_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_packageId_attribute
-//==== LABEL Check if attribute packageId of Widget exists, has type DOMString and is readonly
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:packageId A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ARO
-
-test(function () {
- var id, myWidget;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- check_readonly(myWidget, "packageId", myWidget.packageId, "string", "org.tizen.contacts");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_packageId_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_packageId_attribute\r
+//==== LABEL Check if attribute packageId of Widget exists, has type DOMString and is readonly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:packageId A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+test(function () {\r
+ var id, myWidget;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ check_readonly(myWidget, "packageId", myWidget.packageId, "string", "org.tizen.contacts");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_removeStateChangeListener</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_removeStateChangeListener
-//==== LABEL Check if Widget::removeStateChangeListener method works correctly
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:removeStateChangeListener M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.
-//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.
-//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.
-//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.
-//==== STEP press [Run] button in the test case.
-//==== EXPECT test case is passed.
-//==== ONLOAD_DELAY 120
-//==== TEST_CRITERIA MR
-
-setup({timeout: 120000});
-
-var t = async_test(document.title, {timeout: 120000}), widgetChangeCb, id, myWidget, watchId, retVal;
-
-t.step(function () {
- add_result_callback(function () {
- try {
- myWidget.removeStateChangeListener(watchId);
- } catch (err) {
- }
- });
-
- widgetChangeCb = t.step_func(function () {
- retVal = myWidget.removeStateChangeListener(watchId);
- assert_equals(retVal, undefined, "removeStateChangeListener() should return undefined.");
- t.done();
- });
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- watchId = myWidget.addStateChangeListener(widgetChangeCb);
- alert("Go to home screen to delete the added widget before press [OK] button");
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_removeStateChangeListener</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_removeStateChangeListener\r
+//==== LABEL Check if Widget::removeStateChangeListener method works correctly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:removeStateChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE 32 bit TARGET : "widgetarm" widget should be added to home screen.\r
+//==== 64 bit TARGET : "widgetaarch64" widget should be added to home screen.\r
+//==== 32 bit EMULATOR : "widgetx86" widget should be added to home screen.\r
+//==== 64 bit EMULATOR : "widgetx86_64" widget should be added to home screen.\r
+//==== STEP press [Run] button in the test case.\r
+//==== EXPECT test case is passed.\r
+//==== ONLOAD_DELAY 120\r
+//==== TEST_CRITERIA MR\r
+\r
+setup({timeout: 120000});\r
+\r
+var t = async_test(document.title, {timeout: 120000}), widgetChangeCb, id, myWidget, watchId, retVal;\r
+\r
+t.step(function () {\r
+ add_result_callback(function () {\r
+ try {\r
+ myWidget.removeStateChangeListener(watchId);\r
+ } catch (err) {\r
+ }\r
+ });\r
+\r
+ widgetChangeCb = t.step_func(function () {\r
+ retVal = myWidget.removeStateChangeListener(watchId);\r
+ assert_equals(retVal, undefined, "removeStateChangeListener() should return undefined.");\r
+ t.done();\r
+ });\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ watchId = myWidget.addStateChangeListener(widgetChangeCb);\r
+ alert("Go to home screen to delete the added widget before press [OK] button");\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_removeStateChangeListener_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_removeStateChangeListener_exist
-//==== LABEL Check if Widget::removeStateChangeListener method exists
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:removeStateChangeListener M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== TEST_CRITERIA ME
-
-test(function () {
- var id, myWidget;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- check_method_exists(myWidget, "removeStateChangeListener");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_removeStateChangeListener_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_removeStateChangeListener_exist\r
+//==== LABEL Check if Widget::removeStateChangeListener method exists\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:removeStateChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+ var id, myWidget;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ check_method_exists(myWidget, "removeStateChangeListener");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-
-<html>
-<head>
-<title>Widget_setupApplicationId_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: Widget_setupApplicationId_attribute
-//==== LABEL Check if attribute setupApplicationId of Widget exists, has type DOMString and is readonly
-//==== SPEC Tizen Web API:TBD:WidgetService:Widget:setupApplicationId A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ARO
-
-test(function () {
- var id, myWidget;
-
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'aarch64'){
- id = "apiwidserv.widgetaarch64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetarm";
- console.log(id);
- }
- }
- else if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86")){
- if(tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch") === 'x86_64'){
- id = "apiwidserv.widgetx86_64";
- console.log(id);
- }else{
- id = "apiwidserv.widgetx86";
- console.log(id);
- }
- }
-
- myWidget = tizen.widgetservice.getWidget(id);
- check_readonly(myWidget, "setupApplicationId", myWidget.setupApplicationId, "string", "org.tizen.contacts");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>Widget_setupApplicationId_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Widget_setupApplicationId_attribute\r
+//==== LABEL Check if attribute setupApplicationId of Widget exists, has type DOMString and is readonly\r
+//==== SPEC Tizen Web API:TBD:WidgetService:Widget:setupApplicationId A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+test(function () {\r
+ var id, myWidget;\r
+\r
+ if(ARMV7 || ARMV8){\r
+ if(ARCH === 'aarch64'){\r
+ id = "apiwidserv.widgetaarch64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetarm";\r
+ console.log(id);\r
+ }\r
+ }\r
+ else if(X86){\r
+ if(ARCH === 'x86_64'){\r
+ id = "apiwidserv.widgetx86_64";\r
+ console.log(id);\r
+ }else{\r
+ id = "apiwidserv.widgetx86";\r
+ console.log(id);\r
+ }\r
+ }\r
+\r
+ myWidget = tizen.widgetservice.getWidget(id);\r
+ check_readonly(myWidget, "setupApplicationId", myWidget.setupApplicationId, "string", "org.tizen.contacts");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-/*
-
-Copyright (c) 2016 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:
-
- */
-
-
-MIN_BYTE = -128;
-MAX_BYTE = 127;
-MIN_OCTET = 0;
-MAX_OCTET = 255;
-MIN_SHORT = -32768;
-MAX_SHORT = 32767;
-MIN_UNSIGNED_SHORT = 0;
-MAX_UNSIGNED_SHORT = 65535;
-MIN_LONG = -2147483648;
-MAX_LONG = 2147483647;
-MIN_UNSIGNED_LONG = 0;
-MAX_UNSIGNED_LONG = 4294967295;
-MIN_LONG_LONG = -9223372036854775808;
-MAX_LONG_LONG = 9223372036854775807;
-MIN_UNSIGNED_LONG_LONG = 0;
-MAX_UNSIGNED_LONG_LONG = 18446744073709551615;
-
-TYPE_MISMATCH_EXCEPTION = {name: 'TypeMismatchError'};
-NOT_FOUND_EXCEPTION = {name: 'NotFoundError'};
-INVALID_VALUES_EXCEPTION = {name: 'InvalidValuesError'};
-IO_EXCEPTION = {name: 'IOError'};
-SECURITY_EXCEPTION = {name: 'SecurityError'};
-UNKNOWN_EXCEPTION = {name: 'UnknownError'};
-INVALID_STATE_EXCEPTION = {name: 'InvalidStateError'};
-INVALID_ACCESS_EXCEPTION = {name: 'InvalidAccessError'};
-
-(function () {
- var head_src = document.head.innerHTML;
- if (head_src.search(/\/testharness.js\W/) === -1) {
- document.write('<script language="javascript" src="../resources/testharness.js"></script>\n');
- }
- if (head_src.search(/\/testharnessreport.js\W/) === -1) {
- document.write('<script language="javascript" src="../resources/testharnessreport.js"></script>\n');
- }
-})();
-
-var _registered_types = {};
-
-function _resolve_registered_type(type) {
- while (type in _registered_types) {
- type = _registered_types[type];
- }
- return type;
-}
-
-/**
- * Method checks extra argument for none argument method.
- * The only check is that method will not throw an exception.
- * Example usage:
- * checkExtraArgument(tizen.notification, "removeAll");
- *
- * @param object object
- * @param methodName string - name of the method
- */
-function checkExtraArgument(object, methodName) {
- var extraArgument = [
- null,
- undefined,
- "Tizen",
- 1,
- false,
- ["one", "two"],
- {argument: 1},
- function () {}
- ], i;
-
- for (i = 0; i < extraArgument.length; i++) {
- object[methodName](extraArgument[i]);
- }
-}
-
-/**
- * Method to validate conversion.
- * Example usage:
- * conversionTable = getTypeConversionExceptions("functionObject", true);
- * for(i = 0; i < conversionTable.length; i++) {
- * errorCallback = conversionTable[i][0];
- * exceptionName = conversionTable[i][1];
- *
- * assert_throws({name : exceptionName},
- * function () {
- * tizen.systemsetting.setProperty("HOME_SCREEN",
- * propertyValue, successCallback, errorCallback);
- * }, exceptionName + " should be thrown - given incorrect errorCallback.");
- * }
- *
- * @param conversionType
- * @param isOptional
- * @returns table of tables which contain value (index 0) and exceptionName (index 1)
- *
- */
-function getTypeConversionExceptions(conversionType, isOptional) {
- var exceptionName = "TypeMismatchError",
- conversionTable;
- switch (conversionType) {
- case "enum":
- conversionTable = [
- [undefined, exceptionName],
- [0, exceptionName],
- [true, exceptionName],
- ["dummyInvalidEnumValue", exceptionName],
- [{ }, exceptionName]
- ];
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- case "double":
- conversionTable = [
- [undefined, exceptionName],
- [NaN, exceptionName],
- [Number.POSITIVE_INFINITY, exceptionName],
- [Number.NEGATIVE_INFINITY, exceptionName],
- ["TIZEN", exceptionName],
- [{ name : "TIZEN" }, exceptionName],
- [function () { }, exceptionName]
- ];
- break;
- case "boolean":
- conversionTable = [
- [undefined, exceptionName],
- [NaN, exceptionName],
- [Number.POSITIVE_INFINITY, exceptionName],
- [Number.NEGATIVE_INFINITY, exceptionName],
- ["TIZEN", exceptionName],
- [{ name : "TIZEN" }, exceptionName],
- [function () { }, exceptionName]
- ];
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- case "long":
- conversionTable = [
- [undefined, exceptionName],
- [NaN, exceptionName],
- [Number.POSITIVE_INFINITY, exceptionName],
- [Number.NEGATIVE_INFINITY, exceptionName],
- ["TIZEN", exceptionName],
- [{ name : "TIZEN" }, exceptionName],
- [function () { }, exceptionName]
- ];
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- case "object":
- conversionTable = [
- [true, exceptionName],
- [false, exceptionName],
- [NaN, exceptionName],
- [0, exceptionName],
- ["", exceptionName],
- ["TIZEN", exceptionName],
- [undefined, exceptionName]
- ];
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- case "functionObject":
- conversionTable = [
- [true, exceptionName],
- [false, exceptionName],
- [NaN, exceptionName],
- [0, exceptionName],
- ["", exceptionName],
- ["TIZEN", exceptionName],
- [[], exceptionName],
- [{ }, exceptionName],
- [undefined, exceptionName]
- ];
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- case "array":
- conversionTable = [
- [true, exceptionName],
- [false, exceptionName],
- [NaN, exceptionName],
- [0, exceptionName],
- ["", exceptionName],
- ["TIZEN", exceptionName],
- [{ }, exceptionName],
- [function () { }, exceptionName],
- [undefined, exceptionName]
- ];
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- case "dictionary":
- conversionTable = [
- [true, exceptionName],
- [false, exceptionName],
- [NaN, exceptionName],
- [0, exceptionName],
- ["", exceptionName],
- ["TIZEN", exceptionName],
- [undefined, exceptionName]
- ];
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- default:
- assert_unreached("Fix your test. Wrong conversionType '" + conversionType + "'.");
- };
-
- return conversionTable;
-}
-
-
-function assert_type(obj, type, description) {
- var org_type = type, prop_name, prop_type, prop_value;
-
- type = _resolve_registered_type(type);
-
- if (typeof (type) === 'string') {
- type = type.toLowerCase();
- switch (type) {
- case 'object':
- case 'string':
- case 'number':
- case 'function':
- case 'boolean':
- case 'undefined':
- case 'xml':
- assert_equals(typeof (obj), type, description);
- break;
- case 'null':
- assert_true(obj === null, description);
- break;
- case 'array':
- assert_true(Array.isArray(obj), description);
- break;
- case 'date':
- assert_true(obj instanceof Date, description);
- break;
- case 'byte':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
- assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
- break;
- case 'octet':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_OCTET, description + " - value too low.");
- assert_less_than_equal(obj, MAX_OCTET, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
- break;
- case 'short':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
- assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
- break;
- case 'unsigned short':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_UNSIGNED_SHORT, description + " - value too low.");
- assert_less_than_equal(obj, MAX_UNSIGNED_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
- break;
- case 'long':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
- assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
- break;
- case 'unsigned long':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_UNSIGNED_LONG, description + " - value too low.");
- assert_less_than_equal(obj, MAX_UNSIGNED_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
- break;
- case 'long long':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
- assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
- break;
- case 'unsigned long long':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_UNSIGNED_LONG_LONG, description + " - value too low.");
- assert_less_than_equal(obj, MAX_UNSIGNED_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
- break;
- case 'double':
- assert_equals(typeof (obj), 'number', description);
- break;
- default:
- assert_unreached('Fix your test. Wrong type \'' + org_type + '\'');
- }
- } else if (typeof (type) === 'function') {
- assert_true(obj instanceof type, description);
- } else if (typeof (type) === 'object') {
- for (prop_name in type) {
- prop_type = type[prop_name];
- if (prop_type === 'function') {
- assert_inherits(obj, prop_name);
- assert_equals(typeof obj[prop_name], prop_type, 'Object should have method ' + prop_name);
- } else {
- assert_own_property(obj, prop_name);
- }
- }
- } else {
- assert_unreached('Fix your test. Wrong type ' + org_type);
- }
-}
-
-function register_type(alias, type_spec) {
- _registered_types[alias] = type_spec;
-}
-
-/**
- * Method to check if attribute is const.
- * Example usage:
- * check_const(tizen.bluetooth.deviceMinor, 'TOY_DOLL', 0x03, 'number', 0x29B);
- *
- * @param obj object to test which has const attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_const(obj, attributeName, expectedValue, expectedType, valueToAssign) {
- var tmp;
- if (expectedValue === valueToAssign) {
- assert_unreached("Fix your test. The same values given for " + attributeName +
- " in 'value' and 'valueToSet' arguments.");
- }
- if (typeof (attributeName) === "string") {
- assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
- assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
- if (typeof (expectedType) !== "undefined") {
- if (expectedValue === null) {
- assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
- } else {
- assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
- }
- } else {
- assert_unreached("Fix your test. Wrong type " + expectedType);
- }
- tmp = obj[attributeName];
- obj[attributeName] = valueToAssign;
- assert_equals(obj[attributeName], tmp, attributeName + " can be modified.");
- } else {
- assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
- }
-}
-
-/**
- * Method to check if attribute is readonly.
- * Example usage:
- * check_readonly(statusNotification, "postedTime", null, 'object', new Date());
- *
- * @param obj object to test which has readonly attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_readonly(obj, attributeName, expectedValue, expectedType, valueToAssign) {
- check_const(obj, attributeName, expectedValue, expectedType, valueToAssign);
-}
-
-/**
- * Method to check if attribute can be set to null.
- * Example usage:
- * check_not_nullable(syncInfo, "mode");
- *
- * @param obj object to test which has not nullable attribute
- * @param attributeName attribute name.
- */
-function check_not_nullable(obj, attributeName)
-{ var old_value = obj[attributeName];
- obj[attributeName] = null;
- assert_not_equals(obj[attributeName], null, "Attribute " + attributeName + " can be set to null.");
- obj[attributeName] = old_value;
-}
-
-/**
- * Method to check NoInterfaceObject
- * Example usage:
- * check_no_interface_object("BluetoothAdapter")
- *
- * @param interfaceName interface name
- */
-function check_no_interface_object(interfaceName) {
- assert_throws({name: "TypeError"}, function () {
- tizen[interfaceName]();
- },"Wrong call as a function");
- assert_throws({name: "TypeError"}, function () {
- new tizen[interfaceName]();
- },"Wrong call as a new function");
- assert_throws({name: "TypeError"}, function () {
- ({}) instanceof tizen[interfaceName];
- },"instanceof exception");
- assert_equals(tizen[interfaceName], undefined, interfaceName + " is not undefined.");
-}
-
-
-/**
- * Method to check Constructors
- * Example usage:
- * check_constructor("BluetoothAdapter")
- *
- * @param constructorName constructor name
- */
-
-function check_constructor(constructorName) {
- assert_true(constructorName in tizen, "No " + constructorName + " in tizen.");
- assert_false({} instanceof tizen[constructorName],"Custom object is not instance of " + constructorName);
- assert_throws({
- name: "TypeError"
- }, function () {
- tizen[constructorName]();
- }, "Constructor called as function.");
-}
-
-/**
- * Method to check if given method can be overridden in a given object - (TEMPORARY REMOVED).
- * That method also checks if given method exists in a given object.
- * Example usage:
- * check_method_exists(tizen.notification, "get");
- *
- * @param obj object with method
- * @param methodName name of the method to check.
- */
-function check_method_exists(obj, methodName) {
- assert_type(obj[methodName], 'function', "Method does not exist.");
-}
-
-/**
- * Method to check extensibility of given object.
- * Method checks if new attribute and method can be added.
- * Example usage:
- * check_extensibility(tizen.notification);
- *
- * @param obj object to check
- */
-function check_extensibility(obj) {
- var dummyAttribute = "dummyAttributeValue", dummyMethodResult = "dummyMethodResultValue";
- obj.newDummyMethod = function() {
- return dummyMethodResult;
- }
- assert_equals(obj.newDummyMethod(), dummyMethodResult, "Incorrect result from added method.");
-
- obj.newDummyAttribute = dummyAttribute;
- assert_equals(obj.newDummyAttribute, dummyAttribute, "Incorrect result from added attribute.");
-}
-
-/**
- * Method to check if attribute can be modify.
- * Example usage:
- * check_attr(downloadRequest, "fileName", default_val, "string", "file_name.html");
- *
- * @param obj object to test which has not readonly attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_attribute(obj, attributeName, expectedValue, expectedType, valueToAssign) {
- if (expectedValue === valueToAssign) {
- assert_unreached("Fix your test. The same values given for " + attributeName +
- " in 'value' and 'valueToSet' arguments.");
- }
- if (typeof (attributeName) === "string") {
- assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
- assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
- if (typeof (expectedType) !== "undefined") {
- if (expectedValue === null) {
- assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
- } else {
- assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
- }
- } else {
- assert_unreached("Fix your test. Wrong type " + expectedType);
- }
- obj[attributeName] = valueToAssign;
- assert_equals(obj[attributeName], valueToAssign, attributeName + " can be modified.");
- } else {
- assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
- }
-}
-
-/**
- * Method to check if whole array can be overwritten with an invalid value.
- * Sample usage:
- * check_invalid_array_assignments(message, "to", false);
- *
- * @param obj object which has the array as its property
- * @param array name of the array to check
- * @param isNullable indicates if the array can be null
- */
-function check_invalid_array_assignments(obj, array, isNullable) {
- var args = [undefined, true, false, NaN, 0, "TIZEN", {}, function () {}],
- val = obj[array], i;
-
- if (!isNullable) {
- obj[array] = null;
- assert_not_equals(obj[array], null, "Non-nullable array was set to null");
- assert_type(obj[array], "array", "Non-nullable array type changed after assigning null");
- assert_equals(obj[array].toString(), val.toString(), "Non-nullable array contents changed after assigning null");
- }
-
- for (i = 0 ; i < args.length ; i++) {
- obj[array] = args[i];
- assert_type(obj[array], "array", "Array type changed after assigning an invalid value");
- assert_equals(obj[array].toString(), val.toString(), "Array contents changed after assigning an invalid value");
- }
-}
-
-/**
- * Method to check if an object can be overwritten with an invalid value.
- * Sample usage:
- * check_invalid_object_assignments(message, "body", false);
- *
- * @param parentObj object which has the 'obj' object as its property
- * @param obj name of the object to check
- * @param isNullable indicates if the object can be null
- */
-function check_invalid_obj_assignments(parentObj, obj, isNullable) {
- var args = [undefined, true, false, NaN, 0, "TIZEN", function () {}],
- val = parentObj[obj], i;
-
- if (!isNullable) {
- parentObj[obj] = null;
- assert_equals(parentObj[obj], val, "Non-nullable obj was modified after assigning null");
- }
-
- for (i = 0 ; i < args.length ; i++) {
- parentObj[obj] = args[i];
- assert_equals(parentObj[obj], val, "The object was set to " + args[i]);
- }
-}
-
-/**
- * Method to validate conversion for listeners.
- * Example usage:
- * incorrectListeners = getListenerConversionExceptions(["oninstalled", "onupdated", "onuninstalled"]);
- * for(i = 0; i < incorrectListeners.length; i++) {
- * packageInformationEventCallback = incorrectListeners[i][0];
- * exceptionName = incorrectListeners[i][1];
- * assert_throws({name : exceptionName},
- * function () {
- * tizen.package.setPackageInfoEventListener(packageInformationEventCallback);
- * }, exceptionName + " should be thrown - given incorrect successCallback.");
- * }
- *
- *
- * @param callbackNames Array with names
- * @returns {Array} table of tables which contain incorrect listener (index 0) and exceptionName (index 1)
- *
- */
-function getListenerConversionExceptions(callbackNames) {
- var result = [], conversionTable, i, j, listenerName;
- conversionTable = getTypeConversionExceptions("functionObject", false);
-
- for (i = 0; i < callbackNames.length; i++) {
- for (j = 0; j < conversionTable.length; j++) {
- listenerName = {};
- listenerName[callbackNames[i]] = conversionTable[j][0];
- result.push([listenerName, conversionTable[j][1]]);
- }
- }
-
- return result;
-}
+/*\r
+\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+\r
+ */\r
+\r
+\r
+MIN_BYTE = -128;\r
+MAX_BYTE = 127;\r
+MIN_OCTET = 0;\r
+MAX_OCTET = 255;\r
+MIN_SHORT = -32768;\r
+MAX_SHORT = 32767;\r
+MIN_UNSIGNED_SHORT = 0;\r
+MAX_UNSIGNED_SHORT = 65535;\r
+MIN_LONG = -2147483648;\r
+MAX_LONG = 2147483647;\r
+MIN_UNSIGNED_LONG = 0;\r
+MAX_UNSIGNED_LONG = 4294967295;\r
+MIN_LONG_LONG = -9223372036854775808;\r
+MAX_LONG_LONG = 9223372036854775807;\r
+MIN_UNSIGNED_LONG_LONG = 0;\r
+MAX_UNSIGNED_LONG_LONG = 18446744073709551615;\r
+\r
+TYPE_MISMATCH_EXCEPTION = {name: 'TypeMismatchError'};\r
+NOT_FOUND_EXCEPTION = {name: 'NotFoundError'};\r
+INVALID_VALUES_EXCEPTION = {name: 'InvalidValuesError'};\r
+IO_EXCEPTION = {name: 'IOError'};\r
+SECURITY_EXCEPTION = {name: 'SecurityError'};\r
+UNKNOWN_EXCEPTION = {name: 'UnknownError'};\r
+INVALID_STATE_EXCEPTION = {name: 'InvalidStateError'};\r
+INVALID_ACCESS_EXCEPTION = {name: 'InvalidAccessError'};\r
+\r
+var ARMV7 = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv7");\r
+var X86 = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.x86");\r
+var ARMV8 = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv8");\r
+var ARCH = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");\r
+\r
+(function () {\r
+ var head_src = document.head.innerHTML;\r
+ if (head_src.search(/\/testharness.js\W/) === -1) {\r
+ document.write('<script language="javascript" src="../resources/testharness.js"></script>\n');\r
+ }\r
+ if (head_src.search(/\/testharnessreport.js\W/) === -1) {\r
+ document.write('<script language="javascript" src="../resources/testharnessreport.js"></script>\n');\r
+ }\r
+})();\r
+\r
+var _registered_types = {};\r
+\r
+function _resolve_registered_type(type) {\r
+ while (type in _registered_types) {\r
+ type = _registered_types[type];\r
+ }\r
+ return type;\r
+}\r
+\r
+/**\r
+ * Method checks extra argument for none argument method.\r
+ * The only check is that method will not throw an exception.\r
+ * Example usage:\r
+ * checkExtraArgument(tizen.notification, "removeAll");\r
+ *\r
+ * @param object object\r
+ * @param methodName string - name of the method\r
+ */\r
+function checkExtraArgument(object, methodName) {\r
+ var extraArgument = [\r
+ null,\r
+ undefined,\r
+ "Tizen",\r
+ 1,\r
+ false,\r
+ ["one", "two"],\r
+ {argument: 1},\r
+ function () {}\r
+ ], i;\r
+\r
+ for (i = 0; i < extraArgument.length; i++) {\r
+ object[methodName](extraArgument[i]);\r
+ }\r
+}\r
+\r
+/**\r
+ * Method to validate conversion.\r
+ * Example usage:\r
+ * conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ * for(i = 0; i < conversionTable.length; i++) {\r
+ * errorCallback = conversionTable[i][0];\r
+ * exceptionName = conversionTable[i][1];\r
+ *\r
+ * assert_throws({name : exceptionName},\r
+ * function () {\r
+ * tizen.systemsetting.setProperty("HOME_SCREEN",\r
+ * propertyValue, successCallback, errorCallback);\r
+ * }, exceptionName + " should be thrown - given incorrect errorCallback.");\r
+ * }\r
+ *\r
+ * @param conversionType\r
+ * @param isOptional\r
+ * @returns table of tables which contain value (index 0) and exceptionName (index 1)\r
+ *\r
+ */\r
+function getTypeConversionExceptions(conversionType, isOptional) {\r
+ var exceptionName = "TypeMismatchError",\r
+ conversionTable;\r
+ switch (conversionType) {\r
+ case "enum":\r
+ conversionTable = [\r
+ [undefined, exceptionName],\r
+ [0, exceptionName],\r
+ [true, exceptionName],\r
+ ["dummyInvalidEnumValue", exceptionName],\r
+ [{ }, exceptionName]\r
+ ];\r
+ if (!isOptional) {\r
+ conversionTable.push([null, exceptionName]);\r
+ }\r
+ break;\r
+ case "double":\r
+ conversionTable = [\r
+ [undefined, exceptionName],\r
+ [NaN, exceptionName],\r
+ [Number.POSITIVE_INFINITY, exceptionName],\r
+ [Number.NEGATIVE_INFINITY, exceptionName],\r
+ ["TIZEN", exceptionName],\r
+ [{ name : "TIZEN" }, exceptionName],\r
+ [function () { }, exceptionName]\r
+ ];\r
+ break;\r
+ case "boolean":\r
+ conversionTable = [\r
+ [undefined, exceptionName],\r
+ [NaN, exceptionName],\r
+ [Number.POSITIVE_INFINITY, exceptionName],\r
+ [Number.NEGATIVE_INFINITY, exceptionName],\r
+ ["TIZEN", exceptionName],\r
+ [{ name : "TIZEN" }, exceptionName],\r
+ [function () { }, exceptionName]\r
+ ];\r
+ if (!isOptional) {\r
+ conversionTable.push([null, exceptionName]);\r
+ }\r
+ break;\r
+ case "long":\r
+ conversionTable = [\r
+ [undefined, exceptionName],\r
+ [NaN, exceptionName],\r
+ [Number.POSITIVE_INFINITY, exceptionName],\r
+ [Number.NEGATIVE_INFINITY, exceptionName],\r
+ ["TIZEN", exceptionName],\r
+ [{ name : "TIZEN" }, exceptionName],\r
+ [function () { }, exceptionName]\r
+ ];\r
+ if (!isOptional) {\r
+ conversionTable.push([null, exceptionName]);\r
+ }\r
+ break;\r
+ case "object":\r
+ conversionTable = [\r
+ [true, exceptionName],\r
+ [false, exceptionName],\r
+ [NaN, exceptionName],\r
+ [0, exceptionName],\r
+ ["", exceptionName],\r
+ ["TIZEN", exceptionName],\r
+ [undefined, exceptionName]\r
+ ];\r
+ if (!isOptional) {\r
+ conversionTable.push([null, exceptionName]);\r
+ }\r
+ break;\r
+ case "functionObject":\r
+ conversionTable = [\r
+ [true, exceptionName],\r
+ [false, exceptionName],\r
+ [NaN, exceptionName],\r
+ [0, exceptionName],\r
+ ["", exceptionName],\r
+ ["TIZEN", exceptionName],\r
+ [[], exceptionName],\r
+ [{ }, exceptionName],\r
+ [undefined, exceptionName]\r
+ ];\r
+ if (!isOptional) {\r
+ conversionTable.push([null, exceptionName]);\r
+ }\r
+ break;\r
+ case "array":\r
+ conversionTable = [\r
+ [true, exceptionName],\r
+ [false, exceptionName],\r
+ [NaN, exceptionName],\r
+ [0, exceptionName],\r
+ ["", exceptionName],\r
+ ["TIZEN", exceptionName],\r
+ [{ }, exceptionName],\r
+ [function () { }, exceptionName],\r
+ [undefined, exceptionName]\r
+ ];\r
+ if (!isOptional) {\r
+ conversionTable.push([null, exceptionName]);\r
+ }\r
+ break;\r
+ case "dictionary":\r
+ conversionTable = [\r
+ [true, exceptionName],\r
+ [false, exceptionName],\r
+ [NaN, exceptionName],\r
+ [0, exceptionName],\r
+ ["", exceptionName],\r
+ ["TIZEN", exceptionName],\r
+ [undefined, exceptionName]\r
+ ];\r
+ if (!isOptional) {\r
+ conversionTable.push([null, exceptionName]);\r
+ }\r
+ break;\r
+ default:\r
+ assert_unreached("Fix your test. Wrong conversionType '" + conversionType + "'.");\r
+ };\r
+\r
+ return conversionTable;\r
+}\r
+\r
+\r
+function assert_type(obj, type, description) {\r
+ var org_type = type, prop_name, prop_type, prop_value;\r
+\r
+ type = _resolve_registered_type(type);\r
+\r
+ if (typeof (type) === 'string') {\r
+ type = type.toLowerCase();\r
+ switch (type) {\r
+ case 'object':\r
+ case 'string':\r
+ case 'number':\r
+ case 'function':\r
+ case 'boolean':\r
+ case 'undefined':\r
+ case 'xml':\r
+ assert_equals(typeof (obj), type, description);\r
+ break;\r
+ case 'null':\r
+ assert_true(obj === null, description);\r
+ break;\r
+ case 'array':\r
+ assert_true(Array.isArray(obj), description);\r
+ break;\r
+ case 'date':\r
+ assert_true(obj instanceof Date, description);\r
+ break;\r
+ case 'byte':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");\r
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'octet':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_OCTET, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_OCTET, description + " - value too high.");\r
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'short':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");\r
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'unsigned short':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_UNSIGNED_SHORT, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_UNSIGNED_SHORT, description + " - value too high.");\r
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'long':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");\r
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'unsigned long':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_UNSIGNED_LONG, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_UNSIGNED_LONG, description + " - value too high.");\r
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'long long':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");\r
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'unsigned long long':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_UNSIGNED_LONG_LONG, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_UNSIGNED_LONG_LONG, description + " - value too high.");\r
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'double':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ break;\r
+ default:\r
+ assert_unreached('Fix your test. Wrong type \'' + org_type + '\'');\r
+ }\r
+ } else if (typeof (type) === 'function') {\r
+ assert_true(obj instanceof type, description);\r
+ } else if (typeof (type) === 'object') {\r
+ for (prop_name in type) {\r
+ prop_type = type[prop_name];\r
+ if (prop_type === 'function') {\r
+ assert_inherits(obj, prop_name);\r
+ assert_equals(typeof obj[prop_name], prop_type, 'Object should have method ' + prop_name);\r
+ } else {\r
+ assert_own_property(obj, prop_name);\r
+ }\r
+ }\r
+ } else {\r
+ assert_unreached('Fix your test. Wrong type ' + org_type);\r
+ }\r
+}\r
+\r
+function register_type(alias, type_spec) {\r
+ _registered_types[alias] = type_spec;\r
+}\r
+\r
+/**\r
+ * Method to check if attribute is const.\r
+ * Example usage:\r
+ * check_const(tizen.bluetooth.deviceMinor, 'TOY_DOLL', 0x03, 'number', 0x29B);\r
+ *\r
+ * @param obj object to test which has const attribute\r
+ * @param attributeName attribute name.\r
+ * @param expectedValue expected value of provided attribute name\r
+ * @param expectedType expected type of provided attribute name\r
+ * @param valueToAssign value to assign in order to check if attribute value can be modified\r
+ */\r
+function check_const(obj, attributeName, expectedValue, expectedType, valueToAssign) {\r
+ var tmp;\r
+ if (expectedValue === valueToAssign) {\r
+ assert_unreached("Fix your test. The same values given for " + attributeName +\r
+ " in 'value' and 'valueToSet' arguments.");\r
+ }\r
+ if (typeof (attributeName) === "string") {\r
+ assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");\r
+ assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");\r
+ if (typeof (expectedType) !== "undefined") {\r
+ if (expectedValue === null) {\r
+ assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");\r
+ } else {\r
+ assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");\r
+ }\r
+ } else {\r
+ assert_unreached("Fix your test. Wrong type " + expectedType);\r
+ }\r
+ tmp = obj[attributeName];\r
+ obj[attributeName] = valueToAssign;\r
+ assert_equals(obj[attributeName], tmp, attributeName + " can be modified.");\r
+ } else {\r
+ assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));\r
+ }\r
+}\r
+\r
+/**\r
+ * Method to check if attribute is readonly.\r
+ * Example usage:\r
+ * check_readonly(statusNotification, "postedTime", null, 'object', new Date());\r
+ *\r
+ * @param obj object to test which has readonly attribute\r
+ * @param attributeName attribute name.\r
+ * @param expectedValue expected value of provided attribute name\r
+ * @param expectedType expected type of provided attribute name\r
+ * @param valueToAssign value to assign in order to check if attribute value can be modified\r
+ */\r
+function check_readonly(obj, attributeName, expectedValue, expectedType, valueToAssign) {\r
+ check_const(obj, attributeName, expectedValue, expectedType, valueToAssign);\r
+}\r
+\r
+/**\r
+ * Method to check if attribute can be set to null.\r
+ * Example usage:\r
+ * check_not_nullable(syncInfo, "mode");\r
+ *\r
+ * @param obj object to test which has not nullable attribute\r
+ * @param attributeName attribute name.\r
+ */\r
+function check_not_nullable(obj, attributeName)\r
+{ var old_value = obj[attributeName];\r
+ obj[attributeName] = null;\r
+ assert_not_equals(obj[attributeName], null, "Attribute " + attributeName + " can be set to null.");\r
+ obj[attributeName] = old_value;\r
+}\r
+\r
+/**\r
+ * Method to check NoInterfaceObject\r
+ * Example usage:\r
+ * check_no_interface_object("BluetoothAdapter")\r
+ *\r
+ * @param interfaceName interface name\r
+ */\r
+function check_no_interface_object(interfaceName) {\r
+ assert_throws({name: "TypeError"}, function () {\r
+ tizen[interfaceName]();\r
+ },"Wrong call as a function");\r
+ assert_throws({name: "TypeError"}, function () {\r
+ new tizen[interfaceName]();\r
+ },"Wrong call as a new function");\r
+ assert_throws({name: "TypeError"}, function () {\r
+ ({}) instanceof tizen[interfaceName];\r
+ },"instanceof exception");\r
+ assert_equals(tizen[interfaceName], undefined, interfaceName + " is not undefined.");\r
+}\r
+\r
+\r
+/**\r
+ * Method to check Constructors\r
+ * Example usage:\r
+ * check_constructor("BluetoothAdapter")\r
+ *\r
+ * @param constructorName constructor name\r
+ */\r
+\r
+function check_constructor(constructorName) {\r
+ assert_true(constructorName in tizen, "No " + constructorName + " in tizen.");\r
+ assert_false({} instanceof tizen[constructorName],"Custom object is not instance of " + constructorName);\r
+ assert_throws({\r
+ name: "TypeError"\r
+ }, function () {\r
+ tizen[constructorName]();\r
+ }, "Constructor called as function.");\r
+}\r
+\r
+/**\r
+ * Method to check if given method can be overridden in a given object - (TEMPORARY REMOVED).\r
+ * That method also checks if given method exists in a given object.\r
+ * Example usage:\r
+ * check_method_exists(tizen.notification, "get");\r
+ *\r
+ * @param obj object with method\r
+ * @param methodName name of the method to check.\r
+ */\r
+function check_method_exists(obj, methodName) {\r
+ assert_type(obj[methodName], 'function', "Method does not exist.");\r
+}\r
+\r
+/**\r
+ * Method to check extensibility of given object.\r
+ * Method checks if new attribute and method can be added.\r
+ * Example usage:\r
+ * check_extensibility(tizen.notification);\r
+ *\r
+ * @param obj object to check\r
+ */\r
+function check_extensibility(obj) {\r
+ var dummyAttribute = "dummyAttributeValue", dummyMethodResult = "dummyMethodResultValue";\r
+ obj.newDummyMethod = function() {\r
+ return dummyMethodResult;\r
+ }\r
+ assert_equals(obj.newDummyMethod(), dummyMethodResult, "Incorrect result from added method.");\r
+\r
+ obj.newDummyAttribute = dummyAttribute;\r
+ assert_equals(obj.newDummyAttribute, dummyAttribute, "Incorrect result from added attribute.");\r
+}\r
+\r
+/**\r
+ * Method to check if attribute can be modify.\r
+ * Example usage:\r
+ * check_attr(downloadRequest, "fileName", default_val, "string", "file_name.html");\r
+ *\r
+ * @param obj object to test which has not readonly attribute\r
+ * @param attributeName attribute name.\r
+ * @param expectedValue expected value of provided attribute name\r
+ * @param expectedType expected type of provided attribute name\r
+ * @param valueToAssign value to assign in order to check if attribute value can be modified\r
+ */\r
+function check_attribute(obj, attributeName, expectedValue, expectedType, valueToAssign) {\r
+ if (expectedValue === valueToAssign) {\r
+ assert_unreached("Fix your test. The same values given for " + attributeName +\r
+ " in 'value' and 'valueToSet' arguments.");\r
+ }\r
+ if (typeof (attributeName) === "string") {\r
+ assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");\r
+ assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");\r
+ if (typeof (expectedType) !== "undefined") {\r
+ if (expectedValue === null) {\r
+ assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");\r
+ } else {\r
+ assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");\r
+ }\r
+ } else {\r
+ assert_unreached("Fix your test. Wrong type " + expectedType);\r
+ }\r
+ obj[attributeName] = valueToAssign;\r
+ assert_equals(obj[attributeName], valueToAssign, attributeName + " can be modified.");\r
+ } else {\r
+ assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));\r
+ }\r
+}\r
+\r
+/**\r
+ * Method to check if whole array can be overwritten with an invalid value.\r
+ * Sample usage:\r
+ * check_invalid_array_assignments(message, "to", false);\r
+ *\r
+ * @param obj object which has the array as its property\r
+ * @param array name of the array to check\r
+ * @param isNullable indicates if the array can be null\r
+ */\r
+function check_invalid_array_assignments(obj, array, isNullable) {\r
+ var args = [undefined, true, false, NaN, 0, "TIZEN", {}, function () {}],\r
+ val = obj[array], i;\r
+\r
+ if (!isNullable) {\r
+ obj[array] = null;\r
+ assert_not_equals(obj[array], null, "Non-nullable array was set to null");\r
+ assert_type(obj[array], "array", "Non-nullable array type changed after assigning null");\r
+ assert_equals(obj[array].toString(), val.toString(), "Non-nullable array contents changed after assigning null");\r
+ }\r
+\r
+ for (i = 0 ; i < args.length ; i++) {\r
+ obj[array] = args[i];\r
+ assert_type(obj[array], "array", "Array type changed after assigning an invalid value");\r
+ assert_equals(obj[array].toString(), val.toString(), "Array contents changed after assigning an invalid value");\r
+ }\r
+}\r
+\r
+/**\r
+ * Method to check if an object can be overwritten with an invalid value.\r
+ * Sample usage:\r
+ * check_invalid_object_assignments(message, "body", false);\r
+ *\r
+ * @param parentObj object which has the 'obj' object as its property\r
+ * @param obj name of the object to check\r
+ * @param isNullable indicates if the object can be null\r
+ */\r
+function check_invalid_obj_assignments(parentObj, obj, isNullable) {\r
+ var args = [undefined, true, false, NaN, 0, "TIZEN", function () {}],\r
+ val = parentObj[obj], i;\r
+\r
+ if (!isNullable) {\r
+ parentObj[obj] = null;\r
+ assert_equals(parentObj[obj], val, "Non-nullable obj was modified after assigning null");\r
+ }\r
+\r
+ for (i = 0 ; i < args.length ; i++) {\r
+ parentObj[obj] = args[i];\r
+ assert_equals(parentObj[obj], val, "The object was set to " + args[i]);\r
+ }\r
+}\r
+\r
+/**\r
+ * Method to validate conversion for listeners.\r
+ * Example usage:\r
+ * incorrectListeners = getListenerConversionExceptions(["oninstalled", "onupdated", "onuninstalled"]);\r
+ * for(i = 0; i < incorrectListeners.length; i++) {\r
+ * packageInformationEventCallback = incorrectListeners[i][0];\r
+ * exceptionName = incorrectListeners[i][1];\r
+ * assert_throws({name : exceptionName},\r
+ * function () {\r
+ * tizen.package.setPackageInfoEventListener(packageInformationEventCallback);\r
+ * }, exceptionName + " should be thrown - given incorrect successCallback.");\r
+ * }\r
+ *\r
+ *\r
+ * @param callbackNames Array with names\r
+ * @returns {Array} table of tables which contain incorrect listener (index 0) and exceptionName (index 1)\r
+ *\r
+ */\r
+function getListenerConversionExceptions(callbackNames) {\r
+ var result = [], conversionTable, i, j, listenerName;\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+\r
+ for (i = 0; i < callbackNames.length; i++) {\r
+ for (j = 0; j < conversionTable.length; j++) {\r
+ listenerName = {};\r
+ listenerName[callbackNames[i]] = conversionTable[j][0];\r
+ result.push([listenerName, conversionTable[j][1]]);\r
+ }\r
+ }\r
+\r
+ return result;\r
+}\r