ADD_SUBDIRECTORY(data)
ADD_SUBDIRECTORY(src)
+ADD_SUBDIRECTORY(test)
ADD_SUBDIRECTORY(lib)
ADD_SUBDIRECTORY(wgt)
ADD_SUBDIRECTORY(wgt_backend)
-ADD_SUBDIRECTORY(unit_tests)
+++ /dev/null
-SET(DESTINATION_DIR wgt-installer-ut)
-SET(TARGET_SMOKE_UTILS smoke-utils)
-
-# Executables
-ADD_EXECUTABLE(${TARGET_SMOKE_TEST}
- smoke_test.cc
-)
-ADD_EXECUTABLE(${TARGET_SMOKE_TEST_EXTENSIVE}
- extensive_smoke_test.cc
-)
-ADD_EXECUTABLE(${TARGET_SMOKE_TEST_HELPER}
- smoke_test_helper.cc
-)
-ADD_EXECUTABLE(${TARGET_MANIFEST_TEST}
- manifest_test.cc
-)
-ADD_LIBRARY(${TARGET_WGT_SMOKE_UTILS} SHARED
- wgt_smoke_utils.cc
-)
-
-TARGET_INCLUDE_DIRECTORIES(${TARGET_SMOKE_TEST} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
-TARGET_INCLUDE_DIRECTORIES(${TARGET_SMOKE_TEST_EXTENSIVE} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
-TARGET_INCLUDE_DIRECTORIES(${TARGET_SMOKE_TEST_HELPER} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
-TARGET_INCLUDE_DIRECTORIES(${TARGET_MANIFEST_TEST} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
-
-INSTALL(DIRECTORY test_samples/ DESTINATION ${SHAREDIR}/${DESTINATION_DIR}/test_samples)
-
-APPLY_PKG_CONFIG(${TARGET_SMOKE_TEST} PUBLIC
- Boost
- GTEST
- GUM_DEPS
-)
-APPLY_PKG_CONFIG(${TARGET_SMOKE_TEST_EXTENSIVE} PUBLIC
- Boost
- GTEST
- GUM_DEPS
-)
-APPLY_PKG_CONFIG(${TARGET_MANIFEST_TEST} PUBLIC
- Boost
- GTEST
-)
-
-# FindGTest module do not sets all needed libraries in GTEST_LIBRARIES and
-# GTest main libraries is still missing, so additional linking of
-# GTEST_MAIN_LIBRARIES is needed.
-TARGET_LINK_LIBRARIES(${TARGET_SMOKE_TEST} PRIVATE ${TARGET_LIBNAME_WGT} ${TARGET_LIBNAME_HYBRID} ${GTEST_MAIN_LIBRARIES} ${TARGET_SMOKE_UTILS} ${TARGET_WGT_SMOKE_UTILS})
-TARGET_LINK_LIBRARIES(${TARGET_SMOKE_TEST_EXTENSIVE} PRIVATE ${TARGET_LIBNAME_WGT} ${TARGET_LIBNAME_HYBRID} ${GTEST_MAIN_LIBRARIES} ${TARGET_SMOKE_UTILS} ${TARGET_WGT_SMOKE_UTILS})
-TARGET_LINK_LIBRARIES(${TARGET_SMOKE_TEST_HELPER} PRIVATE ${TARGET_LIBNAME_WGT} ${TARGET_WGT_SMOKE_UTILS})
-TARGET_LINK_LIBRARIES(${TARGET_MANIFEST_TEST} PRIVATE ${TARGET_LIBNAME_WGT} ${GTEST_MAIN_LIBRARIES})
-TARGET_LINK_LIBRARIES(${TARGET_WGT_SMOKE_UTILS} PRIVATE ${TARGET_LIBNAME_WGT} ${TARGET_LIBNAME_HYBRID} ${TARGET_SMOKE_UTILS})
-
-INSTALL(TARGETS ${TARGET_SMOKE_TEST} DESTINATION ${BINDIR}/${DESTINATION_DIR})
-INSTALL(TARGETS ${TARGET_SMOKE_TEST_EXTENSIVE} DESTINATION ${BINDIR}/${DESTINATION_DIR})
-INSTALL(TARGETS ${TARGET_SMOKE_TEST_HELPER} DESTINATION ${BINDIR}/${DESTINATION_DIR})
-INSTALL(TARGETS ${TARGET_MANIFEST_TEST} DESTINATION ${BINDIR}/${DESTINATION_DIR})
-INSTALL(TARGETS ${TARGET_WGT_SMOKE_UTILS} DESTINATION ${LIB_INSTALL_DIR})
-INSTALL(FILES wgt_smoke_utils.h DESTINATION ${INCLUDEDIR}/app-installers/unit_tests/)
+++ /dev/null
-// Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include <common/utils/subprocess.h>
-
-#include <common/utils/file_util.h>
-#include <unit_tests/common/smoke_utils.h>
-
-#include <gtest/gtest.h>
-#include <gtest/gtest-death-test.h>
-
-#include "unit_tests/wgt_smoke_utils.h"
-
-namespace ci = common_installer;
-
-namespace smoke_test {
-
-class SmokeEnvironment : public testing::Environment {
- public:
- explicit SmokeEnvironment(ci::RequestMode mode) {\
- request_mode_ = mode;
- }
- void SetUp() override {
- if (request_mode_ == ci::RequestMode::USER)
- ASSERT_TRUE(AddTestUser(&test_user));
- backups_ = SetupBackupDirectories(test_user.uid);
- for (auto& path : backups_)
- ASSERT_TRUE(BackupPath(path));
- }
- void TearDown() override {
- ASSERT_TRUE(request_mode_ == ci::RequestMode::GLOBAL ||
- (request_mode_ == ci::RequestMode::USER &&
- kGlobalUserUid != test_user.uid));
- WgtBackendInterface backend(std::to_string(test_user.uid));
- UninstallAllSmokeApps(request_mode_, test_user.uid, &backend);
- for (auto& path : backups_)
- ASSERT_TRUE(RestorePath(path));
- if (request_mode_ == ci::RequestMode::USER)
- ASSERT_TRUE(DeleteTestUser());
- }
- User test_user;
-
- private:
- ci::RequestMode request_mode_;
- std::vector<bf::path> backups_;
-};
-
-} // namespace smoke_test
-
-namespace {
-
-smoke_test::SmokeEnvironment *env = nullptr;
-void signalHandler(int signum) {
- env->TearDown();
- exit(signum);
-}
-
-} // namespace
-
-namespace smoke_test {
-
-class SmokeTest : public testing::Test {
- public:
- SmokeTest() : backend(std::to_string(env->test_user.uid)),
- params{PackageType::WGT, false} {
- params.test_user.uid = env->test_user.uid;
- params.test_user.gid = env->test_user.gid;
- }
- protected:
- WgtBackendInterface backend;
- TestParameters params;
-};
-
-class HybridSmokeTest : public testing::Test {
- public:
- HybridSmokeTest() : backend(std::to_string(env->test_user.uid)),
- params{PackageType::HYBRID, false} {
- params.test_user.uid = env->test_user.uid;
- params.test_user.gid = env->test_user.gid;
- }
- protected:
- HybridBackendInterface backend;
- TestParameters params;
-};
-
-TEST_F(SmokeTest, RecoveryMode_ForInstallation) {
- bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForInstallation.wgt";
- std::string pkgid = "smokewgt09";
- std::string appid = "smokewgt09.RecoveryModeForInstallation";
-
- std::string test_user_str = std::to_string(params.test_user.uid);
- std::vector<std::string> args =
- {"", "-i", path.string(), "-u", test_user_str.c_str()};
- backend.CrashAfterEachStep(&args, [&](int step) -> bool {
- if (step >= 2) {
- bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
- params.test_user.uid);
- EXTENDED_ASSERT_FALSE(recovery_file.empty());
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
- EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
- }
- return true;
- }, params.pkg_type);
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForUpdate) {
- bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForUpdate.wgt";
- bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForUpdate_2.wgt";
- RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
- std::string pkgid = "smokewgt10";
- std::string appid = "smokewgt10.RecoveryModeForUpdate";
- AddDataFiles(pkgid, params.test_user.uid);
-
- std::string test_user_str = std::to_string(params.test_user.uid);
- std::vector<std::string> args =
- {"", "-i", path_new.string(), "-u", test_user_str.c_str()};
- backend.CrashAfterEachStep(&args, [&](int step) -> bool {
- if (step >= 2) {
- bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
- params.test_user.uid);
- EXTENDED_ASSERT_FALSE(recovery_file.empty());
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "res/wgt/VERSION", "1\n", params));
- EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
- }
- return true;
- }, params.pkg_type);
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForDelta) {
- bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForDelta.wgt";
- bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
- std::string pkgid = "smokewgt30";
- std::string appid = "smokewgt30.RecoveryModeForDelta";
- RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- std::string test_user_str = std::to_string(params.test_user.uid);
- std::vector<std::string> args =
- {"", "-i", path_new.string(), "-u", test_user_str.c_str()};
- backend.CrashAfterEachStep(&args, [&](int step) -> bool {
- if (step >= 2) {
- bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
- params.test_user.uid);
- EXTENDED_ASSERT_FALSE(recovery_file.empty());
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "res/wgt/VERSION", "1\n", params));
- EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
- }
- return true;
- }, params.pkg_type);
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
- bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForMountInstall.wgt";
- std::string pkgid = "smokewgt31";
- std::string appid = "smokewgt31.RecoveryModeForMountInstall";
- RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- std::string test_user_str = std::to_string(params.test_user.uid);
- std::vector<std::string> args =
- {"", "-w", path.string(), "-u", test_user_str.c_str()};
- backend.CrashAfterEachStep(&args, [&](int step) -> bool {
- if (step >= 2) {
- bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
- params.test_user.uid);
- EXTENDED_ASSERT_FALSE(recovery_file.empty());
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
- EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
- }
- return true;
- }, params.pkg_type);
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
- bf::path path_old =
- kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate.wgt";
- bf::path path_new =
- kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate_2.wgt";
- std::string pkgid = "smokewgt32";
- std::string appid = "smokewgt32.RecoveryModeForMountUpdate";
- RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- ASSERT_EQ(backend.MountInstall(path_old), ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- std::string test_user_str = std::to_string(params.test_user.uid);
- std::vector<std::string> args =
- {"", "-w", path_new.string(), "-u", test_user_str.c_str()};
- backend.CrashAfterEachStep(&args, [&](int step) -> bool {
- if (step >= 2) {
- // Filesystem may be mounted after crash
- ScopedTzipInterface poweroff_unmount_interface(pkgid,
- params.test_user.uid);
- poweroff_unmount_interface.Release();
-
- bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
- params.test_user.uid);
- EXTENDED_ASSERT_FALSE(recovery_file.empty());
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
-
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(
- pkgid, "res/wgt/VERSION", "1\n", params));
- EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
- }
- return true;
- }, params.pkg_type);
-}
-
-
-TEST_F(SmokeTest, InstallationMode_Rollback) {
- bf::path path = kSmokePackagesDirectory / "InstallationMode_Rollback.wgt";
- std::string pkgid = "smokewgt06";
- std::string appid = "smokewgt06.InstallationModeRollback";
-
- std::string test_user_str = std::to_string(params.test_user.uid);
- const char* argv[] = {"", "-i", path.c_str(), "-u", test_user_str.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
- return true;
- });
-}
-
-TEST_F(SmokeTest, UpdateMode_Rollback) {
- bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Rollback.wgt";
- bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Rollback_2.wgt";
- std::string pkgid = "smokewgt07";
- std::string appid = "smokewgt07.UpdateModeRollback";
- ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- std::string test_user_str = std::to_string(params.test_user.uid);
- const char* argv[] =
- {"", "-i", path_new.c_str(), "-u", test_user_str.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "res/wgt/VERSION", "1\n", params));
- EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
- return true;
- });
-}
-
-TEST_F(SmokeTest, DeltaMode_Rollback) {
- bf::path path = kSmokePackagesDirectory / "DeltaMode_Rollback.wgt";
- bf::path delta_package = kSmokePackagesDirectory / "DeltaMode_Rollback.delta";
- std::string pkgid = "smokewgt01";
- std::string appid = "smokewgt01.DeltaMode";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- std::string test_user_str = std::to_string(params.test_user.uid);
- const char* argv[] =
- {"", "-i", delta_package.c_str(), "-u", test_user_str.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED",
- "version 1\n", params));
- EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
- EXTENDED_ASSERT_TRUE(bf::exists(GetPackageRoot(
- pkgid, params.test_user.uid) / "res/wgt/DELETED"));
- EXTENDED_ASSERT_FALSE(bf::exists(GetPackageRoot(
- pkgid, params.test_user.uid) / "res/wgt/ADDED"));
- return true;
- });
-}
-
-TEST_F(HybridSmokeTest, InstallationMode_Rollback) {
- bf::path path = kSmokePackagesDirectory /
- "InstallationMode_Rollback_Hybrid.wgt";
- std::string pkgid = "smokehyb07";
- std::string appid1 = "smokehyb07.web";
- std::string test_user_str = std::to_string(params.test_user.uid);
- const char* argv[] = {"", "-i", path.c_str(), "-u", test_user_str.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
- return true;
- });
-}
-
-TEST_F(HybridSmokeTest, UpdateMode_Rollback) {
- bf::path path_old = kSmokePackagesDirectory /
- "UpdateMode_Rollback_Hybrid.wgt";
- bf::path path_new = kSmokePackagesDirectory /
- "UpdateMode_Rollback_Hybrid_2.wgt";
- std::string pkgid = "smokehyb08";
- std::string appid1 = "smokehyb08.web";
- ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- std::string test_user_str = std::to_string(params.test_user.uid);
- const char* argv[] =
- {"", "-i", path_new.c_str(), "-u", test_user_str.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
-
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "res/wgt/VERSION", "1\n", params));
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "lib/VERSION", "1\n", params));
- EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
- return true;
- });
-}
-
-TEST_F(HybridSmokeTest, DeltaMode_Rollback_Hybrid) {
- bf::path path = kSmokePackagesDirectory / "DeltaMode_Rollback_Hybrid.wgt";
- bf::path delta_package = kSmokePackagesDirectory /
- "DeltaMode_Rollback_Hybrid.delta";
- std::string pkgid = "smokehyb11";
- std::string appid1 = "smokehyb11.web";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- std::string test_user_str = std::to_string(params.test_user.uid);
- const char* argv[] = {"", "-i", path.c_str(), "-u", test_user_str.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
- // Check delta modifications
- bf::path root_path = GetPackageRoot(pkgid, params.test_user.uid);
- EXTENDED_ASSERT_TRUE(bf::exists(root_path / "res" / "wgt" / "DELETED"));
- EXTENDED_ASSERT_FALSE(bf::exists(root_path / "res" / "wgt" / "ADDED"));
- EXTENDED_ASSERT_TRUE(bf::exists(root_path / "lib" / "DELETED"));
- EXTENDED_ASSERT_FALSE(bf::exists(root_path / "lib" / "ADDED"));
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED",
- "version 1\n", params));
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "lib/MODIFIED",
- "version 1\n", params));
- EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
- return true;
- });
-}
-
-TEST_F(HybridSmokeTest, MountInstallationMode_Rollback) {
- bf::path path = kSmokePackagesDirectory /
- "MountInstallationMode_Rollback_Hybrid.wgt";
- std::string pkgid = "smokehyb09";
- std::string appid1 = "smokehyb09.web";
- std::string test_user_str = std::to_string(params.test_user.uid);
- const char* argv[] = {"", "-w", path.c_str(), "-u", test_user_str.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
- return true;
- });
-}
-
-TEST_F(HybridSmokeTest, MountUpdateMode_Rollback) {
- bf::path path_old = kSmokePackagesDirectory /
- "MountUpdateMode_Rollback_Hybrid.wgt";
- bf::path path_new = kSmokePackagesDirectory /
- "MountUpdateMode_Rollback_Hybrid_2.wgt";
- std::string pkgid = "smokehyb10";
- std::string appid1 = "smokehyb10.web";
- ASSERT_EQ(backend.MountInstall(path_old), ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- std::string test_user_str = std::to_string(params.test_user.uid);
- const char* argv[] =
- {"", "-w", path_new.c_str(), "-u", test_user_str.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
-
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "res/wgt/VERSION", "1\n", params));
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "lib/VERSION", "1\n", params));
- EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
- return true;
- });
-}
-
-TEST_F(SmokeTest, MountInstallationMode_Rollback) {
- bf::path path =
- kSmokePackagesDirectory / "MountInstallationMode_Rollback.wgt";
- std::string pkgid = "smokewgt33";
- std::string appid = "smokewgt33.web";
- std::string test_user_str = std::to_string(params.test_user.uid);
- const char* argv[] = {"", "-w", path.c_str(), "-u", test_user_str.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [=]() -> bool {
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
- return true;
- });
-}
-
-TEST_F(SmokeTest, MountUpdateMode_Rollback) {
- bf::path path_old = kSmokePackagesDirectory / "MountUpdateMode_Rollback.wgt";
- bf::path path_new =
- kSmokePackagesDirectory / "MountUpdateMode_Rollback_2.wgt";
- std::string pkgid = "smokewgt34";
- std::string appid = "smokewgt34.web";
- ASSERT_EQ(backend.MountInstall(path_old),
- ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- std::string test_user_str = std::to_string(params.test_user.uid);
- const char* argv[] =
- {"", "-w", path_new.c_str(), "-u", test_user_str.c_str()};
- backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-
- EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
- "res/wgt/VERSION", "1\n", params));
- EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
- return true;
- });
-}
-
-} // namespace smoke_test
-
-int main(int argc, char** argv) {
- try {
- ci::RequestMode request_mode = smoke_test::ParseRequestMode(argc, argv);
- if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) {
- std::cout << "Skip tests for preload request" << std::endl;
- ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
- }
- testing::InitGoogleTest(&argc, argv);
- ::env = static_cast<smoke_test::SmokeEnvironment*>(
- testing::AddGlobalTestEnvironment(
- new smoke_test::SmokeEnvironment(request_mode)));
- signal(SIGINT, ::signalHandler);
- signal(SIGSEGV, ::signalHandler);
- return RUN_ALL_TESTS();
- } catch (...) {
- std::cout << "Exception occurred during testing";
- return 1;
- }
-}
+++ /dev/null
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include <boost/filesystem/path.hpp>
-
-#include <common/installer_context.h>
-#include <common/utils/glist_range.h>
-#include <common/utils/request.h>
-
-#include <wgt_manifest_handlers/setting_handler.h>
-
-#include <glib.h>
-#include <gtest/gtest.h>
-
-#include <map>
-#include <memory>
-#include <string>
-#include <vector>
-
-#include "wgt/step/configuration/step_parse.h"
-#include "wgt/utils/wgt_backend_data.h"
-
-#define ASSERT_CSTR_EQ(STR1, STR2) \
- ASSERT_EQ(strcmp(STR1, STR2), 0) \
-
-namespace bf = boost::filesystem;
-namespace ci = common_installer;
-
-namespace {
-
-const char kManifestTestcaseData[] =
- "/usr/share/wgt-installer-ut/test_samples/manifest/";
-
-template<typename T>
-gint Size(GListRange<T>* range) {
- return std::distance(range->begin(), range->end());
-}
-
-class StepParseRunner {
- public:
- explicit StepParseRunner(const std::string& dir_suffix,
- bool ignore_start_files = true)
- : dir_suffix_(dir_suffix),
- ignore_start_files_(ignore_start_files),
- context_(nullptr) {
- }
-
- bool Run() {
- PrepareContext();
- wgt::configuration::StepParse step(context_.get(),
- wgt::configuration::StepParse::ConfigLocation::PACKAGE,
- !ignore_start_files_);
- return step.process() == ci::Step::Status::OK;
- }
-
- wgt::WgtBackendData* GetBackendData() const {
- return static_cast<wgt::WgtBackendData*>(context_->backend_data.get());
- }
-
- manifest_x* GetManifest() const {
- return context_->manifest_data.get();
- }
-
- private:
- void PrepareContext() {
- context_.reset(new ci::InstallerContext());
- context_->root_application_path.set(ci::GetRootAppPath(false, getuid()));
- context_->unpacked_dir_path.set(
- bf::path(kManifestTestcaseData) / dir_suffix_);
- context_->backend_data.set(new wgt::WgtBackendData());
- }
-
- std::string dir_suffix_;
- bool ignore_start_files_;
- std::unique_ptr<ci::InstallerContext> context_;
-};
-
-} // namespace
-
-class ManifestTest : public testing::Test {
- public:
- std::string GetMyName() const {
- std::string suite =
- testing::UnitTest::GetInstance()->current_test_info()->test_case_name();
- std::string case_name =
- testing::UnitTest::GetInstance()->current_test_info()->name();
- return suite + '.' + case_name;
- }
-};
-
-TEST_F(ManifestTest, WidgetElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->package, "package0id");
- auto apps = GListRange<application_x*>(m->application);
- ASSERT_EQ(Size(&apps), 1);
- application_x* app = *apps.begin();
- ASSERT_CSTR_EQ(app->appid, "package0id.appid");
-}
-
-TEST_F(ManifestTest, WidgetElement_InvalidNamespace) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, WidgetElement_MissingNamespace) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, WidgetElement_ManyNamespaces) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ApplicationElement_ManyElements) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ApplicationElement_ValidAppId) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto apps = GListRange<application_x*>(m->application);
- application_x* app = *apps.begin();
- ASSERT_NE(app, nullptr);
- ASSERT_CSTR_EQ(app->appid, "package0id.appid");
-}
-
-TEST_F(ManifestTest, ApplicationElement_MissingAppId) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ApplicationElement_InvalidAppId) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ApplicationElement_ValidPackage) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->package, "package0id");
-}
-
-TEST_F(ManifestTest, ApplicationElement_InvalidPackage) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ApplicationElement_MissingPackage) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ApplicationElement_ValidVersion) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- ASSERT_CSTR_EQ(m->api_version, "3.0");
-}
-
-TEST_F(ManifestTest, ApplicationElement_InvalidVersion) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ApplicationElement_MissingVersion) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, PrivilegeElement_ValidName) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- std::vector<std::string> priv_vec;
- for (privilege_x* priv : GListRange<privilege_x*>(m->privileges)) {
- priv_vec.push_back(priv->value);
- }
- ASSERT_FALSE(priv_vec.empty());
- const char* expected_name = "http://tizen.org/privilege/application.launch";
- ASSERT_CSTR_EQ(priv_vec[0].c_str(), expected_name);
-}
-
-TEST_F(ManifestTest, PrivilegeElement_ManyElements) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- std::vector<std::string> priv_vec;
- for (privilege_x* priv : GListRange<privilege_x*>(m->privileges)) {
- priv_vec.push_back(priv->value);
- }
- ASSERT_EQ(priv_vec.size(), 2);
- const char* first_priv = "http://tizen.org/privilege/application.close";
- ASSERT_CSTR_EQ(priv_vec[0].c_str(), first_priv);
- const char* second_priv = "http://tizen.org/privilege/application.launch";
- ASSERT_CSTR_EQ(priv_vec[1].c_str(), second_priv);
-}
-
-TEST_F(ManifestTest, PrivilegeElement_InvalidName) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, PrivilegeElement_MissingName) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegeElement_Invalid_NotURI) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegeElement_Invalid_OverLength) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegeElement_ValidName) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- std::vector<std::string> priv_vec;
- for (appdefined_privilege_x* priv :
- GListRange<appdefined_privilege_x*>(m->appdefined_privileges)) {
- priv_vec.push_back(priv->value);
- }
- ASSERT_FALSE(priv_vec.empty());
- const char* expected_name = "http://package0id/appdefined/test.read";
- ASSERT_CSTR_EQ(priv_vec[0].c_str(), expected_name);
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegeElement_ManyElements) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- std::vector<std::string> priv_vec;
- for (appdefined_privilege_x* priv :
- GListRange<appdefined_privilege_x*>(m->appdefined_privileges)) {
- priv_vec.push_back(priv->value);
- }
- ASSERT_EQ(priv_vec.size(), 2);
- const char* first_priv = "http://package0id/appdefined/test.read";
- ASSERT_CSTR_EQ(priv_vec[0].c_str(), first_priv);
- const char* second_priv = "http://package0id/appdefined/test.write";
- ASSERT_CSTR_EQ(priv_vec[1].c_str(), second_priv);
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegeElement_WithLicenseValidName) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- std::vector<std::string> priv_vec;
- std::vector<std::string> license_vec;
- for (appdefined_privilege_x* priv :
- GListRange<appdefined_privilege_x*>(m->appdefined_privileges)) {
- priv_vec.push_back(priv->value);
- license_vec.push_back(priv->license);
- }
- ASSERT_FALSE(priv_vec.empty());
- const char* expected_name = "http://package0id/appdefined/test.read";
- ASSERT_CSTR_EQ(priv_vec[0].c_str(), expected_name);
- ASSERT_FALSE(license_vec.empty());
- bf::path path(m->root_path);
- path /= "res/cert";
- ASSERT_CSTR_EQ(license_vec[0].c_str(), path.c_str());
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegeElement_WithLicenseManyElements) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- std::vector<std::string> priv_vec;
- std::vector<std::string> license_vec;
- for (appdefined_privilege_x* priv :
- GListRange<appdefined_privilege_x*>(m->appdefined_privileges)) {
- priv_vec.push_back(priv->value);
- license_vec.push_back(priv->license);
- }
- ASSERT_EQ(priv_vec.size(), 2);
- const char* first_priv = "http://package0id/appdefined/test.read";
- ASSERT_CSTR_EQ(priv_vec[0].c_str(), first_priv);
- const char* second_priv = "http://package0id/appdefined/test.write";
- ASSERT_CSTR_EQ(priv_vec[1].c_str(), second_priv);
- ASSERT_EQ(license_vec.size(), 2);
- bf::path path(m->root_path);
- path /= "res/cert";
- ASSERT_CSTR_EQ(license_vec[0].c_str(), path.c_str());
- ASSERT_CSTR_EQ(license_vec[1].c_str(), path.c_str());
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegeElement_InvalidName) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, AppDefinedPrivilegeElement_MissingName) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_Invalid_NotURI) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_Invalid_NoPKGID) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_Invalid_OverLength) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_ValidName) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- std::vector<std::string> priv_vec;
- for (appdefined_privilege_x* priv : GListRange<appdefined_privilege_x*>(
- m->provides_appdefined_privileges)) {
- priv_vec.push_back(priv->value);
- }
- ASSERT_FALSE(priv_vec.empty());
- const char* expected_name = "http://package0id/appdefined/test.read";
- ASSERT_CSTR_EQ(priv_vec[0].c_str(), expected_name);
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_ManyElements) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- std::vector<std::string> priv_vec;
- for (appdefined_privilege_x* priv : GListRange<appdefined_privilege_x*>(
- m->provides_appdefined_privileges)) {
- priv_vec.push_back(priv->value);
- }
- ASSERT_EQ(priv_vec.size(), 2);
- const char* first_priv = "http://package0id/appdefined/test.read";
- ASSERT_CSTR_EQ(priv_vec[0].c_str(), first_priv);
- const char* second_priv = "http://package0id/appdefined/test.write";
- ASSERT_CSTR_EQ(priv_vec[1].c_str(), second_priv);
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_WithLicenseValidName) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- std::vector<std::string> priv_vec;
- std::vector<std::string> license_vec;
- for (appdefined_privilege_x* priv : GListRange<appdefined_privilege_x*>(
- m->provides_appdefined_privileges)) {
- priv_vec.push_back(priv->value);
- license_vec.push_back(priv->license);
- }
- ASSERT_FALSE(priv_vec.empty());
- const char* expected_name = "http://package0id/appdefined/test.read";
- ASSERT_CSTR_EQ(priv_vec[0].c_str(), expected_name);
- ASSERT_FALSE(license_vec.empty());
- bf::path path(m->root_path);
- path /= "res/cert";
- ASSERT_CSTR_EQ(license_vec[0].c_str(), path.c_str());
-}
-
-TEST_F(ManifestTest,
- ProvidesAppDefinedPrivilegeElement_WithLicenseManyElements) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- std::vector<std::string> priv_vec;
- std::vector<std::string> license_vec;
- for (appdefined_privilege_x* priv : GListRange<appdefined_privilege_x*>(
- m->provides_appdefined_privileges)) {
- priv_vec.push_back(priv->value);
- license_vec.push_back(priv->license);
- }
- ASSERT_EQ(priv_vec.size(), 2);
- const char* first_priv = "http://package0id/appdefined/test.read";
- ASSERT_CSTR_EQ(priv_vec[0].c_str(), first_priv);
- const char* second_priv = "http://package0id/appdefined/test.write";
- ASSERT_CSTR_EQ(priv_vec[1].c_str(), second_priv);
- ASSERT_EQ(license_vec.size(), 2);
- bf::path path(m->root_path);
- path /= "res/cert";
- ASSERT_CSTR_EQ(license_vec[0].c_str(), path.c_str());
- ASSERT_CSTR_EQ(license_vec[1].c_str(), path.c_str());
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_InvalidName) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_MissingName) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, AppControlElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto apps = GListRange<application_x*>(m->application);
- application_x* app = *apps.begin();
- ASSERT_NE(app, nullptr);
- std::vector<appcontrol_x*> app_controls;
- for (appcontrol_x* app_control : GListRange<appcontrol_x*>(app->appcontrol)) {
- app_controls.push_back(app_control);
- }
- ASSERT_EQ(app_controls.size(), 1);
- ASSERT_CSTR_EQ(app_controls[0]->mime, "image/jpg");
- ASSERT_CSTR_EQ(app_controls[0]->operation,
- "http://tizen.org/appcontrol/operation/edit");
- ASSERT_CSTR_EQ(app_controls[0]->uri, "myapp");
-}
-
-TEST_F(ManifestTest, AppControlElement_MissingMIME) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto apps = GListRange<application_x*>(m->application);
- application_x* app = *apps.begin();
- ASSERT_NE(app, nullptr);
- std::vector<appcontrol_x*> app_controls;
- for (appcontrol_x* app_control : GListRange<appcontrol_x*>(app->appcontrol)) {
- app_controls.push_back(app_control);
- }
- ASSERT_CSTR_EQ(app_controls[0]->mime, "");
-}
-
-TEST_F(ManifestTest, AppControlElement_MissingOperation) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, AppControlElement_MissingSrc) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, AppControlElement_MissingURI) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto apps = GListRange<application_x*>(m->application);
- application_x* app = *apps.begin();
- ASSERT_NE(app, nullptr);
- std::vector<appcontrol_x*> app_controls;
- for (appcontrol_x* app_control : GListRange<appcontrol_x*>(app->appcontrol)) {
- app_controls.push_back(app_control);
- }
- ASSERT_CSTR_EQ(app_controls[0]->uri, "");
-}
-
-TEST_F(ManifestTest, SettingsElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
-
- ASSERT_EQ(settings.background_support_enabled(), true);
- ASSERT_EQ(settings.context_menu_enabled(), false);
- ASSERT_EQ(settings.encryption_enabled(), true);
- ASSERT_EQ(settings.screen_orientation(),
- wgt::parse::SettingInfo::ScreenOrientation::LANDSCAPE);
- ASSERT_EQ(settings.install_location(),
- wgt::parse::SettingInfo::InstallLocation::INTERNAL);
- ASSERT_EQ(settings.hwkey_enabled(), true);
- ASSERT_EQ(settings.background_vibration(), true);
-}
-
-TEST_F(ManifestTest, SettingsElement_BackgroundSupportEnabled) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.background_support_enabled(), true);
-}
-
-TEST_F(ManifestTest, SettingsElement_BackgroundSupportDisabled) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.background_support_enabled(), false);
-}
-
-TEST_F(ManifestTest, SettingsElement_MissingBackgroundSupport) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.background_support_enabled(), false);
-}
-
-TEST_F(ManifestTest, SettingsElement_BackgroundVibrationEnabled) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.background_vibration(), true);
-}
-
-TEST_F(ManifestTest, SettingsElement_BackgroundVibrationDisabled) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.background_vibration(), false);
-}
-
-TEST_F(ManifestTest, SettingsElement_MissingBackgroundVibration) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.background_vibration(), false);
-}
-
-TEST_F(ManifestTest, SettingsElement_ContextMenuEnabled) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.context_menu_enabled(), true);
-}
-
-TEST_F(ManifestTest, SettingsElement_ContextMenuDisabled) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.context_menu_enabled(), false);
-}
-
-TEST_F(ManifestTest, SettingsElement_MissingContextMenu) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.context_menu_enabled(), true);
-}
-
-TEST_F(ManifestTest, SettingsElement_EncryptionEnabled) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.encryption_enabled(), true);
-}
-
-TEST_F(ManifestTest, SettingsElement_EncryptionDisabled) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.encryption_enabled(), false);
-}
-
-TEST_F(ManifestTest, SettingsElement_MissingEncryption) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.encryption_enabled(), false);
-}
-
-TEST_F(ManifestTest, SettingsElement_HwKeyEnabled) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.hwkey_enabled(), true);
-}
-
-TEST_F(ManifestTest, SettingsElement_HwKeyDisabled) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.hwkey_enabled(), false);
-}
-
-TEST_F(ManifestTest, SettingsElement_MissingHwKeyEvent) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.hwkey_enabled(), true);
-}
-
-TEST_F(ManifestTest, SettingsElement_MissingInstallLocation) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.install_location(),
- wgt::parse::SettingInfo::InstallLocation::AUTO);
-}
-
-TEST_F(ManifestTest, SettingsElement_MissingScreenOrientation) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto backend_data = runner.GetBackendData();
- auto settings = backend_data->settings.get();
- ASSERT_EQ(settings.screen_orientation(),
- wgt::parse::SettingInfo::ScreenOrientation::AUTO);
-}
-
-TEST_F(ManifestTest, MetadataElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto apps = GListRange<application_x*>(m->application);
- application_x* app = *apps.begin();
-
- std::map<std::string, std::string> meta_data_map;
- for (metadata_x* meta_data : GListRange<metadata_x*>(app->metadata)) {
- if (meta_data->value)
- meta_data_map[meta_data->key] = meta_data->value;
- else
- meta_data_map[meta_data->key] = std::string();
- }
- ASSERT_EQ(meta_data_map.size(), 2);
- ASSERT_CSTR_EQ(meta_data_map["key1"].c_str(), "");
- ASSERT_CSTR_EQ(meta_data_map["key2"].c_str(), "value2");
-}
-
-TEST_F(ManifestTest, MetadataElement_DuplicateKey) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto apps = GListRange<application_x*>(m->application);
- application_x* app = *apps.begin();
-
- std::map<std::string, std::string> meta_data_map;
- for (metadata_x* meta_data : GListRange<metadata_x*>(app->metadata)) {
- meta_data_map[meta_data->key] = meta_data->value;
- }
- ASSERT_EQ(meta_data_map.size(), 2);
- ASSERT_CSTR_EQ(meta_data_map["key1"].c_str(), "key1value");
- ASSERT_CSTR_EQ(meta_data_map["key2"].c_str(), "key2value");
-}
-
-TEST_F(ManifestTest, MetadataElement_MissingValue) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto apps = GListRange<application_x*>(m->application);
- application_x* app = *apps.begin();
-
- std::map<std::string, std::string> meta_data_map;
- for (metadata_x* meta_data : GListRange<metadata_x*>(app->metadata)) {
- if (meta_data->value)
- meta_data_map[meta_data->key] = meta_data->value;
- else
- meta_data_map[meta_data->key] = std::string();
- }
- ASSERT_EQ(meta_data_map.size(), 2);
- ASSERT_CSTR_EQ(meta_data_map["key1"].c_str(), "");
- ASSERT_CSTR_EQ(meta_data_map["key2"].c_str(), "");
-}
-
-TEST_F(ManifestTest, MetadataElement_MissingKey) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, CategoryElement_Valid) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto apps = GListRange<application_x*>(m->application);
- application_x* app = *apps.begin();
-
- std::vector<std::string> categories;
- for (const char* category : GListRange<char*>(app->category)) {
- categories.push_back(category);
- }
- ASSERT_EQ(categories.size(), 1);
- ASSERT_CSTR_EQ(categories[0].c_str(),
- "http://tizen.org/category/wearable_clock");
-}
-
-TEST_F(ManifestTest, CategoryElement_MissingName) {
- StepParseRunner runner(GetMyName());
- ASSERT_FALSE(runner.Run());
-}
-
-TEST_F(ManifestTest, CategoryElement_MultipleElements) {
- StepParseRunner runner(GetMyName());
- ASSERT_TRUE(runner.Run());
- manifest_x* m = runner.GetManifest();
- ASSERT_NE(m, nullptr);
- auto apps = GListRange<application_x*>(m->application);
- application_x* app = *apps.begin();
-
- std::vector<std::string> categories;
- for (const char* category : GListRange<char*>(app->category)) {
- categories.push_back(category);
- }
- ASSERT_EQ(categories.size(), 3);
- ASSERT_CSTR_EQ(categories[0].c_str(),
- "http://tizen.org/category/category_0");
- ASSERT_CSTR_EQ(categories[1].c_str(),
- "http://tizen.org/category/category_1");
- ASSERT_CSTR_EQ(categories[2].c_str(),
- "http://tizen.org/category/category_2");
-}
+++ /dev/null
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include <gtest/gtest-death-test.h>
-
-#include <common/utils/subprocess.h>
-#include <common/utils/file_util.h>
-#include <common/utils/pkgmgr_query.h>
-#include <unit_tests/common/smoke_utils.h>
-
-#include <memory>
-
-#include "unit_tests/wgt_smoke_utils.h"
-
-namespace st = smoke_test;
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
-namespace ci = common_installer;
-namespace bo = boost::program_options;
-
-namespace smoke_test {
-
-class SmokeEnvironment : public testing::Environment {
- public:
- explicit SmokeEnvironment(ci::RequestMode mode) {\
- request_mode_ = mode;
- }
- void SetUp() override {
- if (request_mode_ == ci::RequestMode::USER)
- ASSERT_TRUE(AddTestUser(&test_user));
- backups_ = SetupBackupDirectories(test_user.uid);
- for (auto& path : backups_)
- ASSERT_TRUE(BackupPath(path));
- }
- void TearDown() override {
- ASSERT_TRUE(request_mode_ == ci::RequestMode::GLOBAL ||
- (request_mode_ == ci::RequestMode::USER &&
- kGlobalUserUid != test_user.uid));
- WgtBackendInterface backend(std::to_string(test_user.uid));
- UninstallAllSmokeApps(request_mode_, test_user.uid, &backend);
- for (auto& path : backups_)
- ASSERT_TRUE(RestorePath(path));
- if (request_mode_ == ci::RequestMode::USER)
- ASSERT_TRUE(DeleteTestUser());
- }
- User test_user;
-
- private:
- ci::RequestMode request_mode_;
- std::vector<bf::path> backups_;
-};
-
-} // namespace smoke_test
-
-namespace {
-
-smoke_test::SmokeEnvironment* env = nullptr;
-void signalHandler(int signum) {
- env->TearDown();
- exit(signum);
-}
-
-} // namespace
-
-namespace smoke_test {
-
-class SmokeTest : public testing::Test {
- public:
- SmokeTest() : backend(std::to_string(env->test_user.uid)),
- params{PackageType::WGT, false} {
- params.test_user.uid = env->test_user.uid;
- params.test_user.gid = env->test_user.gid;
- }
- protected:
- WgtBackendInterface backend;
- TestParameters params;
-};
-
-class RollbackSmokeTest : public testing::Test {
- public:
- RollbackSmokeTest() : backend(std::to_string(env->test_user.uid),
- RequestResult::FAIL), params{PackageType::WGT, false} {
- params.test_user.uid = env->test_user.uid;
- params.test_user.gid = env->test_user.gid;
- }
- protected:
- WgtBackendInterface backend;
- TestParameters params;
-};
-
-class HybridSmokeTest : public testing::Test {
- public:
- HybridSmokeTest() : backend(std::to_string(env->test_user.uid)),
- params{PackageType::HYBRID, false} {
- params.test_user.uid = env->test_user.uid;
- params.test_user.gid = env->test_user.gid;
- }
- protected:
- HybridBackendInterface backend;
- TestParameters params;
-};
-
-class RollbackHybridSmokeTest : public testing::Test {
- public:
- RollbackHybridSmokeTest() : backend(std::to_string(env->test_user.uid),
- RequestResult::FAIL), params{PackageType::HYBRID, false} {
- params.test_user.uid = env->test_user.uid;
- params.test_user.gid = env->test_user.gid;
- }
- protected:
- HybridBackendInterface backend;
- TestParameters params;
-};
-
-class PreloadSmokeTest : public testing::Test {
- public:
- PreloadSmokeTest() : backend(std::to_string(env->test_user.uid)),
- params{PackageType::WGT, true} {
- params.test_user.uid = env->test_user.uid;
- params.test_user.gid = env->test_user.gid;
- }
- protected:
- WgtBackendInterface backend;
- TestParameters params;
-};
-
-class HybridPreloadSmokeTest : public testing::Test {
- public:
- HybridPreloadSmokeTest() : backend(std::to_string(env->test_user.uid)),
- params{PackageType::HYBRID, true} {
- params.test_user.uid = env->test_user.uid;
- params.test_user.gid = env->test_user.gid;
- }
- protected:
- HybridBackendInterface backend;
- TestParameters params;
-};
-
-TEST_F(SmokeTest, InstallationMode) {
- bf::path path = kSmokePackagesDirectory / "InstallationMode.wgt";
- std::string pkgid = "smokewgt03";
- std::string appid = "smokewgt03.InstallationMode";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-}
-
-TEST_F(SmokeTest, UpdateMode) {
- bf::path path_old = kSmokePackagesDirectory / "UpdateMode.wgt";
- bf::path path_new = kSmokePackagesDirectory / "UpdateMode_2.wgt";
- std::string pkgid = "smokewgt04";
- std::string appid = "smokewgt04.UpdateMode";
- ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- ASSERT_EQ(backend.Install(path_new), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "2\n",
- params));
- ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
-}
-
-TEST_F(SmokeTest, DeinstallationMode) {
- bf::path path = kSmokePackagesDirectory / "DeinstallationMode.wgt";
- std::string pkgid = "smokewgt05";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Uninstall(pkgid), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-}
-
-TEST_F(SmokeTest, RDSMode) {
- bf::path path = kSmokePackagesDirectory / "RDSMode.wgt";
- std::string pkgid = "smokewgt11";
- std::string appid = "smokewgt11.RDSMode";
- bf::path delta_directory = kSmokePackagesDirectory / "delta_dir";
- bf::path sdk_expected_directory = kSdkDirectory / "tmp" / pkgid;
- ASSERT_TRUE(ci::CopyDir(delta_directory, sdk_expected_directory));
- ASSERT_EQ(backend.RDSUpdate(path, pkgid),
- ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
- // Check delta modifications
- ASSERT_FALSE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
- "res" / "wgt" / "DELETED"));
- ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
- "res" / "wgt" / "ADDED"));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED", "2\n",
- params));
-}
-
-TEST_F(SmokeTest, EnablePkg) {
- bf::path path = kSmokePackagesDirectory / "EnablePkg.wgt";
- std::string pkgid = "smokewgt22";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.DisablePackage(pkgid), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.EnablePackage(pkgid), ci::AppInstaller::Result::OK);
-
- ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
- ASSERT_TRUE(pkg_query.IsPackageInstalled(
- ci::GetRequestMode(params.test_user.uid)));
-}
-
-TEST_F(SmokeTest, DisablePkg) {
- bf::path path = kSmokePackagesDirectory / "DisablePkg.wgt";
- std::string pkgid = "smokewgt21";
- std::string appid = "smokewgt21.DisablePkg";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.DisablePackage(pkgid), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ci::QueryIsDisabledPackage(pkgid, params.test_user.uid));
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-}
-
-TEST_F(SmokeTest, DeltaMode) {
- bf::path path = kSmokePackagesDirectory / "DeltaMode.wgt";
- bf::path delta_package = kSmokePackagesDirectory / "DeltaMode.delta";
- std::string pkgid = "smokewgt17";
- std::string appid = "smokewgt17.DeltaMode";
- ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Install(delta_package), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-
- // Check delta modifications
- ASSERT_FALSE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
- "res" / "wgt" / "DELETED"));
- ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
- "res" / "wgt" / "ADDED"));
- ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
- "res" / "wgt" / "css" / "style.css"));
- ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
- "res" / "wgt" / "images" / "tizen_32.png"));
- ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
- "res" / "wgt" / "js" / "main.js"));
- ASSERT_TRUE(ValidateFileContentInPackage(
- pkgid, "res/wgt/MODIFIED", "version 2\n", params));
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForInstallation) {
- bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForInstallation.wgt";
- ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
- std::string test_uid_str = std::to_string(params.test_user.uid);
- backend_crash.Run("-i", path.string(), "-u", test_uid_str.c_str());
- ASSERT_NE(backend_crash.Wait(), 0);
-
- std::string pkgid = "smokewgt09";
- bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
- params.test_user.uid);
- ASSERT_FALSE(recovery_file.empty());
- ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForUpdate) {
- bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForUpdate.wgt";
- bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForUpdate_2.wgt";
- RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
- std::string pkgid = "smokewgt10";
- std::string appid = "smokewgt10.RecoveryModeForUpdate";
- AddDataFiles(pkgid, params.test_user.uid);
- ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
- std::string test_uid_str = std::to_string(params.test_user.uid);
- backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
- ASSERT_NE(backend_crash.Wait(), 0);
-
- bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
- params.test_user.uid);
- ASSERT_FALSE(recovery_file.empty());
- ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n",
- params));
- ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForDelta) {
- bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForDelta.wgt";
- bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
- RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
- ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
- std::string test_uid_str = std::to_string(params.test_user.uid);
- backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
- ASSERT_NE(backend_crash.Wait(), 0);
-
- std::string pkgid = "smokewgt30";
- std::string appid = "smokewgt30.RecoveryModeForDelta";
- bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
- params.test_user.uid);
- ASSERT_FALSE(recovery_file.empty());
- ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n",
- params));
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
- bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForMountInstall.wgt";
- RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
- std::string test_uid_str = std::to_string(params.test_user.uid);
- backend_crash.Run("-w", path.string(), "-u", test_uid_str.c_str());
- ASSERT_NE(backend_crash.Wait(), 0);
-
- std::string pkgid = "smokewgt31";
- bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
- params.test_user.uid);
- ASSERT_FALSE(recovery_file.empty());
- ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-}
-
-TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
- bf::path path_old =
- kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate.wgt";
- bf::path path_new =
- kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate_2.wgt";
- std::string pkgid = "smokewgt32";
- std::string appid = "smokewgt32.RecoveryModeForMountUpdate";
- RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- ASSERT_EQ(backend.MountInstallSuccess(path_old),
- ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
- std::string test_uid_str = std::to_string(params.test_user.uid);
- backend_crash.Run("-w", path_new.string(), "-u", test_uid_str.c_str());
- ASSERT_NE(backend_crash.Wait(), 0);
-
- // Filesystem may be mounted after crash
- ScopedTzipInterface poweroff_unmount_interface(pkgid, params.test_user.uid);
- poweroff_unmount_interface.Release();
-
- bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
- params.test_user.uid);
- ASSERT_FALSE(recovery_file.empty());
- ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
-
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n",
- params));
- ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
-}
-
-TEST_F(SmokeTest, InstallationMode_GoodSignature) {
- // pkgid: smokewgt08
- bf::path path = kSmokePackagesDirectory / "InstallationMode_GoodSignature.wgt"; // NOLINT
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
-}
-
-TEST_F(SmokeTest, InstallationMode_WrongSignature) {
- // pkgid: smokewgt12
- bf::path path = kSmokePackagesDirectory / "InstallationMode_WrongSignature.wgt"; // NOLINT
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::ERROR);
-}
-
-TEST_F(RollbackSmokeTest, InstallationMode) {
- bf::path path = kSmokePackagesDirectory / "InstallationMode_Rollback.wgt";
- std::string pkgid = "smokewgt06";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::ERROR);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-}
-
-TEST_F(RollbackSmokeTest, UpdateMode) {
- bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Rollback.wgt";
- bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Rollback_2.wgt";
- std::string pkgid = "smokewgt07";
- std::string appid = "smokewgt07.UpdateModeRollback";
- ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- ASSERT_EQ(backend.Install(path_new), ci::AppInstaller::Result::ERROR);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n",
- params));
- ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
-}
-
-TEST_F(RollbackSmokeTest, DeltaMode) {
- bf::path path = kSmokePackagesDirectory / "DeltaMode_Rollback.wgt";
- bf::path delta_package = kSmokePackagesDirectory / "DeltaMode_Rollback.delta";
- std::string pkgid = "smokewgt01";
- std::string appid = "smokewgt01.DeltaMode";
- ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- ASSERT_EQ(backend.Install(delta_package), ci::AppInstaller::Result::ERROR);
-
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED",
- "version 1\n", params));
- ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
- ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
- "res/wgt/DELETED"));
- ASSERT_FALSE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
- "res/wgt/ADDED"));
-}
-
-TEST_F(HybridSmokeTest, InstallationMode) {
- bf::path path = kSmokePackagesDirectory / "InstallationMode_Hybrid.wgt";
- std::string pkgid = "smokehyb01";
- // Excutable for native app doesn't create symlink
- std::string appid1 = "smokehyb01.Web";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
-}
-
-TEST_F(HybridSmokeTest, UpdateMode) {
- bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Hybrid.wgt";
- bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Hybrid_2.wgt";
- std::string pkgid = "smokehyb02";
- std::string appid1 = "smokehyb02.Web";
- ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- ASSERT_EQ(backend.Install(path_new),
- ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "2\n",
- params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "VERSION", "2\n", params));
- ValidateDataFiles(pkgid, params.test_user.uid);
-}
-
-TEST_F(HybridSmokeTest, DeinstallationMode) {
- bf::path path = kSmokePackagesDirectory / "DeinstallationMode_Hybrid.wgt";
- std::string pkgid = "smokehyb03";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Uninstall(pkgid), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-}
-
-TEST_F(HybridSmokeTest, DeltaMode) {
- bf::path path = kSmokePackagesDirectory / "DeltaMode_Hybrid.wgt";
- bf::path delta_package = kSmokePackagesDirectory / "DeltaMode_Hybrid.delta";
- std::string pkgid = "smokehyb04";
- std::string appid1 = "smokehyb04.Web";
- ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Install(delta_package), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
-
- // Check delta modifications
- bf::path root_path = ci::GetRootAppPath(false, params.test_user.uid);
- ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "wgt" / "DELETED"));
- ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "wgt" / "ADDED"));
- ASSERT_FALSE(bf::exists(root_path / pkgid / "lib" / "DELETED"));
- ASSERT_TRUE(bf::exists(root_path / pkgid / "lib" / "ADDED"));
- ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "wgt" / "css" / "style.css")); // NOLINT
- ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "wgt" / "images" / "tizen_32.png")); // NOLINT
- ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "wgt" / "js" / "main.js"));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED", "version 2\n", params)); // NOLINT
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "lib/MODIFIED", "version 2\n", params)); // NOLINT
-}
-
-TEST_F(HybridSmokeTest, MountInstallationMode) {
- bf::path path = kSmokePackagesDirectory / "MountInstallationMode_Hybrid.wgt";
- std::string pkgid = "smokehyb05";
- std::string appid1 = "smokehyb05.web";
- ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::OK);
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
-}
-
-TEST_F(HybridSmokeTest, MountUpdateMode) {
- bf::path path_old = kSmokePackagesDirectory / "MountUpdateMode_Hybrid.wgt";
- bf::path path_new = kSmokePackagesDirectory / "MountUpdateMode_Hybrid_2.wgt";
- std::string pkgid = "smokehyb06";
- std::string appid1 = "smokehyb06.web";
- ASSERT_EQ(backend.MountInstallSuccess(path_old),
- ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- ASSERT_EQ(backend.MountInstall(path_new), ci::AppInstaller::Result::OK);
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "2\n",
- params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "lib/VERSION", "2\n",
- params));
- ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
-}
-
-TEST_F(RollbackHybridSmokeTest, InstallationMode) {
- bf::path path = kSmokePackagesDirectory /
- "InstallationMode_Rollback_Hybrid.wgt";
- std::string pkgid = "smokehyb07";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::ERROR);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-}
-
-TEST_F(RollbackHybridSmokeTest, UpdateMode) {
- bf::path path_old = kSmokePackagesDirectory /
- "UpdateMode_Rollback_Hybrid.wgt";
- bf::path path_new = kSmokePackagesDirectory /
- "UpdateMode_Rollback_Hybrid_2.wgt";
- std::string pkgid = "smokehyb08";
- std::string appid1 = "smokehyb08.web";
- ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- ASSERT_EQ(backend.Install(path_new), ci::AppInstaller::Result::ERROR);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n",
- params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "lib/VERSION", "1\n",
- params));
- ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
-}
-
-TEST_F(RollbackHybridSmokeTest, DeltaMode) {
- bf::path path = kSmokePackagesDirectory / "DeltaMode_Rollback_Hybrid.wgt";
- bf::path delta_package = kSmokePackagesDirectory /
- "DeltaMode_Rollback_Hybrid.delta";
- std::string pkgid = "smokehyb11";
- std::string appid1 = "smokehyb11.web";
- ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- ASSERT_EQ(backend.Install(delta_package),
- ci::AppInstaller::Result::ERROR);
-
- ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
- // Check delta modifications
- bf::path root_path = GetPackageRoot(pkgid, params.test_user.uid);
- ASSERT_TRUE(bf::exists(root_path / "res" / "wgt" / "DELETED"));
- ASSERT_FALSE(bf::exists(root_path / "res" / "wgt" / "ADDED"));
- ASSERT_TRUE(bf::exists(root_path / "lib" / "DELETED"));
- ASSERT_FALSE(bf::exists(root_path / "lib" / "ADDED"));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED",
- "version 1\n", params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "lib/MODIFIED",
- "version 1\n", params));
- ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
-}
-
-TEST_F(RollbackHybridSmokeTest, MountInstallationMode) {
- bf::path path = kSmokePackagesDirectory /
- "MountInstallationMode_Rollback_Hybrid.wgt";
- std::string pkgid = "smokehyb09";
- ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::ERROR);
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-}
-
-TEST_F(RollbackHybridSmokeTest, MountUpdateMode) {
- bf::path path_old = kSmokePackagesDirectory /
- "MountUpdateMode_Rollback_Hybrid.wgt";
- bf::path path_new = kSmokePackagesDirectory /
- "MountUpdateMode_Rollback_Hybrid_2.wgt";
- std::string pkgid = "smokehyb10";
- std::string appid1 = "smokehyb10.web";
- ASSERT_EQ(backend.MountInstallSuccess(path_old),
- ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- ASSERT_EQ(backend.MountInstall(path_new), ci::AppInstaller::Result::ERROR);
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n",
- params));
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "lib/VERSION", "1\n",
- params));
- ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
-}
-
-TEST_F(SmokeTest, MountInstallationMode) {
- bf::path path = kSmokePackagesDirectory / "MountInstallationMode.wgt";
- std::string pkgid = "smokewgt28";
- std::string appid = "smokewgt28.InstallationMode";
- ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::OK);
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-}
-
-TEST_F(SmokeTest, MountUpdateMode) {
- bf::path path_old = kSmokePackagesDirectory / "MountUpdateMode.wgt";
- bf::path path_new = kSmokePackagesDirectory / "MountUpdateMode_2.wgt";
- std::string pkgid = "smokewgt29";
- std::string appid = "smokewgt29.UpdateMode";
- ASSERT_EQ(backend.MountInstallSuccess(path_old),
- ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- ASSERT_EQ(backend.MountInstall(path_new), ci::AppInstaller::Result::OK);
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "2\n",
- params));
- ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
-}
-
-TEST_F(RollbackSmokeTest, MountInstallationMode) {
- bf::path path =
- kSmokePackagesDirectory / "MountInstallationMode_Rollback.wgt";
- std::string pkgid = "smokewgt33";
- ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::ERROR);
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-}
-
-TEST_F(RollbackSmokeTest, MountUpdateMode) {
- bf::path path_old = kSmokePackagesDirectory / "MountUpdateMode_Rollback.wgt";
- bf::path path_new =
- kSmokePackagesDirectory / "MountUpdateMode_Rollback_2.wgt";
- std::string pkgid = "smokewgt34";
- std::string appid = "smokewgt34.web";
- ASSERT_EQ(backend.MountInstallSuccess(path_old),
- ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- ASSERT_EQ(backend.MountInstall(path_new), ci::AppInstaller::Result::ERROR);
- ScopedTzipInterface interface(pkgid, params.test_user.uid);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n",
- params));
- ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
-}
-
-TEST_F(SmokeTest, UserDefinedPlugins) {
- bf::path path = kSmokePackagesDirectory / "SimpleEchoPrivilege.wgt";
- std::string pkgid = "smokewgt02";
- std::string appid = "smokewgt02.SimpleEcho";
- std::string call_privilege = "http://tizen.org/privilege/call";
- std::string location_privilege = "http://tizen.org/privilege/location";
- std::string power_privilege = "http://tizen.org/privilege/power";
-
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
- std::vector<std::string> res;
- ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
- ASSERT_TRUE(pkg_query.PrivilegesForPkgId(&res));
- ASSERT_TRUE(std::find(res.begin(), res.end(), call_privilege) != res.end());
- ASSERT_TRUE(std::find(res.begin(), res.end(), location_privilege)
- != res.end());
- ASSERT_TRUE(std::find(res.begin(), res.end(), power_privilege) != res.end());
-}
-
-TEST_F(SmokeTest, InstallExternalMode) {
- ASSERT_TRUE(CheckAvailableExternalPath());
- bf::path path = kSmokePackagesDirectory / "InstallExternalMode.wgt";
- std::string pkgid = "smokewgt35";
- std::string appid = "smokewgt35.web";
- ASSERT_EQ(backend.InstallWithStorage(path, StorageType::EXTERNAL),
- ci::AppInstaller::Result::OK);
- ValidateExternalPackage(pkgid, {appid}, params);
-}
-
-TEST_F(SmokeTest, MigrateLegacyExternalImageMode) {
- ASSERT_TRUE(CheckAvailableExternalPath());
- bf::path path =
- kSmokePackagesDirectory / "MigrateLegacyExternalImageMode.wgt";
- std::string pkgid = "smokewgt36";
- std::string appid = "smokewgt36.web";
- bf::path legacy_path = kSmokePackagesDirectory / kLegacyExtImageDir;
- std::string test_uid_str = std::to_string(params.test_user.uid);
- if (test_uid_str == kDefaultUserIdStr ||
- params.test_user.uid == kGlobalUserUid) {
- ASSERT_EQ(backend.MigrateLegacyExternalImage(pkgid, path, legacy_path),
- ci::AppInstaller::Result::OK);
- ValidateExternalPackage(pkgid, {appid}, params);
- } else {
- ASSERT_EQ(backend.MigrateLegacyExternalImage(pkgid, path, legacy_path),
- ci::AppInstaller::Result::ERROR);
- }
-}
-
-TEST_F(PreloadSmokeTest, InstallationMode) {
- ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
- bf::path path = kSmokePackagesDirectory / "InstallationMode_Preload.wgt";
- std::string pkgid = "smokewgt37";
- std::string appid = "smokewgt37.InstallationModePreload";
- ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-}
-
-TEST_F(PreloadSmokeTest, UpdateMode) {
- ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
- bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Preload.wgt";
- bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Preload2.wgt";
- std::string pkgid = "smokewgt38";
- std::string appid = "smokewgt38.UpdateModePreload";
- ASSERT_EQ(backend.InstallPreload(path_old), ci::AppInstaller::Result::OK);
- AddDataFiles(pkgid, params.test_user.uid);
- ASSERT_EQ(backend.InstallPreload(path_new), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-
- ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "2",
- params));
- ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
-}
-
-TEST_F(PreloadSmokeTest, DeinstallationMode) {
- ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
- bf::path path = kSmokePackagesDirectory / "DeinstallationMode_Preload.wgt";
- std::string pkgid = "smokewgt39";
- ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.UninstallPreload(pkgid), ci::AppInstaller::Result::OK);
- CheckPackageReadonlyNonExistance(pkgid, params);
-}
-
-TEST_F(SmokeTest, ManifestDirectInstallMode) {
- ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
- bf::path src_path = kSmokePackagesDirectory / "ManifestDirectInstallMode";
- std::string pkgid = "smokewgt40";
- std::string appid = "smokewgt40.ManifestDirectInstallMode";
- bf::path pkg_path = ci::GetRootAppPath(false, params.test_user.uid);
-
- ci::CopyDir(src_path / pkgid, pkg_path / pkgid);
- ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
- ASSERT_FALSE(pkg_query.IsPackageInstalled(
- ci::GetRequestMode(params.test_user.uid)));
- ASSERT_EQ(backend.ManifestDirectInstall(pkgid),
- ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-}
-
-TEST_F(SmokeTest, ManifestDirectUpdateMode) {
- bf::path path = kSmokePackagesDirectory / "ManifestDirectUpdateMode.wgt";
- std::string pkgid = "smokewgt41";
- std::string appid = "smokewgt41.ManifestDirectUpdateMode";
-
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- int install_time = GetAppInstalledTime(appid.c_str(), params.test_user.uid);
- ASSERT_EQ(backend.ManifestDirectInstall(pkgid),
- ci::AppInstaller::Result::OK);
- ASSERT_TRUE(GetAppInstalledTime(appid.c_str(),
- params.test_user.uid) > install_time)
- << "Package is not updated (app installed time didn't change).";
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-}
-
-TEST_F(PreloadSmokeTest, ReadonlyUpdateInstallMode) {
- ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
- bf::path path = kSmokePackagesDirectory / "ReadonlyUpdateInstallMode.wgt";
- std::string pkgid = "smokewgt42";
- std::string appid = "smokewgt42.ReadonlyUpdateInstallMode";
-
- ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-}
-
-TEST_F(PreloadSmokeTest, ReadonlyUpdateUninstallMode) {
- ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
- bf::path path = kSmokePackagesDirectory / "ReadonlyUpdateUninstallMode.wgt";
- std::string pkgid = "smokewgt43";
- std::string appid = "smokewgt43.ReadonlyUpdateUninstallMode";
-
- ASSERT_EQ(backend.InstallPreload(path),
- ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
- ASSERT_EQ(backend.Uninstall(pkgid), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-}
-
-TEST_F(HybridSmokeTest, ManifestDirectInstallMode) {
- ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
- bf::path src_path = kSmokePackagesDirectory /
- "ManifestDirectInstallMode_Hybrid";
- std::string pkgid = "smokehyb12";
- std::string appid = "smokehyb12.ManifestDirectInstallModeHybrid";
- bf::path pkg_path = ci::GetRootAppPath(false, params.test_user.uid);
-
- ci::CopyDir(src_path / pkgid, pkg_path / pkgid);
- ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
- ASSERT_FALSE(pkg_query.IsPackageInstalled(
- ci::GetRequestMode(params.test_user.uid)));
- ASSERT_EQ(backend.ManifestDirectInstall(pkgid),
- ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-}
-
-TEST_F(HybridSmokeTest, ManifestDirectUpdateMode) {
- bf::path path = kSmokePackagesDirectory /
- "ManifestDirectUpdateMode_Hybrid.wgt";
- std::string pkgid = "smokehyb13";
- std::string appid = "smokehyb13.ManifestDirectUpdateModeHybrid";
-
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- int install_time = GetAppInstalledTime(appid.c_str(), params.test_user.uid);
- ASSERT_EQ(backend.ManifestDirectInstall(pkgid), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(GetAppInstalledTime(appid.c_str(),
- params.test_user.uid) > install_time)
- << "Package is not updated (app installed time didn't change).";
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
-}
-
-TEST_F(SmokeTest, SharedRes24) {
- bf::path path = kSmokePackagesDirectory / "SharedRes24.wgt";
- std::string pkgid = "smokeSh2xx";
- std::string appid = "smokeSh2xx.SharedRes24";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ValidatePackage(pkgid, {appid}, params);
- bf::path root_path = ci::GetRootAppPath(false, params.test_user.uid);
- ASSERT_TRUE(bf::is_regular_file(root_path / pkgid / "res" / "wgt" / "shared" / "res" / "NOT-SHARED-WGT")); // NOLINT
- ASSERT_FALSE(bf::exists(root_path / pkgid / "shared" / "res" / "NOT-SHARED-WGT")); // NOLINT
-}
-
-TEST_F(SmokeTest, SharedRes30) {
- bf::path path = kSmokePackagesDirectory / "SharedRes30.wgt";
- std::string pkgid = "smokeSh3xx";
- std::string appid = "smokeSh3xx.SharedRes30";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
- bf::path root_path = ci::GetRootAppPath(false, params.test_user.uid);
- ASSERT_TRUE(bf::is_symlink(root_path / pkgid / "res" / "wgt" / "shared" / "res" / "SHARED-WGT")); // NOLINT
- ASSERT_TRUE(bf::is_regular_file(root_path / pkgid / "shared" / "res" / "SHARED-WGT")); // NOLINT
-}
-
-TEST_F(SmokeTest, SharedRes30Delta) {
- bf::path path = kSmokePackagesDirectory / "SharedRes30Delta.wgt";
- bf::path delta_package = kSmokePackagesDirectory / "SharedRes30Delta.delta";
- std::string pkgid = "smokeSh3De";
- std::string appid = "smokeSh3De.SharedRes30Delta";
- ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Install(delta_package), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
- // Check delta modifications
- bf::path root_path = ci::GetRootAppPath(false, params.test_user.uid);
- ASSERT_TRUE(bf::is_symlink(root_path / pkgid / "res" / "wgt" / "shared" / "res" / "SHARED-WGT-2")); // NOLINT
- ASSERT_TRUE(bf::is_regular_file(root_path / pkgid / "shared" / "res" / "SHARED-WGT-2")); // NOLINT
- ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "wgt" / "shared" / "res" / "SHARED-WGT-1")); // NOLINT
- ASSERT_FALSE(bf::exists(root_path / pkgid / "shared" / "res" / "SHARED-WGT-1")); // NOLINT
-}
-
-TEST_F(HybridSmokeTest, SharedRes30Hybrid) {
- bf::path path = kSmokePackagesDirectory / "SharedRes30Hybrid.wgt";
- std::string pkgid = "smokeSh3Hy";
- std::string appid1 = "smokeSh3Hy.SharedRes30Hybrid";
- std::string appid2 = "sharedres30hybridserivce";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid1, appid2}, params));
- bf::path root_path = ci::GetRootAppPath(false, params.test_user.uid);
- ASSERT_TRUE(bf::is_symlink(root_path / pkgid / "res" / "wgt" / "shared" / "res" / "SHARED-WGT")); // NOLINT
- ASSERT_TRUE(bf::is_regular_file(root_path / pkgid / "shared" / "res" / "SHARED-WGT")); // NOLINT
- ASSERT_TRUE(bf::is_regular_file(root_path / pkgid / "shared" / "res" / "SHARED-TPK")); // NOLINT
-}
-
-TEST_F(HybridSmokeTest, SharedRes30HybridDelta) {
- bf::path path = kSmokePackagesDirectory / "SharedRes30HybridDelta.wgt";
- bf::path delta_package = kSmokePackagesDirectory /
- "SharedRes30HybridDelta.delta";
- std::string pkgid = "smokeSh3HD";
- std::string appid1 = "smokeSh3HD.SharedRes30HybridDelta";
- std::string appid2 = "sharedres30hybriddeltaserivce";
- ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
- ASSERT_EQ(backend.Install(delta_package), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {appid1, appid2}, params));
- // Check delta modifications
- bf::path root_path = ci::GetRootAppPath(false, params.test_user.uid);
- ASSERT_TRUE(bf::is_symlink(root_path / pkgid / "res" / "wgt" / "shared" / "res" / "SHARED-WGT-2")); // NOLINT
- ASSERT_TRUE(bf::is_regular_file(root_path / pkgid / "shared" / "res" / "SHARED-WGT-2")); // NOLINT
- ASSERT_TRUE(bf::is_regular_file(root_path / pkgid / "shared" / "res" / "SHARED-TPK-2")); // NOLINT
- ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "wgt" / "shared" / "res" / "SHARED-WGT-1")); // NOLINT
- ASSERT_FALSE(bf::exists(root_path / pkgid / "shared" / "res" / "SHARED-WGT-1")); // NOLINT
-}
-
-TEST_F(SmokeTest, InstallExtendedMode) {
- ASSERT_TRUE(CheckAvailableExtendedPath());
- bf::path path = kSmokePackagesDirectory / "InstallExtendedMode.wgt";
- std::string pkgid = "smokewgt44";
- std::string appid = "smokewgt44.web";
- ASSERT_EQ(backend.InstallWithStorage(path, StorageType::EXTENDED),
- ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidateExtendedPackage(pkgid, {appid}, params));
-}
-
-TEST_F(SmokeTest, RecoveryMode_CrashAfterUnzip) {
- bf::path path = kSmokePackagesDirectory / "RecoveryMode_CrashAfterUnzip.wgt";
- RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
- std::string test_uid_str = std::to_string(params.test_user.uid);
- backend_crash.Run("-i", path.string(), "-u", test_uid_str.c_str(),
- "-step_name", "Unzip");
- ASSERT_NE(backend_crash.Wait(), 0);
-
- std::string pkgid = "smokewgt45";
- bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
- params.test_user.uid);
- ASSERT_FALSE(recovery_file.empty());
- std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
- GetRecoverFileInfo(recovery_file);
- ASSERT_TRUE(recovery_info);
- ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
- ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
-}
-
-TEST_F(SmokeTest, InstallationMode_GlobalServiceAppWithUiAppId) {
- bf::path path = kSmokePackagesDirectory /
- "InstallationMode_GlobalServiceAppWithUiAppId.wgt";
- std::string pkgid = "smokewgt46";
- std::string ui_appid = "smokewgt46.uiapp";
- std::string service_appid = "smokewgt46.serviceapp";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {ui_appid, service_appid}, params));
-}
-
-TEST_F(SmokeTest, InstallationMode_GlobalServiceAppWithoutUiAppId) {
- bf::path path = kSmokePackagesDirectory /
- "InstallationMode_GlobalServiceAppWithoutUiAppId.wgt";
- std::string pkgid = "smokewgt47";
- std::string service_appid = "smokewgt47.serviceapp";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {service_appid}, params));
-}
-
-TEST_F(SmokeTest, InstallationMode_UIServiceAppWithUiAppId) {
- bf::path path = kSmokePackagesDirectory /
- "InstallationMode_UIServiceAppWithUiAppId.wgt";
- std::string pkgid = "smokewgt48";
- std::string ui_appid = "smokewgt48.uiapp";
- std::string service_appid = "smokewgt48.serviceapp";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
- ASSERT_TRUE(ValidatePackage(pkgid, {ui_appid, service_appid}, params));
-}
-
-TEST_F(SmokeTest, InstallationMode_UIServiceAppWithoutUiAppId) {
- bf::path path = kSmokePackagesDirectory /
- "InstallationMode_UIServiceAppWithoutUiAppId.wgt";
- std::string pkgid = "smokewgt49";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::ERROR);
-}
-
-TEST_F(SmokeTest, InstallationMode_UIAppWithoutUiAppId) {
- bf::path path = kSmokePackagesDirectory /
- "InstallationMode_UIAppWithoutUiAppId.wgt";
- std::string pkgid = "smokewgt50";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::ERROR);
-}
-
-} // namespace smoke_test
-
-int main(int argc, char** argv) {
- try {
- ci::RequestMode request_mode = st::ParseRequestMode(argc, argv);
- if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) {
- std::cout << "Skip tests for preload request" << std::endl;
- ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
- }
- testing::InitGoogleTest(&argc, argv);
- ::env = static_cast<smoke_test::SmokeEnvironment*>(
- testing::AddGlobalTestEnvironment(
- new smoke_test::SmokeEnvironment(request_mode)));
- signal(SIGINT, ::signalHandler);
- signal(SIGSEGV, ::signalHandler);
- return RUN_ALL_TESTS();
- } catch (...) {
- std::cout << "Exception occurred during testing" << std::endl;
- return 1;
- }
-}
+++ /dev/null
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include <common/pkgmgr_interface.h>
-#include <manifest_parser/utils/logging.h>
-
-#include "unit_tests/wgt_smoke_utils.h"
-#include "wgt/utils/wgt_app_query_interface.h"
-#include "wgt/wgt_installer.h"
-
-namespace ci = common_installer;
-
-// this main of test binay in done purely for recovery smoke test.
-int main(int argc, char** argv) {
- try {
- int index = -1;
- int backend_argc = argc;
- std::string step_name;
- smoke_test::CrashStepType type = smoke_test::CrashStepType::PROCESS;
-
- if (!strcmp(argv[backend_argc - 2], "-idx")) {
- index = atoi(argv[argc - 1]);
- backend_argc -= 2;
- LOG(DEBUG) << "Step crash after " << index << " step.";
- }
-
- if (!strcmp(argv[backend_argc - 2], "-step_name")) {
- step_name = argv[backend_argc - 1];
- backend_argc -= 2;
- LOG(DEBUG) << "Step crash after " << step_name << " step.";
- }
-
- if (!strcmp(argv[backend_argc - 1], "-type_clean")) {
- backend_argc--;
- type = smoke_test::CrashStepType::CLEAN;
- LOG(DEBUG) << "step will be crashed in clean operation";
- }
-
- ci::PkgmgrInstaller pkgmgr_installer;
- wgt::WgtAppQueryInterface query_interface;
- auto pkgmgr = ci::PkgMgrInterface::Create(backend_argc, argv,
- &pkgmgr_installer, &query_interface);
- if (!pkgmgr) {
- LOG(ERROR) << "Options of pkgmgr installer cannot be parsed";
- return EINVAL;
- }
-
- smoke_test::CrashWgtInstaller installer(pkgmgr, index, step_name, type);
- return (installer.Run() == ci::AppInstaller::Result::OK) ? 0 : 1;
- } catch (...) {
- std::cout << "Exception occurred during testing" << std::endl;
- return 1;
- }
-}
-
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:app-control>
- <tizen:src name="edit.html"/>
- <tizen:operation name="http://tizen.org/appcontrol/operation/edit"/>
- <tizen:uri name="myapp"/>
- </tizen:app-control>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:app-control>
- <tizen:src name="edit.html"/>
- <tizen:mime name="image/jpg" />
- <tizen:uri name="myapp"/>
- </tizen:app-control>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:app-control>
- <tizen:operation name="http://tizen.org/appcontrol/operation/edit"/>
- <tizen:mime name="image/jpg" />
- <tizen:uri name="myapp"/>
- </tizen:app-control>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:app-control>
- <tizen:src name="edit.html"/>
- <tizen:operation name="http://tizen.org/appcontrol/operation/edit"/>
- <tizen:mime name="image/jpg" />
- </tizen:app-control>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:app-control>
- <tizen:src name="edit.html"/>
- <tizen:operation name="http://tizen.org/appcontrol/operation/edit"/>
- <tizen:mime name="image/jpg" />
- <tizen:uri name="myapp"/>
- </tizen:app-control>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:appdefined-privilege name=""/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:appdefined-privilege name="package0id/appdefined/test.read"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:appdefined-privilege name="http://package0id/appdefined/longnameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.read"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:appdefined-privilege name="http://package0id/appdefined/test.read"/>
- <tizen:appdefined-privilege name="http://package0id/appdefined/test.write"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:appdefined-privilege/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:appdefined-privilege name="http://package0id/appdefined/test.read"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:appdefined-privilege name="http://package0id/appdefined/test.read" license="res/cert"/>
- <tizen:appdefined-privilege name="http://package0id/appdefined/test.write" license="res/cert"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:appdefined-privilege name="http://package0id/appdefined/test.read" license="res/cert"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id123.appidinvalid" package="package0id" required_version="3.0"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0idinvalid" required_version="3.0"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="Invalid"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application package="package0id" required_version="3.0"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" required_version="3.0"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:category />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:category name="http://tizen.org/category/category_0" />
- <tizen:category name="http://tizen.org/category/category_1" />
- <tizen:category name="http://tizen.org/category/category_2" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:category name="http://tizen.org/category/wearable_clock" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:metadata key="key1" value="key1value"/>
- <tizen:metadata key="key2" value="key2value"/>
- <tizen:metadata key="key1" value="key3value"/>
-</widget>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:metadata/>
-</widget>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:metadata key="key1"/>
- <tizen:metadata key="key2"/>
-</widget>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:metadata key="key1"/>
- <tizen:metadata key="key2" value="value2"/>
-</widget>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:privilege name=""/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:privilege name="http://tizen.org/privilege/application.launch"/>
- <tizen:privilege name="http://tizen.org/privilege/application.close"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:privilege/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:privilege name="http://tizen.org/privilege/application.launch"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:provides-appdefined-privilege name=""/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:provides-appdefined-privilege name="http://package1id/appdefined/test.read"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:provides-appdefined-privilege name="package0id/appdefined/test.read"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:provides-appdefined-privilege name="http://package0id/appdefined/longnameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.read"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:provides-appdefined-privilege name="http://package0id/appdefined/test.read"/>
- <tizen:provides-appdefined-privilege name="http://package0id/appdefined/test.write"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:provides-appdefined-privilege/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:provides-appdefined-privilege name="http://package0id/appdefined/test.read"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:provides-appdefined-privilege name="http://package0id/appdefined/test.read" license="res/cert"/>
- <tizen:provides-appdefined-privilege name="http://package0id/appdefined/test.write" license="res/cert"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:provides-appdefined-privilege name="http://package0id/appdefined/test.read" license="res/cert"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="disable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="disable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="enable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="disable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="disable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="disable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="disable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="enable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="disable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="disable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
- <tizen:setting background-support="enable" />
- <tizen:setting context-menu="disable" />
- <tizen:setting encryption="enable" />
- <tizen:setting screen-orientation="landscape" />
- <tizen:setting install-location="internal-only" />
- <tizen:setting hwkey-event="enable" />
- <tizen:setting background-vibration="enable" />
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets/invalid" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets/invalid" xmlns:tizen="http://tizen.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
-</widget>
+++ /dev/null
-<?xml version="1.0"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
- <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
-</widget>
+++ /dev/null
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
+++ /dev/null
-Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
-Except as noted, this software is licensed under Apache License, Version 2.
-Please, see the LICENSE.APLv2 file for Apache License, Version 2 terms and conditions.
+++ /dev/null
-<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="AuthorSignature">
-<SignedInfo>
-<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
-<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
-<Reference URI="LICENSE.APLv2">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>z8d0m5b2O9McPEK1xHG/dWgUBT6EfBDz6wA0F7xSPTA=</DigestValue>
-</Reference>
-<Reference URI="NOTICE">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>ijjaB8GEO5OJP/jK6n7Hr3vZFI9gy8ocoDhviViKNnU=</DigestValue>
-</Reference>
-<Reference URI="config.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>D77P2OH9hj+3BeuzXRjd5kkSP4H9bK3f2COPhdsWtEE=</DigestValue>
-</Reference>
-<Reference URI="css%2Fstyle.css">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>f7q5O05HNVS6mBDhCOBPBMFo6OA2iSqQVOf9aMoKPhs=</DigestValue>
-</Reference>
-<Reference URI="icon.png">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
-</Reference>
-<Reference URI="index.html">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>pw+EAHkfej6NPKau0RrL0ZIVHj1Q0QJxUlUMBCFRIFU=</DigestValue>
-</Reference>
-<Reference URI="js%2Fapp.js">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>mCAANytlgxQx/1c82dNNjO4QUPgqRMkzu2b1sbBLPk8=</DigestValue>
-</Reference>
-<Reference URI="version.txt">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>9eXJU0UyhA/NRbsALmnthcYduidTRQ4mtEi33xSB4k0=</DigestValue>
-</Reference>
-<Reference URI="#prop">
-<Transforms>
-<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
-</Transforms>
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8=</DigestValue>
-</Reference>
-</SignedInfo>
-<SignatureValue>
-Gqm9cp1feyu5Pb/XFuVF5YNufXLznoJyAfPk6va995dLcsqLwPOPXx7eqxOJVI0wBTTfSblbhb0X
-DLnI2NHasWwyMRgLSce9YhxarDTz4FvYaSR4xOaVJTByyGtZ40G9RkIQes30LdaZ42sEm0Tqat+a
-7Yz+Di4a1dFvGdHMKDo=
-</SignatureValue>
-<KeyInfo>
-<X509Data>
-<X509Certificate>
-MIICnDCCAYSgAwIBAgIGAVvS9uY8MA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz
-c29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2
-ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMBgxFjAUBgNVBAMMDUFw
-cF9pbnN0YWxsZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIKgQLsl5UIJdfdaDXbY+aQ6
-VHjwTPv5+aUlF1l6G9SDZ7tmJTCO1yAudmMr6vEN+ZL/bbOEAlyhkJPTmntPesO1h/WzjIlpFzTO
-UcHlEXAu1vZGTnPBoYTutBeVmbH9JY/dCSm2xFSioKaWHl+uMn0SB1DcvgIVSs4DkvO0F1+TAgMB
-AAGjMjAwMAwGA1UdEwEB/wQCMAAwCwYDVR0PBAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUFBwMDMA0G
-CSqGSIb3DQEBBQUAA4IBAQBwNrj9b7/g4JI9K3wohRLHW5IpxOwBO9gUlkotSUNaiAvNwsQfB5pE
-k+rTUa4Nwxcq6rFfne1brXP1vbl/bVGW/WJqV6dF3BL1QfwGif0vvcO1Sz2QOpoc/Jtt8zlmsRne
-TIEMph6kDUT1oNUlTCGnxD24WagRxuGUe/RZ6L4y+6T8L+fBDtMyyM+GytqE72V+0KeyITJMTdzM
-wRMjN3XccXemcox73isLxSXlgwrFbotkTyYPTFphiZCRU7BlA3EClIk+3To0b3irROY/iIlg6ZyY
-gNbND9/aIJxqPqCghW7PMjGH/9KK2mtNhtJSFrIAvvUiW/fMrNj1opsAHGgJ
-</X509Certificate>
-<X509Certificate>
-MIIDOTCCAiGgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMRowGAYDVQQKDBFUaXplbiBBc3NvY2lh
-dGlvbjEaMBgGA1UECwwRVGl6ZW4gQXNzb2NpYXRpb24xHjAcBgNVBAMMFVRpemVuIERldmVsb3Bl
-cnMgUm9vdDAeFw0xMjAxMDEwMDAwMDBaFw0yNzAxMDEwMDAwMDBaMFYxGjAYBgNVBAoMEVRpemVu
-IEFzc29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4g
-RGV2ZWxvcGVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANVGhRGmMIUyBA7o
-PCz8Sxut6z6HNkF4oDIuzuKaMzRYPeWodwe9O0gmqAkToQHfwg2giRhE5GoPld0fq+OYMMwSasCu
-g8dwODx1eDeSYVuOLWRxpAmbTXOsSFi6VoWeyaPEm18JBHvZBsU5YQtgZ6Kp7MqzvQg3pXOxtajj
-vyHxiatJl+xXrHgcXC1wgyG3buty7u/Fi2mvKXJ0PRJcCjjK81dqe/Vr20sRUCrbk02zbm5ggFt/
-jIEhV8wbFRQpliobc7J4dSTKhFfrqGM8rdd54LYhD7gSI1CFSe16pUXfcVR7FhJztRaiGLnCrwBE
-dyTZ248+D4L/qR/D0axb3jcCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
-AQEAnOXXQ/1O/QTDHyrmQDtFziqPY3xWlJBqJtEqXiT7Y+Ljpe66e+Ee/OjQMlZe8gu21/8cKklH
-95RxjopMWCVedXDUbWdvS2+CdyvVW/quT2E0tjqIzXDekUTYwwhlPWlGxvfj3VsxqSFq3p8Brl04
-1Gx5RKAGyKVsMfTLhbbwSWwApuBUxYfcNpKwLWGPXkysu+HctY03OKv4/xKBnVWiN8ex/Sgesi0M
-+OBAOMdZMPK32uJBTeKFx1xZgTLIhk45V0hPOomPjZloiv0LSS11eyd451ufjW0iHRE7WlpR6EvI
-W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg==
-</X509Certificate>
-</X509Data>
-</KeyInfo>
-<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#AuthorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#AuthorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-author"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#AuthorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
-</Signature>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://yourdomain/Basic" version="1.0.0" viewmodes="maximized">
- <tizen:application id="smokewgt40.ManifestDirectInstallMode" package="smokewgt40" required_version="3.0"/>
- <content src="index.html"/>
- <feature name="http://tizen.org/feature/screen.size.all"/>
- <icon src="icon.png"/>
- <name>ManifestDirectInstallMode</name>
- <tizen:profile name="mobile"/>
-</widget>
\ No newline at end of file
+++ /dev/null
-html, body {
- width: 100%;
- height: 100%;
- margin: 0 auto;
- padding: 0;
-}
-
-#container {
- width: 100%;
- height: 100%;
- display: table;
-}
-
-#contents {
- display: table-cell;
- text-align: center;
- vertical-align: middle;
- background-color:#aaaaff;
- -webkit-tap-highlight-color: transparent;
-}
-
-#content_text {
- font-weight: bold;
- font-size: 5em;
- color: #ffffff;
-}
+++ /dev/null
-<!DOCTYPE html>
-<html>
-<head>
- <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
- <title>Hello Tizen</title>
- <link rel="stylesheet" href="css/style.css">
-</head>
-
-<body>
- <div id="container">
- <div id="contents">
- <span id="content-text">Hello Tizen</span>
- </div>
- </div>
-
- <script src="js/app.js"></script>
-</body>
-</html>
+++ /dev/null
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * 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.
- */
-
-(function() {
- /**
- * Handles the hardware key event.
- * @private
- * @param {Object} event - The hardware key event object
- */
- function keyEventHandler(event) {
- if (event.keyName === "back") {
- try {
- // If the back key is pressed, exit the application.
- tizen.application.getCurrentApplication().exit();
- } catch (ignore) {}
- }
- }
-
- /**
- * Initializes the application.
- * @private
- */
- function init() {
- var textbox = document.querySelector("#contents");
-
- // Add hardware event listener
- document.addEventListener("tizenhwkey", keyEventHandler);
-
- // Add click event listener
- textbox.addEventListener("click", function() {
- var box = document.querySelector("#content-text");
-
- if (box.innerHTML === "Hello Tizen") {
- // If the text in box is "Hello Tizen", change it to "Hi WebApp"
- box.innerHTML = "Hi WebApp";
- } else {
- // If the text in box is not "Hello Tizen", change it to "Hello Tizen"
- box.innerHTML = "Hello Tizen";
- }
- });
- }
-
- // The function "init" will be executed after the application successfully loaded.
- window.onload = init;
-}());
\ No newline at end of file
+++ /dev/null
-<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
-<SignedInfo>
-<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
-<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
-<Reference URI="LICENSE.APLv2">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>z8d0m5b2O9McPEK1xHG/dWgUBT6EfBDz6wA0F7xSPTA=</DigestValue>
-</Reference>
-<Reference URI="NOTICE">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>ijjaB8GEO5OJP/jK6n7Hr3vZFI9gy8ocoDhviViKNnU=</DigestValue>
-</Reference>
-<Reference URI="author-signature.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>leQv/rgXPAEhwQ84QN6OuE4aUf0vawVd4fx2GCvH6nI=</DigestValue>
-</Reference>
-<Reference URI="config.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>D77P2OH9hj+3BeuzXRjd5kkSP4H9bK3f2COPhdsWtEE=</DigestValue>
-</Reference>
-<Reference URI="css%2Fstyle.css">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>f7q5O05HNVS6mBDhCOBPBMFo6OA2iSqQVOf9aMoKPhs=</DigestValue>
-</Reference>
-<Reference URI="icon.png">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
-</Reference>
-<Reference URI="index.html">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>pw+EAHkfej6NPKau0RrL0ZIVHj1Q0QJxUlUMBCFRIFU=</DigestValue>
-</Reference>
-<Reference URI="js%2Fapp.js">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>mCAANytlgxQx/1c82dNNjO4QUPgqRMkzu2b1sbBLPk8=</DigestValue>
-</Reference>
-<Reference URI="version.txt">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>9eXJU0UyhA/NRbsALmnthcYduidTRQ4mtEi33xSB4k0=</DigestValue>
-</Reference>
-<Reference URI="#prop">
-<Transforms>
-<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
-</Transforms>
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
-</Reference>
-</SignedInfo>
-<SignatureValue>
-mj0i35KMm0SDEzc8LflluEAXvKWqARc9GJlAZfNHKbJzB5P4yvNwYwgkH1hO2qtJB3H9WRH2LJo9
-McDywe8hr7Tu1rb6znAa0y2q3ZKcc3PUubQbcayv6mL6kZuFAg8bfZDP4nOCIltu2TtdeKRGrcQb
-XU4ivseIgptrDc21fNQ=
-</SignatureValue>
-<KeyInfo>
-<X509Data>
-<X509Certificate>
-MIICnTCCAgYCCQDE9MbMmJ/yCzANBgkqhkiG9w0BAQUFADCBkDELMAkGA1UEBhMCS1IxDjAMBgNV
-BAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6ZW4gVGVzdCBDQTEiMCAGA1UE
-CwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTElMCMGA1UEAwwcVGl6ZW4gUGFydG5lciBEaXN0
-cmlidXRvciBDQTAeFw0xMjEwMjcwNzQ4MzNaFw0yMjEwMjUwNzQ4MzNaMIGUMQswCQYDVQQGEwJL
-UjEOMAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENB
-MSIwIAYDVQQLDBlUaXplbiBEaXN0cmlidXRvciBUZXN0IENBMSkwJwYDVQQDDCBUaXplbiBQYXJ0
-bmVyIERpc3RyaWJ1dG9yIFNpZ25lcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAy9mg2x4B
-zxlK3LJL81GsLq/pJfK1evdCKG/IOBpdoRO0rLhYnsL5+KvToPFa5g9GTZo32LikpW1NZ7++3EHE
-fnO2IGLUau4kquvhmz1LNg5xBTx7IbucmwLMRGo1BPGdsAQQLyXeQKJ5PCERmVg4MIoiL2zT/JsL
-sZ9UPT6GEB8CAwEAATANBgkqhkiG9w0BAQUFAAOBgQAw5xPBFR1XKuZ8QpsCtSE0zXVHvwIa+Ha4
-YBdRtGwEoZmiKGZV/wAhPRdmR0kISkTz20kIGz/ZwRZCVGhsr5hkkpFknYlKeKkEJ/tJfZl4D7ec
-GFAnynOzlWZqSIPz+yxX8ah9E6lTv4Vs9DhNb08nxVvxLqlpyVdk9RUsCx/yIA==
-</X509Certificate>
-<X509Certificate>
-MIICtTCCAh6gAwIBAgIJAKORBcIiXygIMA0GCSqGSIb3DQEBBQUAMIGVMQswCQYDVQQGEwJLUjEO
-MAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENBMSIw
-IAYDVQQLDBlUaXplbiBEaXN0cmlidXRvciBUZXN0IENBMSowKAYDVQQDDCFUaXplbiBQYXJ0bmVy
-IERpc3RyaWJ1dG9yIFJvb3QgQ0EwHhcNMTIxMDI3MDc0NTIwWhcNMjIxMDI1MDc0NTIwWjCBkDEL
-MAkGA1UEBhMCS1IxDjAMBgNVBAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6
-ZW4gVGVzdCBDQTEiMCAGA1UECwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTElMCMGA1UEAwwc
-VGl6ZW4gUGFydG5lciBEaXN0cmlidXRvciBDQTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-2ZQrdEowjqxUmB8FX8ej19VKY6jGHKNIRE5wrhBkuZ1b0FLRPiN3/Cl9wMkCnyJui4QhC28g1aBg
-w/JnaObcDqW1NgFVH3006+gZvCTDlw1nIEjvZa6P+uWOOi05xPPAE0feKPkO1POnOjnapfkkEVNU
-8TXsLbLYBylWT8rxZC8CAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQBJ
-yJ7p6qs0JI+1iKOk/sYWVP6dMueY72qOc/wVj5c3ejOlgJNNXDMAQ14QcRRexffc68ipTwybU/3m
-tcNwydzKJe+GFa4b2zyKOvOgrfs4MKSR0T9XEPmTKeR+NDT2CbA6/kQoRYm0fSORzD2UXJzNZWe/
-WjwSA66hv4q+0QZQFQ==
-</X509Certificate>
-</X509Data>
-</KeyInfo>
-<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
-</Signature>
\ No newline at end of file
+++ /dev/null
-Needed, because empty directories are skipped when copying, and directory structure will be invalid.
+++ /dev/null
-<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="AuthorSignature">
-<SignedInfo>
-<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
-<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
-<Reference URI="bin%2Fservice2">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>RnPKffWQVeWGu6c85RAZ2ok7U2TSjUwneF+3BwbY/q0=</DigestValue>
-</Reference>
-<Reference URI="config.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>TwwCzhdio1vGkQ6raK/ABUQH0YKx0TPrVEoOgwCuLkU=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2FLICENSE.APLv2">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>z8d0m5b2O9McPEK1xHG/dWgUBT6EfBDz6wA0F7xSPTA=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2FNOTICE">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>ijjaB8GEO5OJP/jK6n7Hr3vZFI9gy8ocoDhviViKNnU=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2Fconfig.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>gzrsgCaAh6OG7sGSP2wiAI/eD61S687+NuTnSqwLylc=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2Fcss%2Fstyle.css">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>f7q5O05HNVS6mBDhCOBPBMFo6OA2iSqQVOf9aMoKPhs=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2Ficon.png">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2Findex.html">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>pw+EAHkfej6NPKau0RrL0ZIVHj1Q0QJxUlUMBCFRIFU=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2Fjs%2Fapp.js">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>mCAANytlgxQx/1c82dNNjO4QUPgqRMkzu2b1sbBLPk8=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2Fversion.txt">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>9eXJU0UyhA/NRbsALmnthcYduidTRQ4mtEi33xSB4k0=</DigestValue>
-</Reference>
-<Reference URI="shared%2Fres%2Fservice2.png">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
-</Reference>
-<Reference URI="tizen-manifest.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>Tg/KmHRmoo0F+PrxTKOEcKJWfr7PF+jEJ5y2Y3uTiqo=</DigestValue>
-</Reference>
-<Reference URI="#prop">
-<Transforms>
-<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
-</Transforms>
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8=</DigestValue>
-</Reference>
-</SignedInfo>
-<SignatureValue>
-O/O7XzUC18XJpjl0YUHdOmaeSjYzVkGBL5/kQhLhgZqaXshdpYi4XjN1R5H8dSoRlxMDorfqHa1E
-ntjHjvSBysVLJHX9+uE4vIfQKzsma4hfniqYwPO/yLwFhxMUS6mRKq+5yHBGzvL9uKmMArVRMiqC
-tLRAkjQu+ZBZeNUUYzM=
-</SignatureValue>
-<KeyInfo>
-<X509Data>
-<X509Certificate>
-MIICnDCCAYSgAwIBAgIGAVvS9uY8MA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz
-c29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2
-ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMBgxFjAUBgNVBAMMDUFw
-cF9pbnN0YWxsZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIKgQLsl5UIJdfdaDXbY+aQ6
-VHjwTPv5+aUlF1l6G9SDZ7tmJTCO1yAudmMr6vEN+ZL/bbOEAlyhkJPTmntPesO1h/WzjIlpFzTO
-UcHlEXAu1vZGTnPBoYTutBeVmbH9JY/dCSm2xFSioKaWHl+uMn0SB1DcvgIVSs4DkvO0F1+TAgMB
-AAGjMjAwMAwGA1UdEwEB/wQCMAAwCwYDVR0PBAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUFBwMDMA0G
-CSqGSIb3DQEBBQUAA4IBAQBwNrj9b7/g4JI9K3wohRLHW5IpxOwBO9gUlkotSUNaiAvNwsQfB5pE
-k+rTUa4Nwxcq6rFfne1brXP1vbl/bVGW/WJqV6dF3BL1QfwGif0vvcO1Sz2QOpoc/Jtt8zlmsRne
-TIEMph6kDUT1oNUlTCGnxD24WagRxuGUe/RZ6L4y+6T8L+fBDtMyyM+GytqE72V+0KeyITJMTdzM
-wRMjN3XccXemcox73isLxSXlgwrFbotkTyYPTFphiZCRU7BlA3EClIk+3To0b3irROY/iIlg6ZyY
-gNbND9/aIJxqPqCghW7PMjGH/9KK2mtNhtJSFrIAvvUiW/fMrNj1opsAHGgJ
-</X509Certificate>
-<X509Certificate>
-MIIDOTCCAiGgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMRowGAYDVQQKDBFUaXplbiBBc3NvY2lh
-dGlvbjEaMBgGA1UECwwRVGl6ZW4gQXNzb2NpYXRpb24xHjAcBgNVBAMMFVRpemVuIERldmVsb3Bl
-cnMgUm9vdDAeFw0xMjAxMDEwMDAwMDBaFw0yNzAxMDEwMDAwMDBaMFYxGjAYBgNVBAoMEVRpemVu
-IEFzc29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4g
-RGV2ZWxvcGVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANVGhRGmMIUyBA7o
-PCz8Sxut6z6HNkF4oDIuzuKaMzRYPeWodwe9O0gmqAkToQHfwg2giRhE5GoPld0fq+OYMMwSasCu
-g8dwODx1eDeSYVuOLWRxpAmbTXOsSFi6VoWeyaPEm18JBHvZBsU5YQtgZ6Kp7MqzvQg3pXOxtajj
-vyHxiatJl+xXrHgcXC1wgyG3buty7u/Fi2mvKXJ0PRJcCjjK81dqe/Vr20sRUCrbk02zbm5ggFt/
-jIEhV8wbFRQpliobc7J4dSTKhFfrqGM8rdd54LYhD7gSI1CFSe16pUXfcVR7FhJztRaiGLnCrwBE
-dyTZ248+D4L/qR/D0axb3jcCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
-AQEAnOXXQ/1O/QTDHyrmQDtFziqPY3xWlJBqJtEqXiT7Y+Ljpe66e+Ee/OjQMlZe8gu21/8cKklH
-95RxjopMWCVedXDUbWdvS2+CdyvVW/quT2E0tjqIzXDekUTYwwhlPWlGxvfj3VsxqSFq3p8Brl04
-1Gx5RKAGyKVsMfTLhbbwSWwApuBUxYfcNpKwLWGPXkysu+HctY03OKv4/xKBnVWiN8ex/Sgesi0M
-+OBAOMdZMPK32uJBTeKFx1xZgTLIhk45V0hPOomPjZloiv0LSS11eyd451ufjW0iHRE7WlpR6EvI
-W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg==
-</X509Certificate>
-</X509Data>
-</KeyInfo>
-<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#AuthorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#AuthorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-author"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#AuthorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
-</Signature>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://yourdomain/Basic" version="1.0.0" viewmodes="maximized">
- <tizen:application id="smokehyb12.ManifestDirectInstallModeHybrid" package="smokehyb12" required_version="3.0"/>
- <content src="index.html"/>
- <feature name="http://tizen.org/feature/screen.size.all"/>
- <icon src="icon.png"/>
- <name>ManifestDirectInstallMode_Hybrid</name>
- <tizen:profile name="mobile"/>
-</widget>
+++ /dev/null
-Needed, because empty directories are skipped when copying, and directory structure will be invalid.
+++ /dev/null
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
+++ /dev/null
-Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
-Except as noted, this software is licensed under Apache License, Version 2.
-Please, see the LICENSE.APLv2 file for Apache License, Version 2 terms and conditions.
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://yourdomain/Basic" version="1.0.0" viewmodes="maximized">
- <tizen:application id="smokehyb12.ManifestDirectInstallModeHybrid" package="smokehyb12" required_version="3.0"/>
- <content src="index.html"/>
- <feature name="http://tizen.org/feature/screen.size.all"/>
- <icon src="icon.png"/>
- <name>ManifestDirectInstallMode_Hybrid</name>
- <tizen:profile name="mobile"/>
-</widget>
\ No newline at end of file
+++ /dev/null
-html, body {
- width: 100%;
- height: 100%;
- margin: 0 auto;
- padding: 0;
-}
-
-#container {
- width: 100%;
- height: 100%;
- display: table;
-}
-
-#contents {
- display: table-cell;
- text-align: center;
- vertical-align: middle;
- background-color:#aaaaff;
- -webkit-tap-highlight-color: transparent;
-}
-
-#content_text {
- font-weight: bold;
- font-size: 5em;
- color: #ffffff;
-}
+++ /dev/null
-<!DOCTYPE html>
-<html>
-<head>
- <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
- <title>Hello Tizen</title>
- <link rel="stylesheet" href="css/style.css">
-</head>
-
-<body>
- <div id="container">
- <div id="contents">
- <span id="content-text">Hello Tizen</span>
- </div>
- </div>
-
- <script src="js/app.js"></script>
-</body>
-</html>
+++ /dev/null
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * 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.
- */
-
-(function() {
- /**
- * Handles the hardware key event.
- * @private
- * @param {Object} event - The hardware key event object
- */
- function keyEventHandler(event) {
- if (event.keyName === "back") {
- try {
- // If the back key is pressed, exit the application.
- tizen.application.getCurrentApplication().exit();
- } catch (ignore) {}
- }
- }
-
- /**
- * Initializes the application.
- * @private
- */
- function init() {
- var textbox = document.querySelector("#contents");
-
- // Add hardware event listener
- document.addEventListener("tizenhwkey", keyEventHandler);
-
- // Add click event listener
- textbox.addEventListener("click", function() {
- var box = document.querySelector("#content-text");
-
- if (box.innerHTML === "Hello Tizen") {
- // If the text in box is "Hello Tizen", change it to "Hi WebApp"
- box.innerHTML = "Hi WebApp";
- } else {
- // If the text in box is not "Hello Tizen", change it to "Hello Tizen"
- box.innerHTML = "Hello Tizen";
- }
- });
- }
-
- // The function "init" will be executed after the application successfully loaded.
- window.onload = init;
-}());
\ No newline at end of file
+++ /dev/null
-<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
-<SignedInfo>
-<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
-<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
-<Reference URI="author-signature.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>EqT9TFwwEUqOae+jSUwl+1QGX3DSuLgjkeXUJh5pECo=</DigestValue>
-</Reference>
-<Reference URI="bin%2Fservice2">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>RnPKffWQVeWGu6c85RAZ2ok7U2TSjUwneF+3BwbY/q0=</DigestValue>
-</Reference>
-<Reference URI="config.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>TwwCzhdio1vGkQ6raK/ABUQH0YKx0TPrVEoOgwCuLkU=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2FLICENSE.APLv2">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>z8d0m5b2O9McPEK1xHG/dWgUBT6EfBDz6wA0F7xSPTA=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2FNOTICE">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>ijjaB8GEO5OJP/jK6n7Hr3vZFI9gy8ocoDhviViKNnU=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2Fconfig.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>gzrsgCaAh6OG7sGSP2wiAI/eD61S687+NuTnSqwLylc=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2Fcss%2Fstyle.css">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>f7q5O05HNVS6mBDhCOBPBMFo6OA2iSqQVOf9aMoKPhs=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2Ficon.png">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2Findex.html">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>pw+EAHkfej6NPKau0RrL0ZIVHj1Q0QJxUlUMBCFRIFU=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2Fjs%2Fapp.js">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>mCAANytlgxQx/1c82dNNjO4QUPgqRMkzu2b1sbBLPk8=</DigestValue>
-</Reference>
-<Reference URI="res%2Fwgt%2Fversion.txt">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>9eXJU0UyhA/NRbsALmnthcYduidTRQ4mtEi33xSB4k0=</DigestValue>
-</Reference>
-<Reference URI="shared%2Fres%2Fservice2.png">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
-</Reference>
-<Reference URI="tizen-manifest.xml">
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>Tg/KmHRmoo0F+PrxTKOEcKJWfr7PF+jEJ5y2Y3uTiqo=</DigestValue>
-</Reference>
-<Reference URI="#prop">
-<Transforms>
-<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
-</Transforms>
-<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
-<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
-</Reference>
-</SignedInfo>
-<SignatureValue>
-q4QCfU18xiU4d397IiQ2/+RsfoQAHjFbvJpFm9Hn/01897/joNhMggZ3rJv1+7YrG2uyWpeskwBQ
-Ckg3jaBGyrRS17t3zZcAPUZT085Bq608fzn+sNUm2XY2FweOD3ttebAalgJBAhSshE1/sNY5eSy0
-lk9wVUXaVlInM6YWtx0=
-</SignatureValue>
-<KeyInfo>
-<X509Data>
-<X509Certificate>
-MIICnTCCAgYCCQDE9MbMmJ/yCzANBgkqhkiG9w0BAQUFADCBkDELMAkGA1UEBhMCS1IxDjAMBgNV
-BAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6ZW4gVGVzdCBDQTEiMCAGA1UE
-CwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTElMCMGA1UEAwwcVGl6ZW4gUGFydG5lciBEaXN0
-cmlidXRvciBDQTAeFw0xMjEwMjcwNzQ4MzNaFw0yMjEwMjUwNzQ4MzNaMIGUMQswCQYDVQQGEwJL
-UjEOMAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENB
-MSIwIAYDVQQLDBlUaXplbiBEaXN0cmlidXRvciBUZXN0IENBMSkwJwYDVQQDDCBUaXplbiBQYXJ0
-bmVyIERpc3RyaWJ1dG9yIFNpZ25lcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAy9mg2x4B
-zxlK3LJL81GsLq/pJfK1evdCKG/IOBpdoRO0rLhYnsL5+KvToPFa5g9GTZo32LikpW1NZ7++3EHE
-fnO2IGLUau4kquvhmz1LNg5xBTx7IbucmwLMRGo1BPGdsAQQLyXeQKJ5PCERmVg4MIoiL2zT/JsL
-sZ9UPT6GEB8CAwEAATANBgkqhkiG9w0BAQUFAAOBgQAw5xPBFR1XKuZ8QpsCtSE0zXVHvwIa+Ha4
-YBdRtGwEoZmiKGZV/wAhPRdmR0kISkTz20kIGz/ZwRZCVGhsr5hkkpFknYlKeKkEJ/tJfZl4D7ec
-GFAnynOzlWZqSIPz+yxX8ah9E6lTv4Vs9DhNb08nxVvxLqlpyVdk9RUsCx/yIA==
-</X509Certificate>
-<X509Certificate>
-MIICtTCCAh6gAwIBAgIJAKORBcIiXygIMA0GCSqGSIb3DQEBBQUAMIGVMQswCQYDVQQGEwJLUjEO
-MAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENBMSIw
-IAYDVQQLDBlUaXplbiBEaXN0cmlidXRvciBUZXN0IENBMSowKAYDVQQDDCFUaXplbiBQYXJ0bmVy
-IERpc3RyaWJ1dG9yIFJvb3QgQ0EwHhcNMTIxMDI3MDc0NTIwWhcNMjIxMDI1MDc0NTIwWjCBkDEL
-MAkGA1UEBhMCS1IxDjAMBgNVBAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6
-ZW4gVGVzdCBDQTEiMCAGA1UECwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTElMCMGA1UEAwwc
-VGl6ZW4gUGFydG5lciBEaXN0cmlidXRvciBDQTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-2ZQrdEowjqxUmB8FX8ej19VKY6jGHKNIRE5wrhBkuZ1b0FLRPiN3/Cl9wMkCnyJui4QhC28g1aBg
-w/JnaObcDqW1NgFVH3006+gZvCTDlw1nIEjvZa6P+uWOOi05xPPAE0feKPkO1POnOjnapfkkEVNU
-8TXsLbLYBylWT8rxZC8CAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQBJ
-yJ7p6qs0JI+1iKOk/sYWVP6dMueY72qOc/wVj5c3ejOlgJNNXDMAQ14QcRRexffc68ipTwybU/3m
-tcNwydzKJe+GFa4b2zyKOvOgrfs4MKSR0T9XEPmTKeR+NDT2CbA6/kQoRYm0fSORzD2UXJzNZWe/
-WjwSA66hv4q+0QZQFQ==
-</X509Certificate>
-</X509Data>
-</KeyInfo>
-<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
-</Signature>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="smokehyb12" version="1.0.0">
- <profile name="mobile"/>
- <service-application appid="smokehyb12.service2" exec="service2" multiple="false" nodisplay="true" taskmanage="false" type="capp">
- <label>service2</label>
- <icon>service2.png</icon>
- </service-application>
-</manifest>
+++ /dev/null
-Needed, because empty directories are skipped when copying, and directory structure will be invalid.
+++ /dev/null
-#add
-res/wgt/ADDED
-#modify
-res/wgt/MODIFIED
-#delete
-res/wgt/DELETED
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://yourdomain/smokewgt11" version="1.0.0" viewmodes="maximized">
- <tizen:application id="smokewgt11.RDSMode" package="smokewgt11" required_version="2.3"/>
- <content src="index.html"/>
- <feature name="http://tizen.org/feature/screen.size.all"/>
- <icon src="icon.png"/>
- <name>smokewgt11</name>
- <tizen:profile name="mobile"/>
-</widget>
+++ /dev/null
-// Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include "unit_tests/wgt_smoke_utils.h"
-
-#include <unit_tests/common/smoke_utils.h>
-
-#include <string>
-#include <vector>
-#include <utility>
-
-#include "wgt/wgt_installer.h"
-#include "hybrid/hybrid_installer.h"
-
-namespace ci = common_installer;
-namespace st = smoke_test;
-
-namespace smoke_test {
-
-const bf::path kSmokePackagesDirectory =
- "/usr/share/wgt-installer-ut/test_samples/smoke/";
-
-bool ValidatePackage(const std::string& pkgid,
- const std::vector<std::string>& appids,
- const TestParameters& params) {
- Apps apps;
- for (const auto& appid : appids) {
- apps.push_back(std::make_pair(appid, appid));
- }
- return ValidatePackage(pkgid, apps, params);
-}
-
-bool ValidateExternalPackage(const std::string& pkgid,
- const std::vector<std::string>& appids,
- const TestParameters& params) {
- Apps apps;
- for (const auto& appid : appids) {
- apps.push_back(std::make_pair(appid, appid));
- }
- return ValidateExternalPackage(pkgid, apps, params);
-}
-
-bool ValidateExtendedPackage(const std::string& pkgid,
- const std::vector<std::string>& appids,
- const TestParameters& params) {
- Apps apps;
- for (const auto& appid : appids) {
- apps.push_back(std::make_pair(appid, appid));
- }
- return ValidateExtendedPackage(pkgid, apps, params);
-}
-
-WgtBackendInterface::AppQueryInterfacePtr
-WgtBackendInterface::CreateQueryInterface() const {
- return AppQueryInterfacePtr(new wgt::WgtAppQueryInterface());
-}
-
-WgtBackendInterface::AppInstallerPtr
-WgtBackendInterface::CreateInstaller(ci::PkgMgrPtr pkgmgr) const {
- return AppInstallerPtr(new wgt::WgtInstaller(pkgmgr));
-}
-
-WgtBackendInterface::AppInstallerPtr
-WgtBackendInterface::CreateFailExpectedInstaller(
- ci::PkgMgrPtr pkgmgr, int fail_at) const {
- return AppInstallerPtr(new FailExpectedWgtInstaller(pkgmgr, fail_at));
-}
-
-HybridBackendInterface::AppQueryInterfacePtr
-HybridBackendInterface::CreateQueryInterface() const {
- return AppQueryInterfacePtr(new wgt::WgtAppQueryInterface());
-}
-
-HybridBackendInterface::AppInstallerPtr
-HybridBackendInterface::CreateInstaller(ci::PkgMgrPtr pkgmgr) const {
- return AppInstallerPtr(new hybrid::HybridInstaller(pkgmgr));
-}
-
-HybridBackendInterface::AppInstallerPtr
-HybridBackendInterface::CreateFailExpectedInstaller(
- ci::PkgMgrPtr pkgmgr, int fail_at) const {
- return AppInstallerPtr(new FailExpectedHybridInstaller(pkgmgr, fail_at));
-}
-
-} // namespace smoke_test
+++ /dev/null
-// Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#ifndef UNIT_TESTS_WGT_SMOKE_UTILS_H_
-#define UNIT_TESTS_WGT_SMOKE_UTILS_H_
-
-#include <common/installer/app_installer.h>
-#include <common/pkgmgr_interface.h>
-#include <common/step/configuration/step_fail.h>
-#include <unit_tests/common/smoke_utils.h>
-
-#include <memory>
-#include <string>
-#include <vector>
-
-#include "hybrid/hybrid_installer.h"
-#include "wgt/wgt_installer.h"
-#include "wgt/utils/wgt_app_query_interface.h"
-
-namespace smoke_test {
-
-bool ValidatePackage(const std::string& pkgid,
- const std::vector<std::string>& appids,
- const TestParameters& params);
-
-bool ValidateExternalPackage(const std::string& pkgid,
- const std::vector<std::string>& appids,
- const TestParameters& params);
-
-bool ValidateExtendedPackage(const std::string& pkgid,
- const std::vector<std::string>& appids,
- const TestParameters& params);
-
-extern const bf::path kSmokePackagesDirectory;
-
-class WgtBackendInterface: public BackendInterface {
- public:
- using BackendInterface::BackendInterface;
-
-// private:
- AppQueryInterfacePtr CreateQueryInterface() const override;
- AppInstallerPtr CreateInstaller(
- common_installer::PkgMgrPtr pkgmgr) const override;
- AppInstallerPtr CreateFailExpectedInstaller(
- common_installer::PkgMgrPtr pkgmgr, int fail_at) const override;
-};
-
-class HybridBackendInterface: public BackendInterface {
- public:
- using BackendInterface::BackendInterface;
-
- AppQueryInterfacePtr CreateQueryInterface() const override;
- AppInstallerPtr CreateInstaller(
- common_installer::PkgMgrPtr pkgmgr) const override;
- AppInstallerPtr CreateFailExpectedInstaller(
- common_installer::PkgMgrPtr pkgmgr, int fail_at) const override;
-};
-
-#ifdef OVERRIDE_STEPS_BLOCK
-#undef OVERRIDE_STEPS_BLOCK
-#endif
-#define OVERRIDE_STEPS_BLOCK(TYPE, STEPS) \
- void STEPS() override { \
- TYPE::STEPS(); \
- if (fail_at_ > -1) \
- AddStepAtIndex<common_installer::configuration::StepFail>(fail_at_); \
- else \
- AddStep<common_installer::configuration::StepFail>(); \
- } \
-
-class FailExpectedWgtInstaller : public wgt::WgtInstaller {
- public:
- explicit FailExpectedWgtInstaller(
- common_installer::PkgMgrPtr pkgmgr, int fail_at)
- : wgt::WgtInstaller(pkgmgr), fail_at_(fail_at) { }
-
- private:
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, InstallSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, UpdateSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, UninstallSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, ReinstallSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, DeltaSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, MoveSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, RecoverySteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, MountInstallSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, MountUpdateSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, ManifestDirectInstallSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, ManifestDirectUpdateSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, ManifestPartialInstallSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, ManifestPartialUpdateSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, PartialUninstallSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, ReadonlyUpdateInstallSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, ReadonlyUpdateUninstallSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, DisablePkgSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, EnablePkgSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, MigrateExtImgSteps)
- OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, RecoverDBSteps)
-
- int fail_at_;
-};
-
-class FailExpectedHybridInstaller : public hybrid::HybridInstaller {
- public:
- explicit FailExpectedHybridInstaller(
- common_installer::PkgMgrPtr pkgmgr, int fail_at)
- : hybrid::HybridInstaller(pkgmgr), fail_at_(fail_at) { }
-
- private:
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, InstallSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, UpdateSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, UninstallSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, ReinstallSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, DeltaSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, MoveSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, RecoverySteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, MountInstallSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, MountUpdateSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, ManifestDirectInstallSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, ManifestDirectUpdateSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, ManifestPartialInstallSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, ManifestPartialUpdateSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, PartialUninstallSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, ReadonlyUpdateInstallSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, ReadonlyUpdateUninstallSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, DisablePkgSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, EnablePkgSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, MigrateExtImgSteps)
- OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, RecoverDBSteps)
-
- int fail_at_;
-};
-
-#ifdef OVERRIDE_STEPS_BLOCK
-#undef OVERRIDE_STEPS_BLOCK
-#endif
-#define OVERRIDE_STEPS_BLOCK(STEPS) \
- void STEPS() override { \
- wgt::WgtInstaller::STEPS(); \
- if (crash_at_ > -1) \
- AddStepAtIndex<StepCrash>(crash_at_, type_); \
- else if (step_name_.size()) \
- AddStepAfter<StepCrash>(step_name_, type_); \
- else \
- AddStep<StepCrash>(type_); \
- } \
-
-class CrashWgtInstaller : public wgt::WgtInstaller {
- public:
- explicit CrashWgtInstaller(common_installer::PkgMgrPtr pkgmgr, int crash_at,
- std::string step_name, CrashStepType type) :
- wgt::WgtInstaller(pkgmgr), crash_at_(crash_at),
- step_name_(step_name), type_(type) { }
-
- private:
- OVERRIDE_STEPS_BLOCK(InstallSteps)
- OVERRIDE_STEPS_BLOCK(UpdateSteps)
- OVERRIDE_STEPS_BLOCK(UninstallSteps)
- OVERRIDE_STEPS_BLOCK(ReinstallSteps)
- OVERRIDE_STEPS_BLOCK(DeltaSteps)
- OVERRIDE_STEPS_BLOCK(MoveSteps)
- OVERRIDE_STEPS_BLOCK(RecoverySteps)
- OVERRIDE_STEPS_BLOCK(MountInstallSteps)
- OVERRIDE_STEPS_BLOCK(MountUpdateSteps)
- OVERRIDE_STEPS_BLOCK(ManifestDirectInstallSteps)
- OVERRIDE_STEPS_BLOCK(ManifestDirectUpdateSteps)
- OVERRIDE_STEPS_BLOCK(ManifestPartialInstallSteps)
- OVERRIDE_STEPS_BLOCK(ManifestPartialUpdateSteps)
- OVERRIDE_STEPS_BLOCK(PartialUninstallSteps)
- OVERRIDE_STEPS_BLOCK(ReadonlyUpdateInstallSteps)
- OVERRIDE_STEPS_BLOCK(ReadonlyUpdateUninstallSteps)
- OVERRIDE_STEPS_BLOCK(DisablePkgSteps)
- OVERRIDE_STEPS_BLOCK(EnablePkgSteps)
- OVERRIDE_STEPS_BLOCK(MigrateExtImgSteps)
- OVERRIDE_STEPS_BLOCK(RecoverDBSteps)
-
- int crash_at_;
- std::string step_name_;
- CrashStepType type_;
-};
-
-#ifdef OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS
-#undef OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS
-#endif
-#define OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(TYPE, STEPS) \
- void STEPS() override { \
- TYPE::STEPS(); \
- RemoveStep("RunParserPlugin"); \
- } \
-
-class WgtInstallerWithoutPasrserPlugins : public wgt::WgtInstaller {
- public:
- explicit WgtInstallerWithoutPasrserPlugins(
- common_installer::PkgMgrPtr pkgmgr) : wgt::WgtInstaller(pkgmgr) { }
-
- private:
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, InstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, UpdateSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, UninstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, ReinstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, DeltaSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, MoveSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, MountInstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, MountUpdateSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, ManifestDirectInstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, ManifestDirectUpdateSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, ManifestPartialInstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, ManifestPartialUpdateSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, PartialUninstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, ReadonlyUpdateInstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, ReadonlyUpdateUninstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, DisablePkgSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, EnablePkgSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, MigrateExtImgSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- wgt::WgtInstaller, RecoverDBSteps)
- void RecoverySteps() override {
- wgt::WgtInstaller::RecoverySteps();
- RemoveStep("RecoverParserPlugin");
- }
-};
-
-class HybridInstallerWithoutPasrserPlugins : public hybrid::HybridInstaller {
- public:
- explicit HybridInstallerWithoutPasrserPlugins(
- common_installer::PkgMgrPtr pkgmgr) : hybrid::HybridInstaller(pkgmgr) { }
-
- private:
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, InstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, UpdateSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, UninstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, ReinstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, DeltaSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, MoveSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, MountInstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, MountUpdateSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, ManifestDirectInstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, ManifestDirectUpdateSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, ManifestPartialInstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, ManifestPartialUpdateSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, PartialUninstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, ReadonlyUpdateInstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, ReadonlyUpdateUninstallSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, DisablePkgSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, EnablePkgSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, MigrateExtImgSteps)
- OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
- hybrid::HybridInstaller, RecoverDBSteps)
- void RecoverySteps() override {
- hybrid::HybridInstaller::RecoverySteps();
- RemoveStep("RecoverParserPlugin");
- }
-};
-
-} // namespace smoke_test
-
-
-#endif // UNIT_TESTS_WGT_SMOKE_UTILS_H_
--- /dev/null
+ADD_SUBDIRECTORY(smoke_tests)
--- /dev/null
+SET(DESTINATION_DIR wgt-installer-ut)
+SET(TARGET_SMOKE_UTILS smoke-utils)
+
+# Executables
+ADD_EXECUTABLE(${TARGET_SMOKE_TEST}
+ smoke_test.cc
+)
+ADD_EXECUTABLE(${TARGET_SMOKE_TEST_EXTENSIVE}
+ extensive_smoke_test.cc
+)
+ADD_EXECUTABLE(${TARGET_SMOKE_TEST_HELPER}
+ smoke_test_helper.cc
+)
+ADD_EXECUTABLE(${TARGET_MANIFEST_TEST}
+ manifest_test.cc
+)
+ADD_LIBRARY(${TARGET_WGT_SMOKE_UTILS} SHARED
+ wgt_smoke_utils.cc
+)
+
+TARGET_INCLUDE_DIRECTORIES(${TARGET_SMOKE_TEST} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
+TARGET_INCLUDE_DIRECTORIES(${TARGET_SMOKE_TEST_EXTENSIVE} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
+TARGET_INCLUDE_DIRECTORIES(${TARGET_SMOKE_TEST_HELPER} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
+TARGET_INCLUDE_DIRECTORIES(${TARGET_MANIFEST_TEST} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
+TARGET_INCLUDE_DIRECTORIES(${TARGET_WGT_SMOKE_UTILS} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
+
+INSTALL(DIRECTORY test_samples/ DESTINATION ${SHAREDIR}/${DESTINATION_DIR}/test_samples)
+
+APPLY_PKG_CONFIG(${TARGET_SMOKE_TEST} PUBLIC
+ Boost
+ GTEST
+ GUM_DEPS
+)
+APPLY_PKG_CONFIG(${TARGET_SMOKE_TEST_EXTENSIVE} PUBLIC
+ Boost
+ GTEST
+ GUM_DEPS
+)
+APPLY_PKG_CONFIG(${TARGET_MANIFEST_TEST} PUBLIC
+ Boost
+ GTEST
+)
+
+# FindGTest module do not sets all needed libraries in GTEST_LIBRARIES and
+# GTest main libraries is still missing, so additional linking of
+# GTEST_MAIN_LIBRARIES is needed.
+TARGET_LINK_LIBRARIES(${TARGET_SMOKE_TEST} PRIVATE ${TARGET_LIBNAME_WGT} ${TARGET_LIBNAME_HYBRID} ${GTEST_MAIN_LIBRARIES} ${TARGET_SMOKE_UTILS} ${TARGET_WGT_SMOKE_UTILS})
+TARGET_LINK_LIBRARIES(${TARGET_SMOKE_TEST_EXTENSIVE} PRIVATE ${TARGET_LIBNAME_WGT} ${TARGET_LIBNAME_HYBRID} ${GTEST_MAIN_LIBRARIES} ${TARGET_SMOKE_UTILS} ${TARGET_WGT_SMOKE_UTILS})
+TARGET_LINK_LIBRARIES(${TARGET_SMOKE_TEST_HELPER} PRIVATE ${TARGET_LIBNAME_WGT} ${TARGET_WGT_SMOKE_UTILS})
+TARGET_LINK_LIBRARIES(${TARGET_MANIFEST_TEST} PRIVATE ${TARGET_LIBNAME_WGT} ${GTEST_MAIN_LIBRARIES})
+TARGET_LINK_LIBRARIES(${TARGET_WGT_SMOKE_UTILS} PRIVATE ${TARGET_LIBNAME_WGT} ${TARGET_LIBNAME_HYBRID} ${TARGET_SMOKE_UTILS})
+
+INSTALL(TARGETS ${TARGET_SMOKE_TEST} DESTINATION ${BINDIR}/${DESTINATION_DIR})
+INSTALL(TARGETS ${TARGET_SMOKE_TEST_EXTENSIVE} DESTINATION ${BINDIR}/${DESTINATION_DIR})
+INSTALL(TARGETS ${TARGET_SMOKE_TEST_HELPER} DESTINATION ${BINDIR}/${DESTINATION_DIR})
+INSTALL(TARGETS ${TARGET_MANIFEST_TEST} DESTINATION ${BINDIR}/${DESTINATION_DIR})
+INSTALL(TARGETS ${TARGET_WGT_SMOKE_UTILS} DESTINATION ${LIB_INSTALL_DIR})
+INSTALL(FILES wgt_smoke_utils.h DESTINATION ${INCLUDEDIR}/app-installers/unit_tests/)
--- /dev/null
+// Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include <common/utils/subprocess.h>
+
+#include <common/utils/file_util.h>
+#include <unit_tests/common/smoke_utils.h>
+
+#include <gtest/gtest.h>
+#include <gtest/gtest-death-test.h>
+
+#include "smoke_tests/wgt_smoke_utils.h"
+
+namespace ci = common_installer;
+
+namespace smoke_test {
+
+class SmokeEnvironment : public testing::Environment {
+ public:
+ explicit SmokeEnvironment(ci::RequestMode mode) {\
+ request_mode_ = mode;
+ }
+ void SetUp() override {
+ if (request_mode_ == ci::RequestMode::USER)
+ ASSERT_TRUE(AddTestUser(&test_user));
+ backups_ = SetupBackupDirectories(test_user.uid);
+ for (auto& path : backups_)
+ ASSERT_TRUE(BackupPath(path));
+ }
+ void TearDown() override {
+ ASSERT_TRUE(request_mode_ == ci::RequestMode::GLOBAL ||
+ (request_mode_ == ci::RequestMode::USER &&
+ kGlobalUserUid != test_user.uid));
+ WgtBackendInterface backend(std::to_string(test_user.uid));
+ UninstallAllSmokeApps(request_mode_, test_user.uid, &backend);
+ for (auto& path : backups_)
+ ASSERT_TRUE(RestorePath(path));
+ if (request_mode_ == ci::RequestMode::USER)
+ ASSERT_TRUE(DeleteTestUser());
+ }
+ User test_user;
+
+ private:
+ ci::RequestMode request_mode_;
+ std::vector<bf::path> backups_;
+};
+
+} // namespace smoke_test
+
+namespace {
+
+smoke_test::SmokeEnvironment *env = nullptr;
+void signalHandler(int signum) {
+ env->TearDown();
+ exit(signum);
+}
+
+} // namespace
+
+namespace smoke_test {
+
+class SmokeTest : public testing::Test {
+ public:
+ SmokeTest() : backend(std::to_string(env->test_user.uid)),
+ params{PackageType::WGT, false} {
+ params.test_user.uid = env->test_user.uid;
+ params.test_user.gid = env->test_user.gid;
+ }
+ protected:
+ WgtBackendInterface backend;
+ TestParameters params;
+};
+
+class HybridSmokeTest : public testing::Test {
+ public:
+ HybridSmokeTest() : backend(std::to_string(env->test_user.uid)),
+ params{PackageType::HYBRID, false} {
+ params.test_user.uid = env->test_user.uid;
+ params.test_user.gid = env->test_user.gid;
+ }
+ protected:
+ HybridBackendInterface backend;
+ TestParameters params;
+};
+
+TEST_F(SmokeTest, RecoveryMode_ForInstallation) {
+ bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForInstallation.wgt";
+ std::string pkgid = "smokewgt09";
+ std::string appid = "smokewgt09.RecoveryModeForInstallation";
+
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ std::vector<std::string> args =
+ {"", "-i", path.string(), "-u", test_user_str.c_str()};
+ backend.CrashAfterEachStep(&args, [&](int step) -> bool {
+ if (step >= 2) {
+ bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
+ params.test_user.uid);
+ EXTENDED_ASSERT_FALSE(recovery_file.empty());
+ EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
+ ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+ }
+ return true;
+ }, params.pkg_type);
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForUpdate) {
+ bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForUpdate.wgt";
+ bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForUpdate_2.wgt";
+ RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
+ ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
+ std::string pkgid = "smokewgt10";
+ std::string appid = "smokewgt10.RecoveryModeForUpdate";
+ AddDataFiles(pkgid, params.test_user.uid);
+
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ std::vector<std::string> args =
+ {"", "-i", path_new.string(), "-u", test_user_str.c_str()};
+ backend.CrashAfterEachStep(&args, [&](int step) -> bool {
+ if (step >= 2) {
+ bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
+ params.test_user.uid);
+ EXTENDED_ASSERT_FALSE(recovery_file.empty());
+ EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
+ ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "res/wgt/VERSION", "1\n", params));
+ EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+ }
+ return true;
+ }, params.pkg_type);
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForDelta) {
+ bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForDelta.wgt";
+ bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
+ std::string pkgid = "smokewgt30";
+ std::string appid = "smokewgt30.RecoveryModeForDelta";
+ RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
+ ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ std::vector<std::string> args =
+ {"", "-i", path_new.string(), "-u", test_user_str.c_str()};
+ backend.CrashAfterEachStep(&args, [&](int step) -> bool {
+ if (step >= 2) {
+ bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
+ params.test_user.uid);
+ EXTENDED_ASSERT_FALSE(recovery_file.empty());
+ EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
+ ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "res/wgt/VERSION", "1\n", params));
+ EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+ }
+ return true;
+ }, params.pkg_type);
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
+ bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForMountInstall.wgt";
+ std::string pkgid = "smokewgt31";
+ std::string appid = "smokewgt31.RecoveryModeForMountInstall";
+ RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ std::vector<std::string> args =
+ {"", "-w", path.string(), "-u", test_user_str.c_str()};
+ backend.CrashAfterEachStep(&args, [&](int step) -> bool {
+ if (step >= 2) {
+ bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
+ params.test_user.uid);
+ EXTENDED_ASSERT_FALSE(recovery_file.empty());
+ EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
+ ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+ }
+ return true;
+ }, params.pkg_type);
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
+ bf::path path_old =
+ kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate.wgt";
+ bf::path path_new =
+ kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate_2.wgt";
+ std::string pkgid = "smokewgt32";
+ std::string appid = "smokewgt32.RecoveryModeForMountUpdate";
+ RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
+ ASSERT_EQ(backend.MountInstall(path_old), ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ std::vector<std::string> args =
+ {"", "-w", path_new.string(), "-u", test_user_str.c_str()};
+ backend.CrashAfterEachStep(&args, [&](int step) -> bool {
+ if (step >= 2) {
+ // Filesystem may be mounted after crash
+ ScopedTzipInterface poweroff_unmount_interface(pkgid,
+ params.test_user.uid);
+ poweroff_unmount_interface.Release();
+
+ bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
+ params.test_user.uid);
+ EXTENDED_ASSERT_FALSE(recovery_file.empty());
+ EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
+ ci::AppInstaller::Result::OK);
+
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(
+ pkgid, "res/wgt/VERSION", "1\n", params));
+ EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+ }
+ return true;
+ }, params.pkg_type);
+}
+
+
+TEST_F(SmokeTest, InstallationMode_Rollback) {
+ bf::path path = kSmokePackagesDirectory / "InstallationMode_Rollback.wgt";
+ std::string pkgid = "smokewgt06";
+ std::string appid = "smokewgt06.InstallationModeRollback";
+
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ const char* argv[] = {"", "-i", path.c_str(), "-u", test_user_str.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+ return true;
+ });
+}
+
+TEST_F(SmokeTest, UpdateMode_Rollback) {
+ bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Rollback.wgt";
+ bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Rollback_2.wgt";
+ std::string pkgid = "smokewgt07";
+ std::string appid = "smokewgt07.UpdateModeRollback";
+ ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ const char* argv[] =
+ {"", "-i", path_new.c_str(), "-u", test_user_str.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "res/wgt/VERSION", "1\n", params));
+ EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+ return true;
+ });
+}
+
+TEST_F(SmokeTest, DeltaMode_Rollback) {
+ bf::path path = kSmokePackagesDirectory / "DeltaMode_Rollback.wgt";
+ bf::path delta_package = kSmokePackagesDirectory / "DeltaMode_Rollback.delta";
+ std::string pkgid = "smokewgt01";
+ std::string appid = "smokewgt01.DeltaMode";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ const char* argv[] =
+ {"", "-i", delta_package.c_str(), "-u", test_user_str.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED",
+ "version 1\n", params));
+ EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+ EXTENDED_ASSERT_TRUE(bf::exists(GetPackageRoot(
+ pkgid, params.test_user.uid) / "res/wgt/DELETED"));
+ EXTENDED_ASSERT_FALSE(bf::exists(GetPackageRoot(
+ pkgid, params.test_user.uid) / "res/wgt/ADDED"));
+ return true;
+ });
+}
+
+TEST_F(HybridSmokeTest, InstallationMode_Rollback) {
+ bf::path path = kSmokePackagesDirectory /
+ "InstallationMode_Rollback_Hybrid.wgt";
+ std::string pkgid = "smokehyb07";
+ std::string appid1 = "smokehyb07.web";
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ const char* argv[] = {"", "-i", path.c_str(), "-u", test_user_str.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+ return true;
+ });
+}
+
+TEST_F(HybridSmokeTest, UpdateMode_Rollback) {
+ bf::path path_old = kSmokePackagesDirectory /
+ "UpdateMode_Rollback_Hybrid.wgt";
+ bf::path path_new = kSmokePackagesDirectory /
+ "UpdateMode_Rollback_Hybrid_2.wgt";
+ std::string pkgid = "smokehyb08";
+ std::string appid1 = "smokehyb08.web";
+ ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ const char* argv[] =
+ {"", "-i", path_new.c_str(), "-u", test_user_str.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
+
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "res/wgt/VERSION", "1\n", params));
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "lib/VERSION", "1\n", params));
+ EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+ return true;
+ });
+}
+
+TEST_F(HybridSmokeTest, DeltaMode_Rollback_Hybrid) {
+ bf::path path = kSmokePackagesDirectory / "DeltaMode_Rollback_Hybrid.wgt";
+ bf::path delta_package = kSmokePackagesDirectory /
+ "DeltaMode_Rollback_Hybrid.delta";
+ std::string pkgid = "smokehyb11";
+ std::string appid1 = "smokehyb11.web";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ const char* argv[] = {"", "-i", path.c_str(), "-u", test_user_str.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
+ // Check delta modifications
+ bf::path root_path = GetPackageRoot(pkgid, params.test_user.uid);
+ EXTENDED_ASSERT_TRUE(bf::exists(root_path / "res" / "wgt" / "DELETED"));
+ EXTENDED_ASSERT_FALSE(bf::exists(root_path / "res" / "wgt" / "ADDED"));
+ EXTENDED_ASSERT_TRUE(bf::exists(root_path / "lib" / "DELETED"));
+ EXTENDED_ASSERT_FALSE(bf::exists(root_path / "lib" / "ADDED"));
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED",
+ "version 1\n", params));
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "lib/MODIFIED",
+ "version 1\n", params));
+ EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+ return true;
+ });
+}
+
+TEST_F(HybridSmokeTest, MountInstallationMode_Rollback) {
+ bf::path path = kSmokePackagesDirectory /
+ "MountInstallationMode_Rollback_Hybrid.wgt";
+ std::string pkgid = "smokehyb09";
+ std::string appid1 = "smokehyb09.web";
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ const char* argv[] = {"", "-w", path.c_str(), "-u", test_user_str.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+ return true;
+ });
+}
+
+TEST_F(HybridSmokeTest, MountUpdateMode_Rollback) {
+ bf::path path_old = kSmokePackagesDirectory /
+ "MountUpdateMode_Rollback_Hybrid.wgt";
+ bf::path path_new = kSmokePackagesDirectory /
+ "MountUpdateMode_Rollback_Hybrid_2.wgt";
+ std::string pkgid = "smokehyb10";
+ std::string appid1 = "smokehyb10.web";
+ ASSERT_EQ(backend.MountInstall(path_old), ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ const char* argv[] =
+ {"", "-w", path_new.c_str(), "-u", test_user_str.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
+
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "res/wgt/VERSION", "1\n", params));
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "lib/VERSION", "1\n", params));
+ EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+ return true;
+ });
+}
+
+TEST_F(SmokeTest, MountInstallationMode_Rollback) {
+ bf::path path =
+ kSmokePackagesDirectory / "MountInstallationMode_Rollback.wgt";
+ std::string pkgid = "smokewgt33";
+ std::string appid = "smokewgt33.web";
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ const char* argv[] = {"", "-w", path.c_str(), "-u", test_user_str.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [=]() -> bool {
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+ return true;
+ });
+}
+
+TEST_F(SmokeTest, MountUpdateMode_Rollback) {
+ bf::path path_old = kSmokePackagesDirectory / "MountUpdateMode_Rollback.wgt";
+ bf::path path_new =
+ kSmokePackagesDirectory / "MountUpdateMode_Rollback_2.wgt";
+ std::string pkgid = "smokewgt34";
+ std::string appid = "smokewgt34.web";
+ ASSERT_EQ(backend.MountInstall(path_old),
+ ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ std::string test_user_str = std::to_string(params.test_user.uid);
+ const char* argv[] =
+ {"", "-w", path_new.c_str(), "-u", test_user_str.c_str()};
+ backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+
+ EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
+ "res/wgt/VERSION", "1\n", params));
+ EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+ return true;
+ });
+}
+
+} // namespace smoke_test
+
+int main(int argc, char** argv) {
+ try {
+ ci::RequestMode request_mode = smoke_test::ParseRequestMode(argc, argv);
+ if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) {
+ std::cout << "Skip tests for preload request" << std::endl;
+ ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
+ }
+ testing::InitGoogleTest(&argc, argv);
+ ::env = static_cast<smoke_test::SmokeEnvironment*>(
+ testing::AddGlobalTestEnvironment(
+ new smoke_test::SmokeEnvironment(request_mode)));
+ signal(SIGINT, ::signalHandler);
+ signal(SIGSEGV, ::signalHandler);
+ return RUN_ALL_TESTS();
+ } catch (...) {
+ std::cout << "Exception occurred during testing";
+ return 1;
+ }
+}
--- /dev/null
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include <boost/filesystem/path.hpp>
+
+#include <common/installer_context.h>
+#include <common/utils/glist_range.h>
+#include <common/utils/request.h>
+
+#include <wgt_manifest_handlers/setting_handler.h>
+
+#include <glib.h>
+#include <gtest/gtest.h>
+
+#include <map>
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "wgt/step/configuration/step_parse.h"
+#include "wgt/utils/wgt_backend_data.h"
+
+#define ASSERT_CSTR_EQ(STR1, STR2) \
+ ASSERT_EQ(strcmp(STR1, STR2), 0) \
+
+namespace bf = boost::filesystem;
+namespace ci = common_installer;
+
+namespace {
+
+const char kManifestTestcaseData[] =
+ "/usr/share/wgt-installer-ut/test_samples/manifest/";
+
+template<typename T>
+gint Size(GListRange<T>* range) {
+ return std::distance(range->begin(), range->end());
+}
+
+class StepParseRunner {
+ public:
+ explicit StepParseRunner(const std::string& dir_suffix,
+ bool ignore_start_files = true)
+ : dir_suffix_(dir_suffix),
+ ignore_start_files_(ignore_start_files),
+ context_(nullptr) {
+ }
+
+ bool Run() {
+ PrepareContext();
+ wgt::configuration::StepParse step(context_.get(),
+ wgt::configuration::StepParse::ConfigLocation::PACKAGE,
+ !ignore_start_files_);
+ return step.process() == ci::Step::Status::OK;
+ }
+
+ wgt::WgtBackendData* GetBackendData() const {
+ return static_cast<wgt::WgtBackendData*>(context_->backend_data.get());
+ }
+
+ manifest_x* GetManifest() const {
+ return context_->manifest_data.get();
+ }
+
+ private:
+ void PrepareContext() {
+ context_.reset(new ci::InstallerContext());
+ context_->root_application_path.set(ci::GetRootAppPath(false, getuid()));
+ context_->unpacked_dir_path.set(
+ bf::path(kManifestTestcaseData) / dir_suffix_);
+ context_->backend_data.set(new wgt::WgtBackendData());
+ }
+
+ std::string dir_suffix_;
+ bool ignore_start_files_;
+ std::unique_ptr<ci::InstallerContext> context_;
+};
+
+} // namespace
+
+class ManifestTest : public testing::Test {
+ public:
+ std::string GetMyName() const {
+ std::string suite =
+ testing::UnitTest::GetInstance()->current_test_info()->test_case_name();
+ std::string case_name =
+ testing::UnitTest::GetInstance()->current_test_info()->name();
+ return suite + '.' + case_name;
+ }
+};
+
+TEST_F(ManifestTest, WidgetElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->package, "package0id");
+ auto apps = GListRange<application_x*>(m->application);
+ ASSERT_EQ(Size(&apps), 1);
+ application_x* app = *apps.begin();
+ ASSERT_CSTR_EQ(app->appid, "package0id.appid");
+}
+
+TEST_F(ManifestTest, WidgetElement_InvalidNamespace) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, WidgetElement_MissingNamespace) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, WidgetElement_ManyNamespaces) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ApplicationElement_ManyElements) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ApplicationElement_ValidAppId) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto apps = GListRange<application_x*>(m->application);
+ application_x* app = *apps.begin();
+ ASSERT_NE(app, nullptr);
+ ASSERT_CSTR_EQ(app->appid, "package0id.appid");
+}
+
+TEST_F(ManifestTest, ApplicationElement_MissingAppId) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ApplicationElement_InvalidAppId) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ApplicationElement_ValidPackage) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->package, "package0id");
+}
+
+TEST_F(ManifestTest, ApplicationElement_InvalidPackage) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ApplicationElement_MissingPackage) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ApplicationElement_ValidVersion) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ ASSERT_CSTR_EQ(m->api_version, "3.0");
+}
+
+TEST_F(ManifestTest, ApplicationElement_InvalidVersion) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ApplicationElement_MissingVersion) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, PrivilegeElement_ValidName) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ std::vector<std::string> priv_vec;
+ for (privilege_x* priv : GListRange<privilege_x*>(m->privileges)) {
+ priv_vec.push_back(priv->value);
+ }
+ ASSERT_FALSE(priv_vec.empty());
+ const char* expected_name = "http://tizen.org/privilege/application.launch";
+ ASSERT_CSTR_EQ(priv_vec[0].c_str(), expected_name);
+}
+
+TEST_F(ManifestTest, PrivilegeElement_ManyElements) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ std::vector<std::string> priv_vec;
+ for (privilege_x* priv : GListRange<privilege_x*>(m->privileges)) {
+ priv_vec.push_back(priv->value);
+ }
+ ASSERT_EQ(priv_vec.size(), 2);
+ const char* first_priv = "http://tizen.org/privilege/application.close";
+ ASSERT_CSTR_EQ(priv_vec[0].c_str(), first_priv);
+ const char* second_priv = "http://tizen.org/privilege/application.launch";
+ ASSERT_CSTR_EQ(priv_vec[1].c_str(), second_priv);
+}
+
+TEST_F(ManifestTest, PrivilegeElement_InvalidName) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, PrivilegeElement_MissingName) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegeElement_Invalid_NotURI) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegeElement_Invalid_OverLength) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegeElement_ValidName) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ std::vector<std::string> priv_vec;
+ for (appdefined_privilege_x* priv :
+ GListRange<appdefined_privilege_x*>(m->appdefined_privileges)) {
+ priv_vec.push_back(priv->value);
+ }
+ ASSERT_FALSE(priv_vec.empty());
+ const char* expected_name = "http://package0id/appdefined/test.read";
+ ASSERT_CSTR_EQ(priv_vec[0].c_str(), expected_name);
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegeElement_ManyElements) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ std::vector<std::string> priv_vec;
+ for (appdefined_privilege_x* priv :
+ GListRange<appdefined_privilege_x*>(m->appdefined_privileges)) {
+ priv_vec.push_back(priv->value);
+ }
+ ASSERT_EQ(priv_vec.size(), 2);
+ const char* first_priv = "http://package0id/appdefined/test.read";
+ ASSERT_CSTR_EQ(priv_vec[0].c_str(), first_priv);
+ const char* second_priv = "http://package0id/appdefined/test.write";
+ ASSERT_CSTR_EQ(priv_vec[1].c_str(), second_priv);
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegeElement_WithLicenseValidName) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ std::vector<std::string> priv_vec;
+ std::vector<std::string> license_vec;
+ for (appdefined_privilege_x* priv :
+ GListRange<appdefined_privilege_x*>(m->appdefined_privileges)) {
+ priv_vec.push_back(priv->value);
+ license_vec.push_back(priv->license);
+ }
+ ASSERT_FALSE(priv_vec.empty());
+ const char* expected_name = "http://package0id/appdefined/test.read";
+ ASSERT_CSTR_EQ(priv_vec[0].c_str(), expected_name);
+ ASSERT_FALSE(license_vec.empty());
+ bf::path path(m->root_path);
+ path /= "res/cert";
+ ASSERT_CSTR_EQ(license_vec[0].c_str(), path.c_str());
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegeElement_WithLicenseManyElements) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ std::vector<std::string> priv_vec;
+ std::vector<std::string> license_vec;
+ for (appdefined_privilege_x* priv :
+ GListRange<appdefined_privilege_x*>(m->appdefined_privileges)) {
+ priv_vec.push_back(priv->value);
+ license_vec.push_back(priv->license);
+ }
+ ASSERT_EQ(priv_vec.size(), 2);
+ const char* first_priv = "http://package0id/appdefined/test.read";
+ ASSERT_CSTR_EQ(priv_vec[0].c_str(), first_priv);
+ const char* second_priv = "http://package0id/appdefined/test.write";
+ ASSERT_CSTR_EQ(priv_vec[1].c_str(), second_priv);
+ ASSERT_EQ(license_vec.size(), 2);
+ bf::path path(m->root_path);
+ path /= "res/cert";
+ ASSERT_CSTR_EQ(license_vec[0].c_str(), path.c_str());
+ ASSERT_CSTR_EQ(license_vec[1].c_str(), path.c_str());
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegeElement_InvalidName) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, AppDefinedPrivilegeElement_MissingName) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_Invalid_NotURI) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_Invalid_NoPKGID) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_Invalid_OverLength) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_ValidName) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ std::vector<std::string> priv_vec;
+ for (appdefined_privilege_x* priv : GListRange<appdefined_privilege_x*>(
+ m->provides_appdefined_privileges)) {
+ priv_vec.push_back(priv->value);
+ }
+ ASSERT_FALSE(priv_vec.empty());
+ const char* expected_name = "http://package0id/appdefined/test.read";
+ ASSERT_CSTR_EQ(priv_vec[0].c_str(), expected_name);
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_ManyElements) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ std::vector<std::string> priv_vec;
+ for (appdefined_privilege_x* priv : GListRange<appdefined_privilege_x*>(
+ m->provides_appdefined_privileges)) {
+ priv_vec.push_back(priv->value);
+ }
+ ASSERT_EQ(priv_vec.size(), 2);
+ const char* first_priv = "http://package0id/appdefined/test.read";
+ ASSERT_CSTR_EQ(priv_vec[0].c_str(), first_priv);
+ const char* second_priv = "http://package0id/appdefined/test.write";
+ ASSERT_CSTR_EQ(priv_vec[1].c_str(), second_priv);
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_WithLicenseValidName) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ std::vector<std::string> priv_vec;
+ std::vector<std::string> license_vec;
+ for (appdefined_privilege_x* priv : GListRange<appdefined_privilege_x*>(
+ m->provides_appdefined_privileges)) {
+ priv_vec.push_back(priv->value);
+ license_vec.push_back(priv->license);
+ }
+ ASSERT_FALSE(priv_vec.empty());
+ const char* expected_name = "http://package0id/appdefined/test.read";
+ ASSERT_CSTR_EQ(priv_vec[0].c_str(), expected_name);
+ ASSERT_FALSE(license_vec.empty());
+ bf::path path(m->root_path);
+ path /= "res/cert";
+ ASSERT_CSTR_EQ(license_vec[0].c_str(), path.c_str());
+}
+
+TEST_F(ManifestTest,
+ ProvidesAppDefinedPrivilegeElement_WithLicenseManyElements) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ std::vector<std::string> priv_vec;
+ std::vector<std::string> license_vec;
+ for (appdefined_privilege_x* priv : GListRange<appdefined_privilege_x*>(
+ m->provides_appdefined_privileges)) {
+ priv_vec.push_back(priv->value);
+ license_vec.push_back(priv->license);
+ }
+ ASSERT_EQ(priv_vec.size(), 2);
+ const char* first_priv = "http://package0id/appdefined/test.read";
+ ASSERT_CSTR_EQ(priv_vec[0].c_str(), first_priv);
+ const char* second_priv = "http://package0id/appdefined/test.write";
+ ASSERT_CSTR_EQ(priv_vec[1].c_str(), second_priv);
+ ASSERT_EQ(license_vec.size(), 2);
+ bf::path path(m->root_path);
+ path /= "res/cert";
+ ASSERT_CSTR_EQ(license_vec[0].c_str(), path.c_str());
+ ASSERT_CSTR_EQ(license_vec[1].c_str(), path.c_str());
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_InvalidName) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, ProvidesAppDefinedPrivilegeElement_MissingName) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, AppControlElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto apps = GListRange<application_x*>(m->application);
+ application_x* app = *apps.begin();
+ ASSERT_NE(app, nullptr);
+ std::vector<appcontrol_x*> app_controls;
+ for (appcontrol_x* app_control : GListRange<appcontrol_x*>(app->appcontrol)) {
+ app_controls.push_back(app_control);
+ }
+ ASSERT_EQ(app_controls.size(), 1);
+ ASSERT_CSTR_EQ(app_controls[0]->mime, "image/jpg");
+ ASSERT_CSTR_EQ(app_controls[0]->operation,
+ "http://tizen.org/appcontrol/operation/edit");
+ ASSERT_CSTR_EQ(app_controls[0]->uri, "myapp");
+}
+
+TEST_F(ManifestTest, AppControlElement_MissingMIME) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto apps = GListRange<application_x*>(m->application);
+ application_x* app = *apps.begin();
+ ASSERT_NE(app, nullptr);
+ std::vector<appcontrol_x*> app_controls;
+ for (appcontrol_x* app_control : GListRange<appcontrol_x*>(app->appcontrol)) {
+ app_controls.push_back(app_control);
+ }
+ ASSERT_CSTR_EQ(app_controls[0]->mime, "");
+}
+
+TEST_F(ManifestTest, AppControlElement_MissingOperation) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, AppControlElement_MissingSrc) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, AppControlElement_MissingURI) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto apps = GListRange<application_x*>(m->application);
+ application_x* app = *apps.begin();
+ ASSERT_NE(app, nullptr);
+ std::vector<appcontrol_x*> app_controls;
+ for (appcontrol_x* app_control : GListRange<appcontrol_x*>(app->appcontrol)) {
+ app_controls.push_back(app_control);
+ }
+ ASSERT_CSTR_EQ(app_controls[0]->uri, "");
+}
+
+TEST_F(ManifestTest, SettingsElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+
+ ASSERT_EQ(settings.background_support_enabled(), true);
+ ASSERT_EQ(settings.context_menu_enabled(), false);
+ ASSERT_EQ(settings.encryption_enabled(), true);
+ ASSERT_EQ(settings.screen_orientation(),
+ wgt::parse::SettingInfo::ScreenOrientation::LANDSCAPE);
+ ASSERT_EQ(settings.install_location(),
+ wgt::parse::SettingInfo::InstallLocation::INTERNAL);
+ ASSERT_EQ(settings.hwkey_enabled(), true);
+ ASSERT_EQ(settings.background_vibration(), true);
+}
+
+TEST_F(ManifestTest, SettingsElement_BackgroundSupportEnabled) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.background_support_enabled(), true);
+}
+
+TEST_F(ManifestTest, SettingsElement_BackgroundSupportDisabled) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.background_support_enabled(), false);
+}
+
+TEST_F(ManifestTest, SettingsElement_MissingBackgroundSupport) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.background_support_enabled(), false);
+}
+
+TEST_F(ManifestTest, SettingsElement_BackgroundVibrationEnabled) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.background_vibration(), true);
+}
+
+TEST_F(ManifestTest, SettingsElement_BackgroundVibrationDisabled) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.background_vibration(), false);
+}
+
+TEST_F(ManifestTest, SettingsElement_MissingBackgroundVibration) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.background_vibration(), false);
+}
+
+TEST_F(ManifestTest, SettingsElement_ContextMenuEnabled) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.context_menu_enabled(), true);
+}
+
+TEST_F(ManifestTest, SettingsElement_ContextMenuDisabled) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.context_menu_enabled(), false);
+}
+
+TEST_F(ManifestTest, SettingsElement_MissingContextMenu) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.context_menu_enabled(), true);
+}
+
+TEST_F(ManifestTest, SettingsElement_EncryptionEnabled) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.encryption_enabled(), true);
+}
+
+TEST_F(ManifestTest, SettingsElement_EncryptionDisabled) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.encryption_enabled(), false);
+}
+
+TEST_F(ManifestTest, SettingsElement_MissingEncryption) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.encryption_enabled(), false);
+}
+
+TEST_F(ManifestTest, SettingsElement_HwKeyEnabled) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.hwkey_enabled(), true);
+}
+
+TEST_F(ManifestTest, SettingsElement_HwKeyDisabled) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.hwkey_enabled(), false);
+}
+
+TEST_F(ManifestTest, SettingsElement_MissingHwKeyEvent) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.hwkey_enabled(), true);
+}
+
+TEST_F(ManifestTest, SettingsElement_MissingInstallLocation) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.install_location(),
+ wgt::parse::SettingInfo::InstallLocation::AUTO);
+}
+
+TEST_F(ManifestTest, SettingsElement_MissingScreenOrientation) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto backend_data = runner.GetBackendData();
+ auto settings = backend_data->settings.get();
+ ASSERT_EQ(settings.screen_orientation(),
+ wgt::parse::SettingInfo::ScreenOrientation::AUTO);
+}
+
+TEST_F(ManifestTest, MetadataElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto apps = GListRange<application_x*>(m->application);
+ application_x* app = *apps.begin();
+
+ std::map<std::string, std::string> meta_data_map;
+ for (metadata_x* meta_data : GListRange<metadata_x*>(app->metadata)) {
+ if (meta_data->value)
+ meta_data_map[meta_data->key] = meta_data->value;
+ else
+ meta_data_map[meta_data->key] = std::string();
+ }
+ ASSERT_EQ(meta_data_map.size(), 2);
+ ASSERT_CSTR_EQ(meta_data_map["key1"].c_str(), "");
+ ASSERT_CSTR_EQ(meta_data_map["key2"].c_str(), "value2");
+}
+
+TEST_F(ManifestTest, MetadataElement_DuplicateKey) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto apps = GListRange<application_x*>(m->application);
+ application_x* app = *apps.begin();
+
+ std::map<std::string, std::string> meta_data_map;
+ for (metadata_x* meta_data : GListRange<metadata_x*>(app->metadata)) {
+ meta_data_map[meta_data->key] = meta_data->value;
+ }
+ ASSERT_EQ(meta_data_map.size(), 2);
+ ASSERT_CSTR_EQ(meta_data_map["key1"].c_str(), "key1value");
+ ASSERT_CSTR_EQ(meta_data_map["key2"].c_str(), "key2value");
+}
+
+TEST_F(ManifestTest, MetadataElement_MissingValue) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto apps = GListRange<application_x*>(m->application);
+ application_x* app = *apps.begin();
+
+ std::map<std::string, std::string> meta_data_map;
+ for (metadata_x* meta_data : GListRange<metadata_x*>(app->metadata)) {
+ if (meta_data->value)
+ meta_data_map[meta_data->key] = meta_data->value;
+ else
+ meta_data_map[meta_data->key] = std::string();
+ }
+ ASSERT_EQ(meta_data_map.size(), 2);
+ ASSERT_CSTR_EQ(meta_data_map["key1"].c_str(), "");
+ ASSERT_CSTR_EQ(meta_data_map["key2"].c_str(), "");
+}
+
+TEST_F(ManifestTest, MetadataElement_MissingKey) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, CategoryElement_Valid) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto apps = GListRange<application_x*>(m->application);
+ application_x* app = *apps.begin();
+
+ std::vector<std::string> categories;
+ for (const char* category : GListRange<char*>(app->category)) {
+ categories.push_back(category);
+ }
+ ASSERT_EQ(categories.size(), 1);
+ ASSERT_CSTR_EQ(categories[0].c_str(),
+ "http://tizen.org/category/wearable_clock");
+}
+
+TEST_F(ManifestTest, CategoryElement_MissingName) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_FALSE(runner.Run());
+}
+
+TEST_F(ManifestTest, CategoryElement_MultipleElements) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto apps = GListRange<application_x*>(m->application);
+ application_x* app = *apps.begin();
+
+ std::vector<std::string> categories;
+ for (const char* category : GListRange<char*>(app->category)) {
+ categories.push_back(category);
+ }
+ ASSERT_EQ(categories.size(), 3);
+ ASSERT_CSTR_EQ(categories[0].c_str(),
+ "http://tizen.org/category/category_0");
+ ASSERT_CSTR_EQ(categories[1].c_str(),
+ "http://tizen.org/category/category_1");
+ ASSERT_CSTR_EQ(categories[2].c_str(),
+ "http://tizen.org/category/category_2");
+}
--- /dev/null
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include <gtest/gtest-death-test.h>
+
+#include <common/utils/subprocess.h>
+#include <common/utils/file_util.h>
+#include <common/utils/pkgmgr_query.h>
+#include <unit_tests/common/smoke_utils.h>
+
+#include <memory>
+
+#include "smoke_tests/wgt_smoke_utils.h"
+
+namespace st = smoke_test;
+namespace bf = boost::filesystem;
+namespace bs = boost::system;
+namespace ci = common_installer;
+namespace bo = boost::program_options;
+
+namespace smoke_test {
+
+class SmokeEnvironment : public testing::Environment {
+ public:
+ explicit SmokeEnvironment(ci::RequestMode mode) {\
+ request_mode_ = mode;
+ }
+ void SetUp() override {
+ if (request_mode_ == ci::RequestMode::USER)
+ ASSERT_TRUE(AddTestUser(&test_user));
+ backups_ = SetupBackupDirectories(test_user.uid);
+ for (auto& path : backups_)
+ ASSERT_TRUE(BackupPath(path));
+ }
+ void TearDown() override {
+ ASSERT_TRUE(request_mode_ == ci::RequestMode::GLOBAL ||
+ (request_mode_ == ci::RequestMode::USER &&
+ kGlobalUserUid != test_user.uid));
+ WgtBackendInterface backend(std::to_string(test_user.uid));
+ UninstallAllSmokeApps(request_mode_, test_user.uid, &backend);
+ for (auto& path : backups_)
+ ASSERT_TRUE(RestorePath(path));
+ if (request_mode_ == ci::RequestMode::USER)
+ ASSERT_TRUE(DeleteTestUser());
+ }
+ User test_user;
+
+ private:
+ ci::RequestMode request_mode_;
+ std::vector<bf::path> backups_;
+};
+
+} // namespace smoke_test
+
+namespace {
+
+smoke_test::SmokeEnvironment* env = nullptr;
+void signalHandler(int signum) {
+ env->TearDown();
+ exit(signum);
+}
+
+} // namespace
+
+namespace smoke_test {
+
+class SmokeTest : public testing::Test {
+ public:
+ SmokeTest() : backend(std::to_string(env->test_user.uid)),
+ params{PackageType::WGT, false} {
+ params.test_user.uid = env->test_user.uid;
+ params.test_user.gid = env->test_user.gid;
+ }
+ protected:
+ WgtBackendInterface backend;
+ TestParameters params;
+};
+
+class RollbackSmokeTest : public testing::Test {
+ public:
+ RollbackSmokeTest() : backend(std::to_string(env->test_user.uid),
+ RequestResult::FAIL), params{PackageType::WGT, false} {
+ params.test_user.uid = env->test_user.uid;
+ params.test_user.gid = env->test_user.gid;
+ }
+ protected:
+ WgtBackendInterface backend;
+ TestParameters params;
+};
+
+class HybridSmokeTest : public testing::Test {
+ public:
+ HybridSmokeTest() : backend(std::to_string(env->test_user.uid)),
+ params{PackageType::HYBRID, false} {
+ params.test_user.uid = env->test_user.uid;
+ params.test_user.gid = env->test_user.gid;
+ }
+ protected:
+ HybridBackendInterface backend;
+ TestParameters params;
+};
+
+class RollbackHybridSmokeTest : public testing::Test {
+ public:
+ RollbackHybridSmokeTest() : backend(std::to_string(env->test_user.uid),
+ RequestResult::FAIL), params{PackageType::HYBRID, false} {
+ params.test_user.uid = env->test_user.uid;
+ params.test_user.gid = env->test_user.gid;
+ }
+ protected:
+ HybridBackendInterface backend;
+ TestParameters params;
+};
+
+class PreloadSmokeTest : public testing::Test {
+ public:
+ PreloadSmokeTest() : backend(std::to_string(env->test_user.uid)),
+ params{PackageType::WGT, true} {
+ params.test_user.uid = env->test_user.uid;
+ params.test_user.gid = env->test_user.gid;
+ }
+ protected:
+ WgtBackendInterface backend;
+ TestParameters params;
+};
+
+class HybridPreloadSmokeTest : public testing::Test {
+ public:
+ HybridPreloadSmokeTest() : backend(std::to_string(env->test_user.uid)),
+ params{PackageType::HYBRID, true} {
+ params.test_user.uid = env->test_user.uid;
+ params.test_user.gid = env->test_user.gid;
+ }
+ protected:
+ HybridBackendInterface backend;
+ TestParameters params;
+};
+
+TEST_F(SmokeTest, InstallationMode) {
+ bf::path path = kSmokePackagesDirectory / "InstallationMode.wgt";
+ std::string pkgid = "smokewgt03";
+ std::string appid = "smokewgt03.InstallationMode";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+}
+
+TEST_F(SmokeTest, UpdateMode) {
+ bf::path path_old = kSmokePackagesDirectory / "UpdateMode.wgt";
+ bf::path path_new = kSmokePackagesDirectory / "UpdateMode_2.wgt";
+ std::string pkgid = "smokewgt04";
+ std::string appid = "smokewgt04.UpdateMode";
+ ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ ASSERT_EQ(backend.Install(path_new), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "2\n",
+ params));
+ ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+}
+
+TEST_F(SmokeTest, DeinstallationMode) {
+ bf::path path = kSmokePackagesDirectory / "DeinstallationMode.wgt";
+ std::string pkgid = "smokewgt05";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Uninstall(pkgid), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+}
+
+TEST_F(SmokeTest, RDSMode) {
+ bf::path path = kSmokePackagesDirectory / "RDSMode.wgt";
+ std::string pkgid = "smokewgt11";
+ std::string appid = "smokewgt11.RDSMode";
+ bf::path delta_directory = kSmokePackagesDirectory / "delta_dir";
+ bf::path sdk_expected_directory = kSdkDirectory / "tmp" / pkgid;
+ ASSERT_TRUE(ci::CopyDir(delta_directory, sdk_expected_directory));
+ ASSERT_EQ(backend.RDSUpdate(path, pkgid),
+ ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+ // Check delta modifications
+ ASSERT_FALSE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
+ "res" / "wgt" / "DELETED"));
+ ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
+ "res" / "wgt" / "ADDED"));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED", "2\n",
+ params));
+}
+
+TEST_F(SmokeTest, EnablePkg) {
+ bf::path path = kSmokePackagesDirectory / "EnablePkg.wgt";
+ std::string pkgid = "smokewgt22";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.DisablePackage(pkgid), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.EnablePackage(pkgid), ci::AppInstaller::Result::OK);
+
+ ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
+ ASSERT_TRUE(pkg_query.IsPackageInstalled(
+ ci::GetRequestMode(params.test_user.uid)));
+}
+
+TEST_F(SmokeTest, DisablePkg) {
+ bf::path path = kSmokePackagesDirectory / "DisablePkg.wgt";
+ std::string pkgid = "smokewgt21";
+ std::string appid = "smokewgt21.DisablePkg";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.DisablePackage(pkgid), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ci::QueryIsDisabledPackage(pkgid, params.test_user.uid));
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+}
+
+TEST_F(SmokeTest, DeltaMode) {
+ bf::path path = kSmokePackagesDirectory / "DeltaMode.wgt";
+ bf::path delta_package = kSmokePackagesDirectory / "DeltaMode.delta";
+ std::string pkgid = "smokewgt17";
+ std::string appid = "smokewgt17.DeltaMode";
+ ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Install(delta_package), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+
+ // Check delta modifications
+ ASSERT_FALSE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
+ "res" / "wgt" / "DELETED"));
+ ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
+ "res" / "wgt" / "ADDED"));
+ ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
+ "res" / "wgt" / "css" / "style.css"));
+ ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
+ "res" / "wgt" / "images" / "tizen_32.png"));
+ ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
+ "res" / "wgt" / "js" / "main.js"));
+ ASSERT_TRUE(ValidateFileContentInPackage(
+ pkgid, "res/wgt/MODIFIED", "version 2\n", params));
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForInstallation) {
+ bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForInstallation.wgt";
+ ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ backend_crash.Run("-i", path.string(), "-u", test_uid_str.c_str());
+ ASSERT_NE(backend_crash.Wait(), 0);
+
+ std::string pkgid = "smokewgt09";
+ bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
+ params.test_user.uid);
+ ASSERT_FALSE(recovery_file.empty());
+ ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForUpdate) {
+ bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForUpdate.wgt";
+ bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForUpdate_2.wgt";
+ RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
+ ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
+ std::string pkgid = "smokewgt10";
+ std::string appid = "smokewgt10.RecoveryModeForUpdate";
+ AddDataFiles(pkgid, params.test_user.uid);
+ ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
+ ASSERT_NE(backend_crash.Wait(), 0);
+
+ bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
+ params.test_user.uid);
+ ASSERT_FALSE(recovery_file.empty());
+ ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n",
+ params));
+ ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForDelta) {
+ bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForDelta.wgt";
+ bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
+ RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
+ ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
+ ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
+ ASSERT_NE(backend_crash.Wait(), 0);
+
+ std::string pkgid = "smokewgt30";
+ std::string appid = "smokewgt30.RecoveryModeForDelta";
+ bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
+ params.test_user.uid);
+ ASSERT_FALSE(recovery_file.empty());
+ ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n",
+ params));
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
+ bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForMountInstall.wgt";
+ RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
+ ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ backend_crash.Run("-w", path.string(), "-u", test_uid_str.c_str());
+ ASSERT_NE(backend_crash.Wait(), 0);
+
+ std::string pkgid = "smokewgt31";
+ bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
+ params.test_user.uid);
+ ASSERT_FALSE(recovery_file.empty());
+ ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+}
+
+TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
+ bf::path path_old =
+ kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate.wgt";
+ bf::path path_new =
+ kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate_2.wgt";
+ std::string pkgid = "smokewgt32";
+ std::string appid = "smokewgt32.RecoveryModeForMountUpdate";
+ RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
+ ASSERT_EQ(backend.MountInstallSuccess(path_old),
+ ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ backend_crash.Run("-w", path_new.string(), "-u", test_uid_str.c_str());
+ ASSERT_NE(backend_crash.Wait(), 0);
+
+ // Filesystem may be mounted after crash
+ ScopedTzipInterface poweroff_unmount_interface(pkgid, params.test_user.uid);
+ poweroff_unmount_interface.Release();
+
+ bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
+ params.test_user.uid);
+ ASSERT_FALSE(recovery_file.empty());
+ ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
+
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n",
+ params));
+ ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+}
+
+TEST_F(SmokeTest, InstallationMode_GoodSignature) {
+ // pkgid: smokewgt08
+ bf::path path = kSmokePackagesDirectory / "InstallationMode_GoodSignature.wgt"; // NOLINT
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+}
+
+TEST_F(SmokeTest, InstallationMode_WrongSignature) {
+ // pkgid: smokewgt12
+ bf::path path = kSmokePackagesDirectory / "InstallationMode_WrongSignature.wgt"; // NOLINT
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::ERROR);
+}
+
+TEST_F(RollbackSmokeTest, InstallationMode) {
+ bf::path path = kSmokePackagesDirectory / "InstallationMode_Rollback.wgt";
+ std::string pkgid = "smokewgt06";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::ERROR);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+}
+
+TEST_F(RollbackSmokeTest, UpdateMode) {
+ bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Rollback.wgt";
+ bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Rollback_2.wgt";
+ std::string pkgid = "smokewgt07";
+ std::string appid = "smokewgt07.UpdateModeRollback";
+ ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ ASSERT_EQ(backend.Install(path_new), ci::AppInstaller::Result::ERROR);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n",
+ params));
+ ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+}
+
+TEST_F(RollbackSmokeTest, DeltaMode) {
+ bf::path path = kSmokePackagesDirectory / "DeltaMode_Rollback.wgt";
+ bf::path delta_package = kSmokePackagesDirectory / "DeltaMode_Rollback.delta";
+ std::string pkgid = "smokewgt01";
+ std::string appid = "smokewgt01.DeltaMode";
+ ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ ASSERT_EQ(backend.Install(delta_package), ci::AppInstaller::Result::ERROR);
+
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED",
+ "version 1\n", params));
+ ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+ ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
+ "res/wgt/DELETED"));
+ ASSERT_FALSE(bf::exists(GetPackageRoot(pkgid, params.test_user.uid) /
+ "res/wgt/ADDED"));
+}
+
+TEST_F(HybridSmokeTest, InstallationMode) {
+ bf::path path = kSmokePackagesDirectory / "InstallationMode_Hybrid.wgt";
+ std::string pkgid = "smokehyb01";
+ // Excutable for native app doesn't create symlink
+ std::string appid1 = "smokehyb01.Web";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
+}
+
+TEST_F(HybridSmokeTest, UpdateMode) {
+ bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Hybrid.wgt";
+ bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Hybrid_2.wgt";
+ std::string pkgid = "smokehyb02";
+ std::string appid1 = "smokehyb02.Web";
+ ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ ASSERT_EQ(backend.Install(path_new),
+ ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "2\n",
+ params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "VERSION", "2\n", params));
+ ValidateDataFiles(pkgid, params.test_user.uid);
+}
+
+TEST_F(HybridSmokeTest, DeinstallationMode) {
+ bf::path path = kSmokePackagesDirectory / "DeinstallationMode_Hybrid.wgt";
+ std::string pkgid = "smokehyb03";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Uninstall(pkgid), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+}
+
+TEST_F(HybridSmokeTest, DeltaMode) {
+ bf::path path = kSmokePackagesDirectory / "DeltaMode_Hybrid.wgt";
+ bf::path delta_package = kSmokePackagesDirectory / "DeltaMode_Hybrid.delta";
+ std::string pkgid = "smokehyb04";
+ std::string appid1 = "smokehyb04.Web";
+ ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Install(delta_package), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
+
+ // Check delta modifications
+ bf::path root_path = ci::GetRootAppPath(false, params.test_user.uid);
+ ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "wgt" / "DELETED"));
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "wgt" / "ADDED"));
+ ASSERT_FALSE(bf::exists(root_path / pkgid / "lib" / "DELETED"));
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "lib" / "ADDED"));
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "wgt" / "css" / "style.css")); // NOLINT
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "wgt" / "images" / "tizen_32.png")); // NOLINT
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "wgt" / "js" / "main.js"));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED", "version 2\n", params)); // NOLINT
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "lib/MODIFIED", "version 2\n", params)); // NOLINT
+}
+
+TEST_F(HybridSmokeTest, MountInstallationMode) {
+ bf::path path = kSmokePackagesDirectory / "MountInstallationMode_Hybrid.wgt";
+ std::string pkgid = "smokehyb05";
+ std::string appid1 = "smokehyb05.web";
+ ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::OK);
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
+}
+
+TEST_F(HybridSmokeTest, MountUpdateMode) {
+ bf::path path_old = kSmokePackagesDirectory / "MountUpdateMode_Hybrid.wgt";
+ bf::path path_new = kSmokePackagesDirectory / "MountUpdateMode_Hybrid_2.wgt";
+ std::string pkgid = "smokehyb06";
+ std::string appid1 = "smokehyb06.web";
+ ASSERT_EQ(backend.MountInstallSuccess(path_old),
+ ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ ASSERT_EQ(backend.MountInstall(path_new), ci::AppInstaller::Result::OK);
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "2\n",
+ params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "lib/VERSION", "2\n",
+ params));
+ ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+}
+
+TEST_F(RollbackHybridSmokeTest, InstallationMode) {
+ bf::path path = kSmokePackagesDirectory /
+ "InstallationMode_Rollback_Hybrid.wgt";
+ std::string pkgid = "smokehyb07";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::ERROR);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+}
+
+TEST_F(RollbackHybridSmokeTest, UpdateMode) {
+ bf::path path_old = kSmokePackagesDirectory /
+ "UpdateMode_Rollback_Hybrid.wgt";
+ bf::path path_new = kSmokePackagesDirectory /
+ "UpdateMode_Rollback_Hybrid_2.wgt";
+ std::string pkgid = "smokehyb08";
+ std::string appid1 = "smokehyb08.web";
+ ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ ASSERT_EQ(backend.Install(path_new), ci::AppInstaller::Result::ERROR);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n",
+ params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "lib/VERSION", "1\n",
+ params));
+ ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+}
+
+TEST_F(RollbackHybridSmokeTest, DeltaMode) {
+ bf::path path = kSmokePackagesDirectory / "DeltaMode_Rollback_Hybrid.wgt";
+ bf::path delta_package = kSmokePackagesDirectory /
+ "DeltaMode_Rollback_Hybrid.delta";
+ std::string pkgid = "smokehyb11";
+ std::string appid1 = "smokehyb11.web";
+ ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ ASSERT_EQ(backend.Install(delta_package),
+ ci::AppInstaller::Result::ERROR);
+
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
+ // Check delta modifications
+ bf::path root_path = GetPackageRoot(pkgid, params.test_user.uid);
+ ASSERT_TRUE(bf::exists(root_path / "res" / "wgt" / "DELETED"));
+ ASSERT_FALSE(bf::exists(root_path / "res" / "wgt" / "ADDED"));
+ ASSERT_TRUE(bf::exists(root_path / "lib" / "DELETED"));
+ ASSERT_FALSE(bf::exists(root_path / "lib" / "ADDED"));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED",
+ "version 1\n", params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "lib/MODIFIED",
+ "version 1\n", params));
+ ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+}
+
+TEST_F(RollbackHybridSmokeTest, MountInstallationMode) {
+ bf::path path = kSmokePackagesDirectory /
+ "MountInstallationMode_Rollback_Hybrid.wgt";
+ std::string pkgid = "smokehyb09";
+ ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::ERROR);
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+}
+
+TEST_F(RollbackHybridSmokeTest, MountUpdateMode) {
+ bf::path path_old = kSmokePackagesDirectory /
+ "MountUpdateMode_Rollback_Hybrid.wgt";
+ bf::path path_new = kSmokePackagesDirectory /
+ "MountUpdateMode_Rollback_Hybrid_2.wgt";
+ std::string pkgid = "smokehyb10";
+ std::string appid1 = "smokehyb10.web";
+ ASSERT_EQ(backend.MountInstallSuccess(path_old),
+ ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ ASSERT_EQ(backend.MountInstall(path_new), ci::AppInstaller::Result::ERROR);
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid1}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n",
+ params));
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "lib/VERSION", "1\n",
+ params));
+ ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+}
+
+TEST_F(SmokeTest, MountInstallationMode) {
+ bf::path path = kSmokePackagesDirectory / "MountInstallationMode.wgt";
+ std::string pkgid = "smokewgt28";
+ std::string appid = "smokewgt28.InstallationMode";
+ ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::OK);
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+}
+
+TEST_F(SmokeTest, MountUpdateMode) {
+ bf::path path_old = kSmokePackagesDirectory / "MountUpdateMode.wgt";
+ bf::path path_new = kSmokePackagesDirectory / "MountUpdateMode_2.wgt";
+ std::string pkgid = "smokewgt29";
+ std::string appid = "smokewgt29.UpdateMode";
+ ASSERT_EQ(backend.MountInstallSuccess(path_old),
+ ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ ASSERT_EQ(backend.MountInstall(path_new), ci::AppInstaller::Result::OK);
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "2\n",
+ params));
+ ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+}
+
+TEST_F(RollbackSmokeTest, MountInstallationMode) {
+ bf::path path =
+ kSmokePackagesDirectory / "MountInstallationMode_Rollback.wgt";
+ std::string pkgid = "smokewgt33";
+ ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::ERROR);
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+}
+
+TEST_F(RollbackSmokeTest, MountUpdateMode) {
+ bf::path path_old = kSmokePackagesDirectory / "MountUpdateMode_Rollback.wgt";
+ bf::path path_new =
+ kSmokePackagesDirectory / "MountUpdateMode_Rollback_2.wgt";
+ std::string pkgid = "smokewgt34";
+ std::string appid = "smokewgt34.web";
+ ASSERT_EQ(backend.MountInstallSuccess(path_old),
+ ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ ASSERT_EQ(backend.MountInstall(path_new), ci::AppInstaller::Result::ERROR);
+ ScopedTzipInterface interface(pkgid, params.test_user.uid);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n",
+ params));
+ ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+}
+
+TEST_F(SmokeTest, UserDefinedPlugins) {
+ bf::path path = kSmokePackagesDirectory / "SimpleEchoPrivilege.wgt";
+ std::string pkgid = "smokewgt02";
+ std::string appid = "smokewgt02.SimpleEcho";
+ std::string call_privilege = "http://tizen.org/privilege/call";
+ std::string location_privilege = "http://tizen.org/privilege/location";
+ std::string power_privilege = "http://tizen.org/privilege/power";
+
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+ std::vector<std::string> res;
+ ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
+ ASSERT_TRUE(pkg_query.PrivilegesForPkgId(&res));
+ ASSERT_TRUE(std::find(res.begin(), res.end(), call_privilege) != res.end());
+ ASSERT_TRUE(std::find(res.begin(), res.end(), location_privilege)
+ != res.end());
+ ASSERT_TRUE(std::find(res.begin(), res.end(), power_privilege) != res.end());
+}
+
+TEST_F(SmokeTest, InstallExternalMode) {
+ ASSERT_TRUE(CheckAvailableExternalPath());
+ bf::path path = kSmokePackagesDirectory / "InstallExternalMode.wgt";
+ std::string pkgid = "smokewgt35";
+ std::string appid = "smokewgt35.web";
+ ASSERT_EQ(backend.InstallWithStorage(path, StorageType::EXTERNAL),
+ ci::AppInstaller::Result::OK);
+ ValidateExternalPackage(pkgid, {appid}, params);
+}
+
+TEST_F(SmokeTest, MigrateLegacyExternalImageMode) {
+ ASSERT_TRUE(CheckAvailableExternalPath());
+ bf::path path =
+ kSmokePackagesDirectory / "MigrateLegacyExternalImageMode.wgt";
+ std::string pkgid = "smokewgt36";
+ std::string appid = "smokewgt36.web";
+ bf::path legacy_path = kSmokePackagesDirectory / kLegacyExtImageDir;
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ if (test_uid_str == kDefaultUserIdStr ||
+ params.test_user.uid == kGlobalUserUid) {
+ ASSERT_EQ(backend.MigrateLegacyExternalImage(pkgid, path, legacy_path),
+ ci::AppInstaller::Result::OK);
+ ValidateExternalPackage(pkgid, {appid}, params);
+ } else {
+ ASSERT_EQ(backend.MigrateLegacyExternalImage(pkgid, path, legacy_path),
+ ci::AppInstaller::Result::ERROR);
+ }
+}
+
+TEST_F(PreloadSmokeTest, InstallationMode) {
+ ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
+ bf::path path = kSmokePackagesDirectory / "InstallationMode_Preload.wgt";
+ std::string pkgid = "smokewgt37";
+ std::string appid = "smokewgt37.InstallationModePreload";
+ ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+}
+
+TEST_F(PreloadSmokeTest, UpdateMode) {
+ ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
+ bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Preload.wgt";
+ bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Preload2.wgt";
+ std::string pkgid = "smokewgt38";
+ std::string appid = "smokewgt38.UpdateModePreload";
+ ASSERT_EQ(backend.InstallPreload(path_old), ci::AppInstaller::Result::OK);
+ AddDataFiles(pkgid, params.test_user.uid);
+ ASSERT_EQ(backend.InstallPreload(path_new), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "2",
+ params));
+ ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
+}
+
+TEST_F(PreloadSmokeTest, DeinstallationMode) {
+ ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
+ bf::path path = kSmokePackagesDirectory / "DeinstallationMode_Preload.wgt";
+ std::string pkgid = "smokewgt39";
+ ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.UninstallPreload(pkgid), ci::AppInstaller::Result::OK);
+ CheckPackageReadonlyNonExistance(pkgid, params);
+}
+
+TEST_F(SmokeTest, ManifestDirectInstallMode) {
+ ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
+ bf::path src_path = kSmokePackagesDirectory / "ManifestDirectInstallMode";
+ std::string pkgid = "smokewgt40";
+ std::string appid = "smokewgt40.ManifestDirectInstallMode";
+ bf::path pkg_path = ci::GetRootAppPath(false, params.test_user.uid);
+
+ ci::CopyDir(src_path / pkgid, pkg_path / pkgid);
+ ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
+ ASSERT_FALSE(pkg_query.IsPackageInstalled(
+ ci::GetRequestMode(params.test_user.uid)));
+ ASSERT_EQ(backend.ManifestDirectInstall(pkgid),
+ ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+}
+
+TEST_F(SmokeTest, ManifestDirectUpdateMode) {
+ bf::path path = kSmokePackagesDirectory / "ManifestDirectUpdateMode.wgt";
+ std::string pkgid = "smokewgt41";
+ std::string appid = "smokewgt41.ManifestDirectUpdateMode";
+
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ int install_time = GetAppInstalledTime(appid.c_str(), params.test_user.uid);
+ ASSERT_EQ(backend.ManifestDirectInstall(pkgid),
+ ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(GetAppInstalledTime(appid.c_str(),
+ params.test_user.uid) > install_time)
+ << "Package is not updated (app installed time didn't change).";
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+}
+
+TEST_F(PreloadSmokeTest, ReadonlyUpdateInstallMode) {
+ ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
+ bf::path path = kSmokePackagesDirectory / "ReadonlyUpdateInstallMode.wgt";
+ std::string pkgid = "smokewgt42";
+ std::string appid = "smokewgt42.ReadonlyUpdateInstallMode";
+
+ ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+}
+
+TEST_F(PreloadSmokeTest, ReadonlyUpdateUninstallMode) {
+ ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
+ bf::path path = kSmokePackagesDirectory / "ReadonlyUpdateUninstallMode.wgt";
+ std::string pkgid = "smokewgt43";
+ std::string appid = "smokewgt43.ReadonlyUpdateUninstallMode";
+
+ ASSERT_EQ(backend.InstallPreload(path),
+ ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+ ASSERT_EQ(backend.Uninstall(pkgid), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+}
+
+TEST_F(HybridSmokeTest, ManifestDirectInstallMode) {
+ ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
+ bf::path src_path = kSmokePackagesDirectory /
+ "ManifestDirectInstallMode_Hybrid";
+ std::string pkgid = "smokehyb12";
+ std::string appid = "smokehyb12.ManifestDirectInstallModeHybrid";
+ bf::path pkg_path = ci::GetRootAppPath(false, params.test_user.uid);
+
+ ci::CopyDir(src_path / pkgid, pkg_path / pkgid);
+ ci::PkgQueryInterface pkg_query(pkgid, params.test_user.uid);
+ ASSERT_FALSE(pkg_query.IsPackageInstalled(
+ ci::GetRequestMode(params.test_user.uid)));
+ ASSERT_EQ(backend.ManifestDirectInstall(pkgid),
+ ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+}
+
+TEST_F(HybridSmokeTest, ManifestDirectUpdateMode) {
+ bf::path path = kSmokePackagesDirectory /
+ "ManifestDirectUpdateMode_Hybrid.wgt";
+ std::string pkgid = "smokehyb13";
+ std::string appid = "smokehyb13.ManifestDirectUpdateModeHybrid";
+
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ int install_time = GetAppInstalledTime(appid.c_str(), params.test_user.uid);
+ ASSERT_EQ(backend.ManifestDirectInstall(pkgid), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(GetAppInstalledTime(appid.c_str(),
+ params.test_user.uid) > install_time)
+ << "Package is not updated (app installed time didn't change).";
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+}
+
+TEST_F(SmokeTest, SharedRes24) {
+ bf::path path = kSmokePackagesDirectory / "SharedRes24.wgt";
+ std::string pkgid = "smokeSh2xx";
+ std::string appid = "smokeSh2xx.SharedRes24";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ValidatePackage(pkgid, {appid}, params);
+ bf::path root_path = ci::GetRootAppPath(false, params.test_user.uid);
+ ASSERT_TRUE(bf::is_regular_file(root_path / pkgid / "res" / "wgt" / "shared" / "res" / "NOT-SHARED-WGT")); // NOLINT
+ ASSERT_FALSE(bf::exists(root_path / pkgid / "shared" / "res" / "NOT-SHARED-WGT")); // NOLINT
+}
+
+TEST_F(SmokeTest, SharedRes30) {
+ bf::path path = kSmokePackagesDirectory / "SharedRes30.wgt";
+ std::string pkgid = "smokeSh3xx";
+ std::string appid = "smokeSh3xx.SharedRes30";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+ bf::path root_path = ci::GetRootAppPath(false, params.test_user.uid);
+ ASSERT_TRUE(bf::is_symlink(root_path / pkgid / "res" / "wgt" / "shared" / "res" / "SHARED-WGT")); // NOLINT
+ ASSERT_TRUE(bf::is_regular_file(root_path / pkgid / "shared" / "res" / "SHARED-WGT")); // NOLINT
+}
+
+TEST_F(SmokeTest, SharedRes30Delta) {
+ bf::path path = kSmokePackagesDirectory / "SharedRes30Delta.wgt";
+ bf::path delta_package = kSmokePackagesDirectory / "SharedRes30Delta.delta";
+ std::string pkgid = "smokeSh3De";
+ std::string appid = "smokeSh3De.SharedRes30Delta";
+ ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Install(delta_package), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
+ // Check delta modifications
+ bf::path root_path = ci::GetRootAppPath(false, params.test_user.uid);
+ ASSERT_TRUE(bf::is_symlink(root_path / pkgid / "res" / "wgt" / "shared" / "res" / "SHARED-WGT-2")); // NOLINT
+ ASSERT_TRUE(bf::is_regular_file(root_path / pkgid / "shared" / "res" / "SHARED-WGT-2")); // NOLINT
+ ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "wgt" / "shared" / "res" / "SHARED-WGT-1")); // NOLINT
+ ASSERT_FALSE(bf::exists(root_path / pkgid / "shared" / "res" / "SHARED-WGT-1")); // NOLINT
+}
+
+TEST_F(HybridSmokeTest, SharedRes30Hybrid) {
+ bf::path path = kSmokePackagesDirectory / "SharedRes30Hybrid.wgt";
+ std::string pkgid = "smokeSh3Hy";
+ std::string appid1 = "smokeSh3Hy.SharedRes30Hybrid";
+ std::string appid2 = "sharedres30hybridserivce";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid1, appid2}, params));
+ bf::path root_path = ci::GetRootAppPath(false, params.test_user.uid);
+ ASSERT_TRUE(bf::is_symlink(root_path / pkgid / "res" / "wgt" / "shared" / "res" / "SHARED-WGT")); // NOLINT
+ ASSERT_TRUE(bf::is_regular_file(root_path / pkgid / "shared" / "res" / "SHARED-WGT")); // NOLINT
+ ASSERT_TRUE(bf::is_regular_file(root_path / pkgid / "shared" / "res" / "SHARED-TPK")); // NOLINT
+}
+
+TEST_F(HybridSmokeTest, SharedRes30HybridDelta) {
+ bf::path path = kSmokePackagesDirectory / "SharedRes30HybridDelta.wgt";
+ bf::path delta_package = kSmokePackagesDirectory /
+ "SharedRes30HybridDelta.delta";
+ std::string pkgid = "smokeSh3HD";
+ std::string appid1 = "smokeSh3HD.SharedRes30HybridDelta";
+ std::string appid2 = "sharedres30hybriddeltaserivce";
+ ASSERT_EQ(backend.InstallSuccess(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.Install(delta_package), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {appid1, appid2}, params));
+ // Check delta modifications
+ bf::path root_path = ci::GetRootAppPath(false, params.test_user.uid);
+ ASSERT_TRUE(bf::is_symlink(root_path / pkgid / "res" / "wgt" / "shared" / "res" / "SHARED-WGT-2")); // NOLINT
+ ASSERT_TRUE(bf::is_regular_file(root_path / pkgid / "shared" / "res" / "SHARED-WGT-2")); // NOLINT
+ ASSERT_TRUE(bf::is_regular_file(root_path / pkgid / "shared" / "res" / "SHARED-TPK-2")); // NOLINT
+ ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "wgt" / "shared" / "res" / "SHARED-WGT-1")); // NOLINT
+ ASSERT_FALSE(bf::exists(root_path / pkgid / "shared" / "res" / "SHARED-WGT-1")); // NOLINT
+}
+
+TEST_F(SmokeTest, InstallExtendedMode) {
+ ASSERT_TRUE(CheckAvailableExtendedPath());
+ bf::path path = kSmokePackagesDirectory / "InstallExtendedMode.wgt";
+ std::string pkgid = "smokewgt44";
+ std::string appid = "smokewgt44.web";
+ ASSERT_EQ(backend.InstallWithStorage(path, StorageType::EXTENDED),
+ ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidateExtendedPackage(pkgid, {appid}, params));
+}
+
+TEST_F(SmokeTest, RecoveryMode_CrashAfterUnzip) {
+ bf::path path = kSmokePackagesDirectory / "RecoveryMode_CrashAfterUnzip.wgt";
+ RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
+ ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
+ std::string test_uid_str = std::to_string(params.test_user.uid);
+ backend_crash.Run("-i", path.string(), "-u", test_uid_str.c_str(),
+ "-step_name", "Unzip");
+ ASSERT_NE(backend_crash.Wait(), 0);
+
+ std::string pkgid = "smokewgt45";
+ bf::path recovery_file = FindRecoveryFile("/wgt-recovery",
+ params.test_user.uid);
+ ASSERT_FALSE(recovery_file.empty());
+ std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
+ GetRecoverFileInfo(recovery_file);
+ ASSERT_TRUE(recovery_info);
+ ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
+ ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+}
+
+TEST_F(SmokeTest, InstallationMode_GlobalServiceAppWithUiAppId) {
+ bf::path path = kSmokePackagesDirectory /
+ "InstallationMode_GlobalServiceAppWithUiAppId.wgt";
+ std::string pkgid = "smokewgt46";
+ std::string ui_appid = "smokewgt46.uiapp";
+ std::string service_appid = "smokewgt46.serviceapp";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {ui_appid, service_appid}, params));
+}
+
+TEST_F(SmokeTest, InstallationMode_GlobalServiceAppWithoutUiAppId) {
+ bf::path path = kSmokePackagesDirectory /
+ "InstallationMode_GlobalServiceAppWithoutUiAppId.wgt";
+ std::string pkgid = "smokewgt47";
+ std::string service_appid = "smokewgt47.serviceapp";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {service_appid}, params));
+}
+
+TEST_F(SmokeTest, InstallationMode_UIServiceAppWithUiAppId) {
+ bf::path path = kSmokePackagesDirectory /
+ "InstallationMode_UIServiceAppWithUiAppId.wgt";
+ std::string pkgid = "smokewgt48";
+ std::string ui_appid = "smokewgt48.uiapp";
+ std::string service_appid = "smokewgt48.serviceapp";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_TRUE(ValidatePackage(pkgid, {ui_appid, service_appid}, params));
+}
+
+TEST_F(SmokeTest, InstallationMode_UIServiceAppWithoutUiAppId) {
+ bf::path path = kSmokePackagesDirectory /
+ "InstallationMode_UIServiceAppWithoutUiAppId.wgt";
+ std::string pkgid = "smokewgt49";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::ERROR);
+}
+
+TEST_F(SmokeTest, InstallationMode_UIAppWithoutUiAppId) {
+ bf::path path = kSmokePackagesDirectory /
+ "InstallationMode_UIAppWithoutUiAppId.wgt";
+ std::string pkgid = "smokewgt50";
+ ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::ERROR);
+}
+
+} // namespace smoke_test
+
+int main(int argc, char** argv) {
+ try {
+ ci::RequestMode request_mode = st::ParseRequestMode(argc, argv);
+ if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) {
+ std::cout << "Skip tests for preload request" << std::endl;
+ ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
+ }
+ testing::InitGoogleTest(&argc, argv);
+ ::env = static_cast<smoke_test::SmokeEnvironment*>(
+ testing::AddGlobalTestEnvironment(
+ new smoke_test::SmokeEnvironment(request_mode)));
+ signal(SIGINT, ::signalHandler);
+ signal(SIGSEGV, ::signalHandler);
+ return RUN_ALL_TESTS();
+ } catch (...) {
+ std::cout << "Exception occurred during testing" << std::endl;
+ return 1;
+ }
+}
--- /dev/null
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include <common/pkgmgr_interface.h>
+#include <manifest_parser/utils/logging.h>
+
+#include "smoke_tests/wgt_smoke_utils.h"
+#include "wgt/utils/wgt_app_query_interface.h"
+#include "wgt/wgt_installer.h"
+
+namespace ci = common_installer;
+
+// this main of test binay in done purely for recovery smoke test.
+int main(int argc, char** argv) {
+ try {
+ int index = -1;
+ int backend_argc = argc;
+ std::string step_name;
+ smoke_test::CrashStepType type = smoke_test::CrashStepType::PROCESS;
+
+ if (!strcmp(argv[backend_argc - 2], "-idx")) {
+ index = atoi(argv[argc - 1]);
+ backend_argc -= 2;
+ LOG(DEBUG) << "Step crash after " << index << " step.";
+ }
+
+ if (!strcmp(argv[backend_argc - 2], "-step_name")) {
+ step_name = argv[backend_argc - 1];
+ backend_argc -= 2;
+ LOG(DEBUG) << "Step crash after " << step_name << " step.";
+ }
+
+ if (!strcmp(argv[backend_argc - 1], "-type_clean")) {
+ backend_argc--;
+ type = smoke_test::CrashStepType::CLEAN;
+ LOG(DEBUG) << "step will be crashed in clean operation";
+ }
+
+ ci::PkgmgrInstaller pkgmgr_installer;
+ wgt::WgtAppQueryInterface query_interface;
+ auto pkgmgr = ci::PkgMgrInterface::Create(backend_argc, argv,
+ &pkgmgr_installer, &query_interface);
+ if (!pkgmgr) {
+ LOG(ERROR) << "Options of pkgmgr installer cannot be parsed";
+ return EINVAL;
+ }
+
+ smoke_test::CrashWgtInstaller installer(pkgmgr, index, step_name, type);
+ return (installer.Run() == ci::AppInstaller::Result::OK) ? 0 : 1;
+ } catch (...) {
+ std::cout << "Exception occurred during testing" << std::endl;
+ return 1;
+ }
+}
+
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:app-control>
+ <tizen:src name="edit.html"/>
+ <tizen:operation name="http://tizen.org/appcontrol/operation/edit"/>
+ <tizen:uri name="myapp"/>
+ </tizen:app-control>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:app-control>
+ <tizen:src name="edit.html"/>
+ <tizen:mime name="image/jpg" />
+ <tizen:uri name="myapp"/>
+ </tizen:app-control>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:app-control>
+ <tizen:operation name="http://tizen.org/appcontrol/operation/edit"/>
+ <tizen:mime name="image/jpg" />
+ <tizen:uri name="myapp"/>
+ </tizen:app-control>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:app-control>
+ <tizen:src name="edit.html"/>
+ <tizen:operation name="http://tizen.org/appcontrol/operation/edit"/>
+ <tizen:mime name="image/jpg" />
+ </tizen:app-control>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:app-control>
+ <tizen:src name="edit.html"/>
+ <tizen:operation name="http://tizen.org/appcontrol/operation/edit"/>
+ <tizen:mime name="image/jpg" />
+ <tizen:uri name="myapp"/>
+ </tizen:app-control>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:appdefined-privilege name=""/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:appdefined-privilege name="package0id/appdefined/test.read"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:appdefined-privilege name="http://package0id/appdefined/longnameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.read"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:appdefined-privilege name="http://package0id/appdefined/test.read"/>
+ <tizen:appdefined-privilege name="http://package0id/appdefined/test.write"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:appdefined-privilege/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:appdefined-privilege name="http://package0id/appdefined/test.read"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:appdefined-privilege name="http://package0id/appdefined/test.read" license="res/cert"/>
+ <tizen:appdefined-privilege name="http://package0id/appdefined/test.write" license="res/cert"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:appdefined-privilege name="http://package0id/appdefined/test.read" license="res/cert"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id123.appidinvalid" package="package0id" required_version="3.0"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0idinvalid" required_version="3.0"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="Invalid"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application package="package0id" required_version="3.0"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" required_version="3.0"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:category />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:category name="http://tizen.org/category/category_0" />
+ <tizen:category name="http://tizen.org/category/category_1" />
+ <tizen:category name="http://tizen.org/category/category_2" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:category name="http://tizen.org/category/wearable_clock" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:metadata key="key1" value="key1value"/>
+ <tizen:metadata key="key2" value="key2value"/>
+ <tizen:metadata key="key1" value="key3value"/>
+</widget>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:metadata/>
+</widget>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:metadata key="key1"/>
+ <tizen:metadata key="key2"/>
+</widget>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:metadata key="key1"/>
+ <tizen:metadata key="key2" value="value2"/>
+</widget>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:privilege name=""/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:privilege name="http://tizen.org/privilege/application.launch"/>
+ <tizen:privilege name="http://tizen.org/privilege/application.close"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:privilege/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:privilege name="http://tizen.org/privilege/application.launch"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:provides-appdefined-privilege name=""/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:provides-appdefined-privilege name="http://package1id/appdefined/test.read"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:provides-appdefined-privilege name="package0id/appdefined/test.read"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:provides-appdefined-privilege name="http://package0id/appdefined/longnameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.read"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:provides-appdefined-privilege name="http://package0id/appdefined/test.read"/>
+ <tizen:provides-appdefined-privilege name="http://package0id/appdefined/test.write"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:provides-appdefined-privilege/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:provides-appdefined-privilege name="http://package0id/appdefined/test.read"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:provides-appdefined-privilege name="http://package0id/appdefined/test.read" license="res/cert"/>
+ <tizen:provides-appdefined-privilege name="http://package0id/appdefined/test.write" license="res/cert"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:provides-appdefined-privilege name="http://package0id/appdefined/test.read" license="res/cert"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="disable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="disable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="enable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="disable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="disable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="disable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="disable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="enable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="disable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="disable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+ <tizen:setting background-support="enable" />
+ <tizen:setting context-menu="disable" />
+ <tizen:setting encryption="enable" />
+ <tizen:setting screen-orientation="landscape" />
+ <tizen:setting install-location="internal-only" />
+ <tizen:setting hwkey-event="enable" />
+ <tizen:setting background-vibration="enable" />
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets/invalid" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets/invalid" xmlns:tizen="http://tizen.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+</widget>
--- /dev/null
+<?xml version="1.0"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets">
+ <tizen:application id="package0id.appid" package="package0id" required_version="3.0"/>
+</widget>
--- /dev/null
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
--- /dev/null
+Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Apache License, Version 2.
+Please, see the LICENSE.APLv2 file for Apache License, Version 2 terms and conditions.
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="AuthorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="LICENSE.APLv2">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>z8d0m5b2O9McPEK1xHG/dWgUBT6EfBDz6wA0F7xSPTA=</DigestValue>
+</Reference>
+<Reference URI="NOTICE">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>ijjaB8GEO5OJP/jK6n7Hr3vZFI9gy8ocoDhviViKNnU=</DigestValue>
+</Reference>
+<Reference URI="config.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>D77P2OH9hj+3BeuzXRjd5kkSP4H9bK3f2COPhdsWtEE=</DigestValue>
+</Reference>
+<Reference URI="css%2Fstyle.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>f7q5O05HNVS6mBDhCOBPBMFo6OA2iSqQVOf9aMoKPhs=</DigestValue>
+</Reference>
+<Reference URI="icon.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="index.html">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>pw+EAHkfej6NPKau0RrL0ZIVHj1Q0QJxUlUMBCFRIFU=</DigestValue>
+</Reference>
+<Reference URI="js%2Fapp.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>mCAANytlgxQx/1c82dNNjO4QUPgqRMkzu2b1sbBLPk8=</DigestValue>
+</Reference>
+<Reference URI="version.txt">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>9eXJU0UyhA/NRbsALmnthcYduidTRQ4mtEi33xSB4k0=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+Gqm9cp1feyu5Pb/XFuVF5YNufXLznoJyAfPk6va995dLcsqLwPOPXx7eqxOJVI0wBTTfSblbhb0X
+DLnI2NHasWwyMRgLSce9YhxarDTz4FvYaSR4xOaVJTByyGtZ40G9RkIQes30LdaZ42sEm0Tqat+a
+7Yz+Di4a1dFvGdHMKDo=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIICnDCCAYSgAwIBAgIGAVvS9uY8MA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz
+c29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2
+ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMBgxFjAUBgNVBAMMDUFw
+cF9pbnN0YWxsZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIKgQLsl5UIJdfdaDXbY+aQ6
+VHjwTPv5+aUlF1l6G9SDZ7tmJTCO1yAudmMr6vEN+ZL/bbOEAlyhkJPTmntPesO1h/WzjIlpFzTO
+UcHlEXAu1vZGTnPBoYTutBeVmbH9JY/dCSm2xFSioKaWHl+uMn0SB1DcvgIVSs4DkvO0F1+TAgMB
+AAGjMjAwMAwGA1UdEwEB/wQCMAAwCwYDVR0PBAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUFBwMDMA0G
+CSqGSIb3DQEBBQUAA4IBAQBwNrj9b7/g4JI9K3wohRLHW5IpxOwBO9gUlkotSUNaiAvNwsQfB5pE
+k+rTUa4Nwxcq6rFfne1brXP1vbl/bVGW/WJqV6dF3BL1QfwGif0vvcO1Sz2QOpoc/Jtt8zlmsRne
+TIEMph6kDUT1oNUlTCGnxD24WagRxuGUe/RZ6L4y+6T8L+fBDtMyyM+GytqE72V+0KeyITJMTdzM
+wRMjN3XccXemcox73isLxSXlgwrFbotkTyYPTFphiZCRU7BlA3EClIk+3To0b3irROY/iIlg6ZyY
+gNbND9/aIJxqPqCghW7PMjGH/9KK2mtNhtJSFrIAvvUiW/fMrNj1opsAHGgJ
+</X509Certificate>
+<X509Certificate>
+MIIDOTCCAiGgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMRowGAYDVQQKDBFUaXplbiBBc3NvY2lh
+dGlvbjEaMBgGA1UECwwRVGl6ZW4gQXNzb2NpYXRpb24xHjAcBgNVBAMMFVRpemVuIERldmVsb3Bl
+cnMgUm9vdDAeFw0xMjAxMDEwMDAwMDBaFw0yNzAxMDEwMDAwMDBaMFYxGjAYBgNVBAoMEVRpemVu
+IEFzc29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4g
+RGV2ZWxvcGVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANVGhRGmMIUyBA7o
+PCz8Sxut6z6HNkF4oDIuzuKaMzRYPeWodwe9O0gmqAkToQHfwg2giRhE5GoPld0fq+OYMMwSasCu
+g8dwODx1eDeSYVuOLWRxpAmbTXOsSFi6VoWeyaPEm18JBHvZBsU5YQtgZ6Kp7MqzvQg3pXOxtajj
+vyHxiatJl+xXrHgcXC1wgyG3buty7u/Fi2mvKXJ0PRJcCjjK81dqe/Vr20sRUCrbk02zbm5ggFt/
+jIEhV8wbFRQpliobc7J4dSTKhFfrqGM8rdd54LYhD7gSI1CFSe16pUXfcVR7FhJztRaiGLnCrwBE
+dyTZ248+D4L/qR/D0axb3jcCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
+AQEAnOXXQ/1O/QTDHyrmQDtFziqPY3xWlJBqJtEqXiT7Y+Ljpe66e+Ee/OjQMlZe8gu21/8cKklH
+95RxjopMWCVedXDUbWdvS2+CdyvVW/quT2E0tjqIzXDekUTYwwhlPWlGxvfj3VsxqSFq3p8Brl04
+1Gx5RKAGyKVsMfTLhbbwSWwApuBUxYfcNpKwLWGPXkysu+HctY03OKv4/xKBnVWiN8ex/Sgesi0M
++OBAOMdZMPK32uJBTeKFx1xZgTLIhk45V0hPOomPjZloiv0LSS11eyd451ufjW0iHRE7WlpR6EvI
+W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg==
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#AuthorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#AuthorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-author"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#AuthorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://yourdomain/Basic" version="1.0.0" viewmodes="maximized">
+ <tizen:application id="smokewgt40.ManifestDirectInstallMode" package="smokewgt40" required_version="3.0"/>
+ <content src="index.html"/>
+ <feature name="http://tizen.org/feature/screen.size.all"/>
+ <icon src="icon.png"/>
+ <name>ManifestDirectInstallMode</name>
+ <tizen:profile name="mobile"/>
+</widget>
\ No newline at end of file
--- /dev/null
+html, body {
+ width: 100%;
+ height: 100%;
+ margin: 0 auto;
+ padding: 0;
+}
+
+#container {
+ width: 100%;
+ height: 100%;
+ display: table;
+}
+
+#contents {
+ display: table-cell;
+ text-align: center;
+ vertical-align: middle;
+ background-color:#aaaaff;
+ -webkit-tap-highlight-color: transparent;
+}
+
+#content_text {
+ font-weight: bold;
+ font-size: 5em;
+ color: #ffffff;
+}
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
+ <title>Hello Tizen</title>
+ <link rel="stylesheet" href="css/style.css">
+</head>
+
+<body>
+ <div id="container">
+ <div id="contents">
+ <span id="content-text">Hello Tizen</span>
+ </div>
+ </div>
+
+ <script src="js/app.js"></script>
+</body>
+</html>
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * 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.
+ */
+
+(function() {
+ /**
+ * Handles the hardware key event.
+ * @private
+ * @param {Object} event - The hardware key event object
+ */
+ function keyEventHandler(event) {
+ if (event.keyName === "back") {
+ try {
+ // If the back key is pressed, exit the application.
+ tizen.application.getCurrentApplication().exit();
+ } catch (ignore) {}
+ }
+ }
+
+ /**
+ * Initializes the application.
+ * @private
+ */
+ function init() {
+ var textbox = document.querySelector("#contents");
+
+ // Add hardware event listener
+ document.addEventListener("tizenhwkey", keyEventHandler);
+
+ // Add click event listener
+ textbox.addEventListener("click", function() {
+ var box = document.querySelector("#content-text");
+
+ if (box.innerHTML === "Hello Tizen") {
+ // If the text in box is "Hello Tizen", change it to "Hi WebApp"
+ box.innerHTML = "Hi WebApp";
+ } else {
+ // If the text in box is not "Hello Tizen", change it to "Hello Tizen"
+ box.innerHTML = "Hello Tizen";
+ }
+ });
+ }
+
+ // The function "init" will be executed after the application successfully loaded.
+ window.onload = init;
+}());
\ No newline at end of file
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="LICENSE.APLv2">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>z8d0m5b2O9McPEK1xHG/dWgUBT6EfBDz6wA0F7xSPTA=</DigestValue>
+</Reference>
+<Reference URI="NOTICE">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>ijjaB8GEO5OJP/jK6n7Hr3vZFI9gy8ocoDhviViKNnU=</DigestValue>
+</Reference>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>leQv/rgXPAEhwQ84QN6OuE4aUf0vawVd4fx2GCvH6nI=</DigestValue>
+</Reference>
+<Reference URI="config.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>D77P2OH9hj+3BeuzXRjd5kkSP4H9bK3f2COPhdsWtEE=</DigestValue>
+</Reference>
+<Reference URI="css%2Fstyle.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>f7q5O05HNVS6mBDhCOBPBMFo6OA2iSqQVOf9aMoKPhs=</DigestValue>
+</Reference>
+<Reference URI="icon.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="index.html">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>pw+EAHkfej6NPKau0RrL0ZIVHj1Q0QJxUlUMBCFRIFU=</DigestValue>
+</Reference>
+<Reference URI="js%2Fapp.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>mCAANytlgxQx/1c82dNNjO4QUPgqRMkzu2b1sbBLPk8=</DigestValue>
+</Reference>
+<Reference URI="version.txt">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>9eXJU0UyhA/NRbsALmnthcYduidTRQ4mtEi33xSB4k0=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+mj0i35KMm0SDEzc8LflluEAXvKWqARc9GJlAZfNHKbJzB5P4yvNwYwgkH1hO2qtJB3H9WRH2LJo9
+McDywe8hr7Tu1rb6znAa0y2q3ZKcc3PUubQbcayv6mL6kZuFAg8bfZDP4nOCIltu2TtdeKRGrcQb
+XU4ivseIgptrDc21fNQ=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIICnTCCAgYCCQDE9MbMmJ/yCzANBgkqhkiG9w0BAQUFADCBkDELMAkGA1UEBhMCS1IxDjAMBgNV
+BAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6ZW4gVGVzdCBDQTEiMCAGA1UE
+CwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTElMCMGA1UEAwwcVGl6ZW4gUGFydG5lciBEaXN0
+cmlidXRvciBDQTAeFw0xMjEwMjcwNzQ4MzNaFw0yMjEwMjUwNzQ4MzNaMIGUMQswCQYDVQQGEwJL
+UjEOMAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENB
+MSIwIAYDVQQLDBlUaXplbiBEaXN0cmlidXRvciBUZXN0IENBMSkwJwYDVQQDDCBUaXplbiBQYXJ0
+bmVyIERpc3RyaWJ1dG9yIFNpZ25lcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAy9mg2x4B
+zxlK3LJL81GsLq/pJfK1evdCKG/IOBpdoRO0rLhYnsL5+KvToPFa5g9GTZo32LikpW1NZ7++3EHE
+fnO2IGLUau4kquvhmz1LNg5xBTx7IbucmwLMRGo1BPGdsAQQLyXeQKJ5PCERmVg4MIoiL2zT/JsL
+sZ9UPT6GEB8CAwEAATANBgkqhkiG9w0BAQUFAAOBgQAw5xPBFR1XKuZ8QpsCtSE0zXVHvwIa+Ha4
+YBdRtGwEoZmiKGZV/wAhPRdmR0kISkTz20kIGz/ZwRZCVGhsr5hkkpFknYlKeKkEJ/tJfZl4D7ec
+GFAnynOzlWZqSIPz+yxX8ah9E6lTv4Vs9DhNb08nxVvxLqlpyVdk9RUsCx/yIA==
+</X509Certificate>
+<X509Certificate>
+MIICtTCCAh6gAwIBAgIJAKORBcIiXygIMA0GCSqGSIb3DQEBBQUAMIGVMQswCQYDVQQGEwJLUjEO
+MAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENBMSIw
+IAYDVQQLDBlUaXplbiBEaXN0cmlidXRvciBUZXN0IENBMSowKAYDVQQDDCFUaXplbiBQYXJ0bmVy
+IERpc3RyaWJ1dG9yIFJvb3QgQ0EwHhcNMTIxMDI3MDc0NTIwWhcNMjIxMDI1MDc0NTIwWjCBkDEL
+MAkGA1UEBhMCS1IxDjAMBgNVBAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6
+ZW4gVGVzdCBDQTEiMCAGA1UECwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTElMCMGA1UEAwwc
+VGl6ZW4gUGFydG5lciBEaXN0cmlidXRvciBDQTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+2ZQrdEowjqxUmB8FX8ej19VKY6jGHKNIRE5wrhBkuZ1b0FLRPiN3/Cl9wMkCnyJui4QhC28g1aBg
+w/JnaObcDqW1NgFVH3006+gZvCTDlw1nIEjvZa6P+uWOOi05xPPAE0feKPkO1POnOjnapfkkEVNU
+8TXsLbLYBylWT8rxZC8CAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQBJ
+yJ7p6qs0JI+1iKOk/sYWVP6dMueY72qOc/wVj5c3ejOlgJNNXDMAQ14QcRRexffc68ipTwybU/3m
+tcNwydzKJe+GFa4b2zyKOvOgrfs4MKSR0T9XEPmTKeR+NDT2CbA6/kQoRYm0fSORzD2UXJzNZWe/
+WjwSA66hv4q+0QZQFQ==
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+Needed, because empty directories are skipped when copying, and directory structure will be invalid.
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="AuthorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="bin%2Fservice2">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>RnPKffWQVeWGu6c85RAZ2ok7U2TSjUwneF+3BwbY/q0=</DigestValue>
+</Reference>
+<Reference URI="config.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>TwwCzhdio1vGkQ6raK/ABUQH0YKx0TPrVEoOgwCuLkU=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2FLICENSE.APLv2">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>z8d0m5b2O9McPEK1xHG/dWgUBT6EfBDz6wA0F7xSPTA=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2FNOTICE">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>ijjaB8GEO5OJP/jK6n7Hr3vZFI9gy8ocoDhviViKNnU=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2Fconfig.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>gzrsgCaAh6OG7sGSP2wiAI/eD61S687+NuTnSqwLylc=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2Fcss%2Fstyle.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>f7q5O05HNVS6mBDhCOBPBMFo6OA2iSqQVOf9aMoKPhs=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2Ficon.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2Findex.html">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>pw+EAHkfej6NPKau0RrL0ZIVHj1Q0QJxUlUMBCFRIFU=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2Fjs%2Fapp.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>mCAANytlgxQx/1c82dNNjO4QUPgqRMkzu2b1sbBLPk8=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2Fversion.txt">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>9eXJU0UyhA/NRbsALmnthcYduidTRQ4mtEi33xSB4k0=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Fservice2.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>Tg/KmHRmoo0F+PrxTKOEcKJWfr7PF+jEJ5y2Y3uTiqo=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+O/O7XzUC18XJpjl0YUHdOmaeSjYzVkGBL5/kQhLhgZqaXshdpYi4XjN1R5H8dSoRlxMDorfqHa1E
+ntjHjvSBysVLJHX9+uE4vIfQKzsma4hfniqYwPO/yLwFhxMUS6mRKq+5yHBGzvL9uKmMArVRMiqC
+tLRAkjQu+ZBZeNUUYzM=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIICnDCCAYSgAwIBAgIGAVvS9uY8MA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz
+c29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2
+ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMBgxFjAUBgNVBAMMDUFw
+cF9pbnN0YWxsZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIKgQLsl5UIJdfdaDXbY+aQ6
+VHjwTPv5+aUlF1l6G9SDZ7tmJTCO1yAudmMr6vEN+ZL/bbOEAlyhkJPTmntPesO1h/WzjIlpFzTO
+UcHlEXAu1vZGTnPBoYTutBeVmbH9JY/dCSm2xFSioKaWHl+uMn0SB1DcvgIVSs4DkvO0F1+TAgMB
+AAGjMjAwMAwGA1UdEwEB/wQCMAAwCwYDVR0PBAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUFBwMDMA0G
+CSqGSIb3DQEBBQUAA4IBAQBwNrj9b7/g4JI9K3wohRLHW5IpxOwBO9gUlkotSUNaiAvNwsQfB5pE
+k+rTUa4Nwxcq6rFfne1brXP1vbl/bVGW/WJqV6dF3BL1QfwGif0vvcO1Sz2QOpoc/Jtt8zlmsRne
+TIEMph6kDUT1oNUlTCGnxD24WagRxuGUe/RZ6L4y+6T8L+fBDtMyyM+GytqE72V+0KeyITJMTdzM
+wRMjN3XccXemcox73isLxSXlgwrFbotkTyYPTFphiZCRU7BlA3EClIk+3To0b3irROY/iIlg6ZyY
+gNbND9/aIJxqPqCghW7PMjGH/9KK2mtNhtJSFrIAvvUiW/fMrNj1opsAHGgJ
+</X509Certificate>
+<X509Certificate>
+MIIDOTCCAiGgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMRowGAYDVQQKDBFUaXplbiBBc3NvY2lh
+dGlvbjEaMBgGA1UECwwRVGl6ZW4gQXNzb2NpYXRpb24xHjAcBgNVBAMMFVRpemVuIERldmVsb3Bl
+cnMgUm9vdDAeFw0xMjAxMDEwMDAwMDBaFw0yNzAxMDEwMDAwMDBaMFYxGjAYBgNVBAoMEVRpemVu
+IEFzc29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4g
+RGV2ZWxvcGVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANVGhRGmMIUyBA7o
+PCz8Sxut6z6HNkF4oDIuzuKaMzRYPeWodwe9O0gmqAkToQHfwg2giRhE5GoPld0fq+OYMMwSasCu
+g8dwODx1eDeSYVuOLWRxpAmbTXOsSFi6VoWeyaPEm18JBHvZBsU5YQtgZ6Kp7MqzvQg3pXOxtajj
+vyHxiatJl+xXrHgcXC1wgyG3buty7u/Fi2mvKXJ0PRJcCjjK81dqe/Vr20sRUCrbk02zbm5ggFt/
+jIEhV8wbFRQpliobc7J4dSTKhFfrqGM8rdd54LYhD7gSI1CFSe16pUXfcVR7FhJztRaiGLnCrwBE
+dyTZ248+D4L/qR/D0axb3jcCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
+AQEAnOXXQ/1O/QTDHyrmQDtFziqPY3xWlJBqJtEqXiT7Y+Ljpe66e+Ee/OjQMlZe8gu21/8cKklH
+95RxjopMWCVedXDUbWdvS2+CdyvVW/quT2E0tjqIzXDekUTYwwhlPWlGxvfj3VsxqSFq3p8Brl04
+1Gx5RKAGyKVsMfTLhbbwSWwApuBUxYfcNpKwLWGPXkysu+HctY03OKv4/xKBnVWiN8ex/Sgesi0M
++OBAOMdZMPK32uJBTeKFx1xZgTLIhk45V0hPOomPjZloiv0LSS11eyd451ufjW0iHRE7WlpR6EvI
+W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg==
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#AuthorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#AuthorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-author"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#AuthorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://yourdomain/Basic" version="1.0.0" viewmodes="maximized">
+ <tizen:application id="smokehyb12.ManifestDirectInstallModeHybrid" package="smokehyb12" required_version="3.0"/>
+ <content src="index.html"/>
+ <feature name="http://tizen.org/feature/screen.size.all"/>
+ <icon src="icon.png"/>
+ <name>ManifestDirectInstallMode_Hybrid</name>
+ <tizen:profile name="mobile"/>
+</widget>
--- /dev/null
+Needed, because empty directories are skipped when copying, and directory structure will be invalid.
--- /dev/null
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
--- /dev/null
+Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Apache License, Version 2.
+Please, see the LICENSE.APLv2 file for Apache License, Version 2 terms and conditions.
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://yourdomain/Basic" version="1.0.0" viewmodes="maximized">
+ <tizen:application id="smokehyb12.ManifestDirectInstallModeHybrid" package="smokehyb12" required_version="3.0"/>
+ <content src="index.html"/>
+ <feature name="http://tizen.org/feature/screen.size.all"/>
+ <icon src="icon.png"/>
+ <name>ManifestDirectInstallMode_Hybrid</name>
+ <tizen:profile name="mobile"/>
+</widget>
\ No newline at end of file
--- /dev/null
+html, body {
+ width: 100%;
+ height: 100%;
+ margin: 0 auto;
+ padding: 0;
+}
+
+#container {
+ width: 100%;
+ height: 100%;
+ display: table;
+}
+
+#contents {
+ display: table-cell;
+ text-align: center;
+ vertical-align: middle;
+ background-color:#aaaaff;
+ -webkit-tap-highlight-color: transparent;
+}
+
+#content_text {
+ font-weight: bold;
+ font-size: 5em;
+ color: #ffffff;
+}
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
+ <title>Hello Tizen</title>
+ <link rel="stylesheet" href="css/style.css">
+</head>
+
+<body>
+ <div id="container">
+ <div id="contents">
+ <span id="content-text">Hello Tizen</span>
+ </div>
+ </div>
+
+ <script src="js/app.js"></script>
+</body>
+</html>
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * 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.
+ */
+
+(function() {
+ /**
+ * Handles the hardware key event.
+ * @private
+ * @param {Object} event - The hardware key event object
+ */
+ function keyEventHandler(event) {
+ if (event.keyName === "back") {
+ try {
+ // If the back key is pressed, exit the application.
+ tizen.application.getCurrentApplication().exit();
+ } catch (ignore) {}
+ }
+ }
+
+ /**
+ * Initializes the application.
+ * @private
+ */
+ function init() {
+ var textbox = document.querySelector("#contents");
+
+ // Add hardware event listener
+ document.addEventListener("tizenhwkey", keyEventHandler);
+
+ // Add click event listener
+ textbox.addEventListener("click", function() {
+ var box = document.querySelector("#content-text");
+
+ if (box.innerHTML === "Hello Tizen") {
+ // If the text in box is "Hello Tizen", change it to "Hi WebApp"
+ box.innerHTML = "Hi WebApp";
+ } else {
+ // If the text in box is not "Hello Tizen", change it to "Hello Tizen"
+ box.innerHTML = "Hello Tizen";
+ }
+ });
+ }
+
+ // The function "init" will be executed after the application successfully loaded.
+ window.onload = init;
+}());
\ No newline at end of file
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>EqT9TFwwEUqOae+jSUwl+1QGX3DSuLgjkeXUJh5pECo=</DigestValue>
+</Reference>
+<Reference URI="bin%2Fservice2">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>RnPKffWQVeWGu6c85RAZ2ok7U2TSjUwneF+3BwbY/q0=</DigestValue>
+</Reference>
+<Reference URI="config.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>TwwCzhdio1vGkQ6raK/ABUQH0YKx0TPrVEoOgwCuLkU=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2FLICENSE.APLv2">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>z8d0m5b2O9McPEK1xHG/dWgUBT6EfBDz6wA0F7xSPTA=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2FNOTICE">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>ijjaB8GEO5OJP/jK6n7Hr3vZFI9gy8ocoDhviViKNnU=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2Fconfig.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>gzrsgCaAh6OG7sGSP2wiAI/eD61S687+NuTnSqwLylc=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2Fcss%2Fstyle.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>f7q5O05HNVS6mBDhCOBPBMFo6OA2iSqQVOf9aMoKPhs=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2Ficon.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2Findex.html">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>pw+EAHkfej6NPKau0RrL0ZIVHj1Q0QJxUlUMBCFRIFU=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2Fjs%2Fapp.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>mCAANytlgxQx/1c82dNNjO4QUPgqRMkzu2b1sbBLPk8=</DigestValue>
+</Reference>
+<Reference URI="res%2Fwgt%2Fversion.txt">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>9eXJU0UyhA/NRbsALmnthcYduidTRQ4mtEi33xSB4k0=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Fservice2.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>Tg/KmHRmoo0F+PrxTKOEcKJWfr7PF+jEJ5y2Y3uTiqo=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+q4QCfU18xiU4d397IiQ2/+RsfoQAHjFbvJpFm9Hn/01897/joNhMggZ3rJv1+7YrG2uyWpeskwBQ
+Ckg3jaBGyrRS17t3zZcAPUZT085Bq608fzn+sNUm2XY2FweOD3ttebAalgJBAhSshE1/sNY5eSy0
+lk9wVUXaVlInM6YWtx0=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIICnTCCAgYCCQDE9MbMmJ/yCzANBgkqhkiG9w0BAQUFADCBkDELMAkGA1UEBhMCS1IxDjAMBgNV
+BAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6ZW4gVGVzdCBDQTEiMCAGA1UE
+CwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTElMCMGA1UEAwwcVGl6ZW4gUGFydG5lciBEaXN0
+cmlidXRvciBDQTAeFw0xMjEwMjcwNzQ4MzNaFw0yMjEwMjUwNzQ4MzNaMIGUMQswCQYDVQQGEwJL
+UjEOMAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENB
+MSIwIAYDVQQLDBlUaXplbiBEaXN0cmlidXRvciBUZXN0IENBMSkwJwYDVQQDDCBUaXplbiBQYXJ0
+bmVyIERpc3RyaWJ1dG9yIFNpZ25lcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAy9mg2x4B
+zxlK3LJL81GsLq/pJfK1evdCKG/IOBpdoRO0rLhYnsL5+KvToPFa5g9GTZo32LikpW1NZ7++3EHE
+fnO2IGLUau4kquvhmz1LNg5xBTx7IbucmwLMRGo1BPGdsAQQLyXeQKJ5PCERmVg4MIoiL2zT/JsL
+sZ9UPT6GEB8CAwEAATANBgkqhkiG9w0BAQUFAAOBgQAw5xPBFR1XKuZ8QpsCtSE0zXVHvwIa+Ha4
+YBdRtGwEoZmiKGZV/wAhPRdmR0kISkTz20kIGz/ZwRZCVGhsr5hkkpFknYlKeKkEJ/tJfZl4D7ec
+GFAnynOzlWZqSIPz+yxX8ah9E6lTv4Vs9DhNb08nxVvxLqlpyVdk9RUsCx/yIA==
+</X509Certificate>
+<X509Certificate>
+MIICtTCCAh6gAwIBAgIJAKORBcIiXygIMA0GCSqGSIb3DQEBBQUAMIGVMQswCQYDVQQGEwJLUjEO
+MAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENBMSIw
+IAYDVQQLDBlUaXplbiBEaXN0cmlidXRvciBUZXN0IENBMSowKAYDVQQDDCFUaXplbiBQYXJ0bmVy
+IERpc3RyaWJ1dG9yIFJvb3QgQ0EwHhcNMTIxMDI3MDc0NTIwWhcNMjIxMDI1MDc0NTIwWjCBkDEL
+MAkGA1UEBhMCS1IxDjAMBgNVBAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6
+ZW4gVGVzdCBDQTEiMCAGA1UECwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTElMCMGA1UEAwwc
+VGl6ZW4gUGFydG5lciBEaXN0cmlidXRvciBDQTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+2ZQrdEowjqxUmB8FX8ej19VKY6jGHKNIRE5wrhBkuZ1b0FLRPiN3/Cl9wMkCnyJui4QhC28g1aBg
+w/JnaObcDqW1NgFVH3006+gZvCTDlw1nIEjvZa6P+uWOOi05xPPAE0feKPkO1POnOjnapfkkEVNU
+8TXsLbLYBylWT8rxZC8CAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQBJ
+yJ7p6qs0JI+1iKOk/sYWVP6dMueY72qOc/wVj5c3ejOlgJNNXDMAQ14QcRRexffc68ipTwybU/3m
+tcNwydzKJe+GFa4b2zyKOvOgrfs4MKSR0T9XEPmTKeR+NDT2CbA6/kQoRYm0fSORzD2UXJzNZWe/
+WjwSA66hv4q+0QZQFQ==
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="smokehyb12" version="1.0.0">
+ <profile name="mobile"/>
+ <service-application appid="smokehyb12.service2" exec="service2" multiple="false" nodisplay="true" taskmanage="false" type="capp">
+ <label>service2</label>
+ <icon>service2.png</icon>
+ </service-application>
+</manifest>
--- /dev/null
+Needed, because empty directories are skipped when copying, and directory structure will be invalid.
--- /dev/null
+#add
+res/wgt/ADDED
+#modify
+res/wgt/MODIFIED
+#delete
+res/wgt/DELETED
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://yourdomain/smokewgt11" version="1.0.0" viewmodes="maximized">
+ <tizen:application id="smokewgt11.RDSMode" package="smokewgt11" required_version="2.3"/>
+ <content src="index.html"/>
+ <feature name="http://tizen.org/feature/screen.size.all"/>
+ <icon src="icon.png"/>
+ <name>smokewgt11</name>
+ <tizen:profile name="mobile"/>
+</widget>
--- /dev/null
+// Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include "smoke_tests/wgt_smoke_utils.h"
+
+#include <unit_tests/common/smoke_utils.h>
+
+#include <string>
+#include <vector>
+#include <utility>
+
+#include "wgt/wgt_installer.h"
+#include "hybrid/hybrid_installer.h"
+
+namespace ci = common_installer;
+namespace st = smoke_test;
+
+namespace smoke_test {
+
+const bf::path kSmokePackagesDirectory =
+ "/usr/share/wgt-installer-ut/test_samples/smoke/";
+
+bool ValidatePackage(const std::string& pkgid,
+ const std::vector<std::string>& appids,
+ const TestParameters& params) {
+ Apps apps;
+ for (const auto& appid : appids) {
+ apps.push_back(std::make_pair(appid, appid));
+ }
+ return ValidatePackage(pkgid, apps, params);
+}
+
+bool ValidateExternalPackage(const std::string& pkgid,
+ const std::vector<std::string>& appids,
+ const TestParameters& params) {
+ Apps apps;
+ for (const auto& appid : appids) {
+ apps.push_back(std::make_pair(appid, appid));
+ }
+ return ValidateExternalPackage(pkgid, apps, params);
+}
+
+bool ValidateExtendedPackage(const std::string& pkgid,
+ const std::vector<std::string>& appids,
+ const TestParameters& params) {
+ Apps apps;
+ for (const auto& appid : appids) {
+ apps.push_back(std::make_pair(appid, appid));
+ }
+ return ValidateExtendedPackage(pkgid, apps, params);
+}
+
+WgtBackendInterface::AppQueryInterfacePtr
+WgtBackendInterface::CreateQueryInterface() const {
+ return AppQueryInterfacePtr(new wgt::WgtAppQueryInterface());
+}
+
+WgtBackendInterface::AppInstallerPtr
+WgtBackendInterface::CreateInstaller(ci::PkgMgrPtr pkgmgr) const {
+ return AppInstallerPtr(new wgt::WgtInstaller(pkgmgr));
+}
+
+WgtBackendInterface::AppInstallerPtr
+WgtBackendInterface::CreateFailExpectedInstaller(
+ ci::PkgMgrPtr pkgmgr, int fail_at) const {
+ return AppInstallerPtr(new FailExpectedWgtInstaller(pkgmgr, fail_at));
+}
+
+HybridBackendInterface::AppQueryInterfacePtr
+HybridBackendInterface::CreateQueryInterface() const {
+ return AppQueryInterfacePtr(new wgt::WgtAppQueryInterface());
+}
+
+HybridBackendInterface::AppInstallerPtr
+HybridBackendInterface::CreateInstaller(ci::PkgMgrPtr pkgmgr) const {
+ return AppInstallerPtr(new hybrid::HybridInstaller(pkgmgr));
+}
+
+HybridBackendInterface::AppInstallerPtr
+HybridBackendInterface::CreateFailExpectedInstaller(
+ ci::PkgMgrPtr pkgmgr, int fail_at) const {
+ return AppInstallerPtr(new FailExpectedHybridInstaller(pkgmgr, fail_at));
+}
+
+} // namespace smoke_test
--- /dev/null
+// Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#ifndef SMOKE_TESTS_WGT_SMOKE_UTILS_H_
+#define SMOKE_TESTS_WGT_SMOKE_UTILS_H_
+
+#include <common/installer/app_installer.h>
+#include <common/pkgmgr_interface.h>
+#include <common/step/configuration/step_fail.h>
+#include <unit_tests/common/smoke_utils.h>
+
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "hybrid/hybrid_installer.h"
+#include "wgt/wgt_installer.h"
+#include "wgt/utils/wgt_app_query_interface.h"
+
+namespace smoke_test {
+
+bool ValidatePackage(const std::string& pkgid,
+ const std::vector<std::string>& appids,
+ const TestParameters& params);
+
+bool ValidateExternalPackage(const std::string& pkgid,
+ const std::vector<std::string>& appids,
+ const TestParameters& params);
+
+bool ValidateExtendedPackage(const std::string& pkgid,
+ const std::vector<std::string>& appids,
+ const TestParameters& params);
+
+extern const bf::path kSmokePackagesDirectory;
+
+class WgtBackendInterface: public BackendInterface {
+ public:
+ using BackendInterface::BackendInterface;
+
+// private:
+ AppQueryInterfacePtr CreateQueryInterface() const override;
+ AppInstallerPtr CreateInstaller(
+ common_installer::PkgMgrPtr pkgmgr) const override;
+ AppInstallerPtr CreateFailExpectedInstaller(
+ common_installer::PkgMgrPtr pkgmgr, int fail_at) const override;
+};
+
+class HybridBackendInterface: public BackendInterface {
+ public:
+ using BackendInterface::BackendInterface;
+
+ AppQueryInterfacePtr CreateQueryInterface() const override;
+ AppInstallerPtr CreateInstaller(
+ common_installer::PkgMgrPtr pkgmgr) const override;
+ AppInstallerPtr CreateFailExpectedInstaller(
+ common_installer::PkgMgrPtr pkgmgr, int fail_at) const override;
+};
+
+#ifdef OVERRIDE_STEPS_BLOCK
+#undef OVERRIDE_STEPS_BLOCK
+#endif
+#define OVERRIDE_STEPS_BLOCK(TYPE, STEPS) \
+ void STEPS() override { \
+ TYPE::STEPS(); \
+ if (fail_at_ > -1) \
+ AddStepAtIndex<common_installer::configuration::StepFail>(fail_at_); \
+ else \
+ AddStep<common_installer::configuration::StepFail>(); \
+ } \
+
+class FailExpectedWgtInstaller : public wgt::WgtInstaller {
+ public:
+ explicit FailExpectedWgtInstaller(
+ common_installer::PkgMgrPtr pkgmgr, int fail_at)
+ : wgt::WgtInstaller(pkgmgr), fail_at_(fail_at) { }
+
+ private:
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, InstallSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, UpdateSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, UninstallSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, ReinstallSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, DeltaSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, MoveSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, RecoverySteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, MountInstallSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, MountUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, ManifestDirectInstallSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, ManifestDirectUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, ManifestPartialInstallSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, ManifestPartialUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, PartialUninstallSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, ReadonlyUpdateInstallSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, ReadonlyUpdateUninstallSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, DisablePkgSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, EnablePkgSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, MigrateExtImgSteps)
+ OVERRIDE_STEPS_BLOCK(wgt::WgtInstaller, RecoverDBSteps)
+
+ int fail_at_;
+};
+
+class FailExpectedHybridInstaller : public hybrid::HybridInstaller {
+ public:
+ explicit FailExpectedHybridInstaller(
+ common_installer::PkgMgrPtr pkgmgr, int fail_at)
+ : hybrid::HybridInstaller(pkgmgr), fail_at_(fail_at) { }
+
+ private:
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, InstallSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, UpdateSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, UninstallSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, ReinstallSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, DeltaSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, MoveSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, RecoverySteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, MountInstallSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, MountUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, ManifestDirectInstallSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, ManifestDirectUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, ManifestPartialInstallSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, ManifestPartialUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, PartialUninstallSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, ReadonlyUpdateInstallSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, ReadonlyUpdateUninstallSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, DisablePkgSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, EnablePkgSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, MigrateExtImgSteps)
+ OVERRIDE_STEPS_BLOCK(hybrid::HybridInstaller, RecoverDBSteps)
+
+ int fail_at_;
+};
+
+#ifdef OVERRIDE_STEPS_BLOCK
+#undef OVERRIDE_STEPS_BLOCK
+#endif
+#define OVERRIDE_STEPS_BLOCK(STEPS) \
+ void STEPS() override { \
+ wgt::WgtInstaller::STEPS(); \
+ if (crash_at_ > -1) \
+ AddStepAtIndex<StepCrash>(crash_at_, type_); \
+ else if (step_name_.size()) \
+ AddStepAfter<StepCrash>(step_name_, type_); \
+ else \
+ AddStep<StepCrash>(type_); \
+ } \
+
+class CrashWgtInstaller : public wgt::WgtInstaller {
+ public:
+ explicit CrashWgtInstaller(common_installer::PkgMgrPtr pkgmgr, int crash_at,
+ std::string step_name, CrashStepType type) :
+ wgt::WgtInstaller(pkgmgr), crash_at_(crash_at),
+ step_name_(step_name), type_(type) { }
+
+ private:
+ OVERRIDE_STEPS_BLOCK(InstallSteps)
+ OVERRIDE_STEPS_BLOCK(UpdateSteps)
+ OVERRIDE_STEPS_BLOCK(UninstallSteps)
+ OVERRIDE_STEPS_BLOCK(ReinstallSteps)
+ OVERRIDE_STEPS_BLOCK(DeltaSteps)
+ OVERRIDE_STEPS_BLOCK(MoveSteps)
+ OVERRIDE_STEPS_BLOCK(RecoverySteps)
+ OVERRIDE_STEPS_BLOCK(MountInstallSteps)
+ OVERRIDE_STEPS_BLOCK(MountUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(ManifestDirectInstallSteps)
+ OVERRIDE_STEPS_BLOCK(ManifestDirectUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(ManifestPartialInstallSteps)
+ OVERRIDE_STEPS_BLOCK(ManifestPartialUpdateSteps)
+ OVERRIDE_STEPS_BLOCK(PartialUninstallSteps)
+ OVERRIDE_STEPS_BLOCK(ReadonlyUpdateInstallSteps)
+ OVERRIDE_STEPS_BLOCK(ReadonlyUpdateUninstallSteps)
+ OVERRIDE_STEPS_BLOCK(DisablePkgSteps)
+ OVERRIDE_STEPS_BLOCK(EnablePkgSteps)
+ OVERRIDE_STEPS_BLOCK(MigrateExtImgSteps)
+ OVERRIDE_STEPS_BLOCK(RecoverDBSteps)
+
+ int crash_at_;
+ std::string step_name_;
+ CrashStepType type_;
+};
+
+#ifdef OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS
+#undef OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS
+#endif
+#define OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(TYPE, STEPS) \
+ void STEPS() override { \
+ TYPE::STEPS(); \
+ RemoveStep("RunParserPlugin"); \
+ } \
+
+class WgtInstallerWithoutPasrserPlugins : public wgt::WgtInstaller {
+ public:
+ explicit WgtInstallerWithoutPasrserPlugins(
+ common_installer::PkgMgrPtr pkgmgr) : wgt::WgtInstaller(pkgmgr) { }
+
+ private:
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, InstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, UpdateSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, UninstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, ReinstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, DeltaSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, MoveSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, MountInstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, MountUpdateSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, ManifestDirectInstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, ManifestDirectUpdateSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, ManifestPartialInstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, ManifestPartialUpdateSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, PartialUninstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, ReadonlyUpdateInstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, ReadonlyUpdateUninstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, DisablePkgSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, EnablePkgSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, MigrateExtImgSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ wgt::WgtInstaller, RecoverDBSteps)
+ void RecoverySteps() override {
+ wgt::WgtInstaller::RecoverySteps();
+ RemoveStep("RecoverParserPlugin");
+ }
+};
+
+class HybridInstallerWithoutPasrserPlugins : public hybrid::HybridInstaller {
+ public:
+ explicit HybridInstallerWithoutPasrserPlugins(
+ common_installer::PkgMgrPtr pkgmgr) : hybrid::HybridInstaller(pkgmgr) { }
+
+ private:
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, InstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, UpdateSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, UninstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, ReinstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, DeltaSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, MoveSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, MountInstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, MountUpdateSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, ManifestDirectInstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, ManifestDirectUpdateSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, ManifestPartialInstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, ManifestPartialUpdateSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, PartialUninstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, ReadonlyUpdateInstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, ReadonlyUpdateUninstallSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, DisablePkgSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, EnablePkgSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, MigrateExtImgSteps)
+ OVERRIDE_STEPS_BLOCK_WITHOUT_PARSER_PLUGINS(
+ hybrid::HybridInstaller, RecoverDBSteps)
+ void RecoverySteps() override {
+ hybrid::HybridInstaller::RecoverySteps();
+ RemoveStep("RecoverParserPlugin");
+ }
+};
+
+} // namespace smoke_test
+
+
+#endif // SMOKE_TESTS_WGT_SMOKE_UTILS_H_