Manifest tests - defaults for manifest_x 86/61386/2 accepted/tizen/common/20160311.050242 accepted/tizen/ivi/20160311.043356 accepted/tizen/mobile/20160311.043307 accepted/tizen/tv/20160311.043322 accepted/tizen/wearable/20160311.043344 submit/tizen/20160311.024723
authorTomasz Iwanek <t.iwanek@samsung.com>
Fri, 4 Mar 2016 13:02:17 +0000 (14:02 +0100)
committerTomasz Iwanek <t.iwanek@samsung.com>
Mon, 7 Mar 2016 11:47:33 +0000 (12:47 +0100)
Requires:
 - https://review.tizen.org/gerrit/61384
 - https://review.tizen.org/gerrit/61385

Verify:
 /usr/bin/tpk-backend-ut/manifest-test --gtest_filter=*_SetManifestXDefaults

4 tests should pass.

Change-Id: Idb94fe4415db2ebdab0e329a8968f3ad6b6db6b0

src/unit_tests/manifest_test_service_application.cc
src/unit_tests/manifest_test_ui_application.cc
src/unit_tests/manifest_test_watch_application.cc
src/unit_tests/manifest_test_widget_application.cc
src/unit_tests/test_samples/manifest/ManifestTest.ServiceApplicationElement_SetManifestXDefaults/tizen-manifest.xml [new file with mode: 0644]
src/unit_tests/test_samples/manifest/ManifestTest.UIApplicationElement_SetManifestXDefaults/tizen-manifest.xml [new file with mode: 0644]
src/unit_tests/test_samples/manifest/ManifestTest.WatchApplicationElement_SetManifestXDefaults/tizen-manifest.xml [new file with mode: 0644]
src/unit_tests/test_samples/manifest/ManifestTest.WidgetApplicationElement_SetManifestXDefaults/tizen-manifest.xml [new file with mode: 0644]

index 1493435..264b4ee 100644 (file)
@@ -521,3 +521,41 @@ TEST_F(ManifestTest, ServiceApplicationElement_Icon_Valid) {
   ASSERT_EQ(bf::path((*icons.begin())->text).filename().string(),
             "test_icon.png");
 }
+
+TEST_F(ManifestTest, ServiceApplicationElement_SetManifestXDefaults) {
+  StepParseRunner runner(GetMyName());
+  ASSERT_TRUE(runner.Run());
+  manifest_x* m = runner.GetManifest();
+  ASSERT_NE(m, nullptr);
+  ASSERT_CSTR_EQ(m->package, "package0id");
+  ASSERT_CSTR_EQ(m->version, "1.0.0");
+  ASSERT_CSTR_EQ(m->installlocation, "auto");
+  ASSERT_CSTR_EQ(m->appsetting, "false");
+  ASSERT_CSTR_EQ(m->type, "tpk");
+  ASSERT_NE(m->installed_time, nullptr);
+  ASSERT_CSTR_EQ(m->mainapp_id, "package0id.appid");
+  ASSERT_CSTR_EQ(m->nodisplay_setting, "false");
+  ASSERT_CSTR_EQ(m->support_disable, "false");
+  ASSERT_CSTR_EQ(m->api_version, "2.3");
+  auto apps = GListRange<application_x*>(m->application);
+  ASSERT_EQ(Size(&apps), 1);
+  application_x* app = *apps.begin();
+  ASSERT_CSTR_EQ(app->appid, "package0id.appid");
+  ASSERT_NE(app->exec, nullptr);
+  ASSERT_CSTR_EQ(app->nodisplay, "true");
+  ASSERT_CSTR_EQ(app->multiple, "false");
+  ASSERT_CSTR_EQ(app->taskmanage, "true");
+  ASSERT_CSTR_EQ(app->enabled, "true");
+  ASSERT_CSTR_EQ(app->hwacceleration, "default");
+  ASSERT_CSTR_EQ(app->screenreader, "use-system-setting");
+  ASSERT_CSTR_EQ(app->component_type, "svcapp");
+  ASSERT_CSTR_EQ(app->mainapp, "true");
+  ASSERT_CSTR_EQ(app->recentimage, "false");
+  ASSERT_CSTR_EQ(app->launchcondition, "false");
+  ASSERT_CSTR_EQ(app->indicatordisplay, "true");
+  ASSERT_CSTR_EQ(app->effectimage_type, "image");
+  ASSERT_CSTR_EQ(app->guestmode_visibility, "true");
+  ASSERT_CSTR_EQ(app->permission_type, "normal");
+  ASSERT_CSTR_EQ(app->submode, "false");
+  ASSERT_CSTR_EQ(app->process_pool, "false");
+}
index 8b4b935..c550bb3 100644 (file)
@@ -584,10 +584,9 @@ TEST_F(ManifestTest, UIApplicationElement_SetManifestXDefaults) {
   ASSERT_NE(m, nullptr);
   ASSERT_CSTR_EQ(m->package, "package0id");
   ASSERT_CSTR_EQ(m->version, "1.0.0");
-  ASSERT_CSTR_EQ(m->installlocation, "internal-only");
+  ASSERT_CSTR_EQ(m->installlocation, "auto");
   ASSERT_CSTR_EQ(m->appsetting, "false");
   ASSERT_CSTR_EQ(m->type, "tpk");
-  ASSERT_NE(m->package_size, nullptr);
   ASSERT_NE(m->installed_time, nullptr);
   ASSERT_CSTR_EQ(m->mainapp_id, "package0id.appid");
   ASSERT_CSTR_EQ(m->nodisplay_setting, "false");
@@ -604,7 +603,15 @@ TEST_F(ManifestTest, UIApplicationElement_SetManifestXDefaults) {
   ASSERT_CSTR_EQ(app->enabled, "true");
   ASSERT_CSTR_EQ(app->hwacceleration, "default");
   ASSERT_CSTR_EQ(app->screenreader, "use-system-setting");
-  ASSERT_CSTR_EQ(app->screenreader, "use-system-setting");
   ASSERT_CSTR_EQ(app->component_type, "uiapp");
   ASSERT_CSTR_EQ(app->mainapp, "true");
+  ASSERT_CSTR_EQ(app->recentimage, "false");
+  ASSERT_CSTR_EQ(app->launchcondition, "false");
+  ASSERT_CSTR_EQ(app->indicatordisplay, "true");
+  ASSERT_CSTR_EQ(app->effectimage_type, "image");
+  ASSERT_CSTR_EQ(app->guestmode_visibility, "true");
+  ASSERT_CSTR_EQ(app->permission_type, "normal");
+  ASSERT_CSTR_EQ(app->component_type, "uiapp");
+  ASSERT_CSTR_EQ(app->submode, "false");
+  ASSERT_CSTR_EQ(app->process_pool, "false");
 }
index f1703a4..0fcfcd8 100644 (file)
@@ -109,3 +109,41 @@ TEST_F(ManifestTest, WatchApplicationElement_AmbientSupport_Invalid) {
   StepParseRunner runner(GetMyName());
   ASSERT_FALSE(runner.Run());
 }
+
+TEST_F(ManifestTest, WatchApplicationElement_SetManifestXDefaults) {
+  StepParseRunner runner(GetMyName());
+  ASSERT_TRUE(runner.Run());
+  manifest_x* m = runner.GetManifest();
+  ASSERT_NE(m, nullptr);
+  ASSERT_CSTR_EQ(m->package, "package0id");
+  ASSERT_CSTR_EQ(m->version, "1.0.0");
+  ASSERT_CSTR_EQ(m->installlocation, "auto");
+  ASSERT_CSTR_EQ(m->appsetting, "false");
+  ASSERT_CSTR_EQ(m->type, "tpk");
+  ASSERT_NE(m->installed_time, nullptr);
+  ASSERT_CSTR_EQ(m->mainapp_id, "package0id.appid");
+  ASSERT_CSTR_EQ(m->nodisplay_setting, "false");
+  ASSERT_CSTR_EQ(m->support_disable, "false");
+  ASSERT_CSTR_EQ(m->api_version, "2.3");
+  auto apps = GListRange<application_x*>(m->application);
+  ASSERT_EQ(Size(&apps), 1);
+  application_x* app = *apps.begin();
+  ASSERT_CSTR_EQ(app->appid, "package0id.appid");
+  ASSERT_NE(app->exec, nullptr);
+  ASSERT_CSTR_EQ(app->nodisplay, "false");
+  ASSERT_CSTR_EQ(app->multiple, "false");
+  ASSERT_CSTR_EQ(app->taskmanage, "false");
+  ASSERT_CSTR_EQ(app->enabled, "true");
+  ASSERT_CSTR_EQ(app->hwacceleration, "default");
+  ASSERT_CSTR_EQ(app->screenreader, "use-system-setting");
+  ASSERT_CSTR_EQ(app->component_type, "watchapp");
+  ASSERT_CSTR_EQ(app->mainapp, "true");
+  ASSERT_CSTR_EQ(app->recentimage, "false");
+  ASSERT_CSTR_EQ(app->launchcondition, "false");
+  ASSERT_CSTR_EQ(app->indicatordisplay, "true");
+  ASSERT_CSTR_EQ(app->effectimage_type, "image");
+  ASSERT_CSTR_EQ(app->guestmode_visibility, "true");
+  ASSERT_CSTR_EQ(app->permission_type, "normal");
+  ASSERT_CSTR_EQ(app->submode, "false");
+  ASSERT_CSTR_EQ(app->process_pool, "false");
+}
index bf75425..4ed9446 100644 (file)
@@ -148,3 +148,41 @@ TEST_F(ManifestTest, WidgetApplicationElement_Main_TakeMarked) {
 }
 
 // preview, update-period, support-size are supposed to be parsed by plugin
+
+TEST_F(ManifestTest, WidgetApplicationElement_SetManifestXDefaults) {
+  StepParseRunner runner(GetMyName());
+  ASSERT_TRUE(runner.Run());
+  manifest_x* m = runner.GetManifest();
+  ASSERT_NE(m, nullptr);
+  ASSERT_CSTR_EQ(m->package, "package0id");
+  ASSERT_CSTR_EQ(m->version, "1.0.0");
+  ASSERT_CSTR_EQ(m->installlocation, "auto");
+  ASSERT_CSTR_EQ(m->appsetting, "false");
+  ASSERT_CSTR_EQ(m->type, "tpk");
+  ASSERT_NE(m->installed_time, nullptr);
+  ASSERT_CSTR_EQ(m->mainapp_id, "package0id.appid");
+  ASSERT_CSTR_EQ(m->nodisplay_setting, "false");
+  ASSERT_CSTR_EQ(m->support_disable, "false");
+  ASSERT_CSTR_EQ(m->api_version, "2.3");
+  auto apps = GListRange<application_x*>(m->application);
+  ASSERT_EQ(Size(&apps), 1);
+  application_x* app = *apps.begin();
+  ASSERT_CSTR_EQ(app->appid, "package0id.appid");
+  ASSERT_NE(app->exec, nullptr);
+  ASSERT_CSTR_EQ(app->nodisplay, "true");
+  ASSERT_CSTR_EQ(app->multiple, "false");
+  ASSERT_CSTR_EQ(app->taskmanage, "false");
+  ASSERT_CSTR_EQ(app->enabled, "true");
+  ASSERT_CSTR_EQ(app->hwacceleration, "default");
+  ASSERT_CSTR_EQ(app->screenreader, "use-system-setting");
+  ASSERT_CSTR_EQ(app->component_type, "widgetapp");
+  ASSERT_CSTR_EQ(app->mainapp, "true");
+  ASSERT_CSTR_EQ(app->recentimage, "false");
+  ASSERT_CSTR_EQ(app->launchcondition, "false");
+  ASSERT_CSTR_EQ(app->indicatordisplay, "false");
+  ASSERT_CSTR_EQ(app->effectimage_type, "image");
+  ASSERT_CSTR_EQ(app->guestmode_visibility, "true");
+  ASSERT_CSTR_EQ(app->permission_type, "normal");
+  ASSERT_CSTR_EQ(app->submode, "false");
+  ASSERT_CSTR_EQ(app->process_pool, "false");
+}
diff --git a/src/unit_tests/test_samples/manifest/ManifestTest.ServiceApplicationElement_SetManifestXDefaults/tizen-manifest.xml b/src/unit_tests/test_samples/manifest/ManifestTest.ServiceApplicationElement_SetManifestXDefaults/tizen-manifest.xml
new file mode 100644 (file)
index 0000000..08f42fa
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+    <service-application appid="package0id.appid" exec="testapp" type="capp">
+    </service-application>
+</manifest>
diff --git a/src/unit_tests/test_samples/manifest/ManifestTest.UIApplicationElement_SetManifestXDefaults/tizen-manifest.xml b/src/unit_tests/test_samples/manifest/ManifestTest.UIApplicationElement_SetManifestXDefaults/tizen-manifest.xml
new file mode 100644 (file)
index 0000000..f0bba4a
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+    <ui-application appid="package0id.appid" exec="testapp" type="capp">
+    </ui-application>
+</manifest>
diff --git a/src/unit_tests/test_samples/manifest/ManifestTest.WatchApplicationElement_SetManifestXDefaults/tizen-manifest.xml b/src/unit_tests/test_samples/manifest/ManifestTest.WatchApplicationElement_SetManifestXDefaults/tizen-manifest.xml
new file mode 100644 (file)
index 0000000..8e9bcce
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+    <watch-application appid="package0id.appid" exec="testapp" type="capp">
+    </watch-application>
+</manifest>
diff --git a/src/unit_tests/test_samples/manifest/ManifestTest.WidgetApplicationElement_SetManifestXDefaults/tizen-manifest.xml b/src/unit_tests/test_samples/manifest/ManifestTest.WidgetApplicationElement_SetManifestXDefaults/tizen-manifest.xml
new file mode 100644 (file)
index 0000000..55e6da9
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="package0id" version="1.0.0">
+    <widget-application appid="package0id.appid" exec="testapp" type="capp">
+    </widget-application>
+</manifest>