ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "2\n"));
}
+TEST_F(SmokeTest, UserDefinedPlugins) {
+ bf::path path = kSmokePackagesDirectory / "SimpleEchoPrivilege.wgt";
+ std::string pkgid = "0CSPVhKmRk";
+ std::string appid = "0CSPVhKmRk.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(Install(path, PackageType::WGT), ci::AppInstaller::Result::OK);
+ ValidatePackage(pkgid, {appid});
+ std::vector<std::string> res;
+ ASSERT_TRUE(ci::QueryPrivilegesForPkgId(pkgid, kTestUserId, &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());
+}
+
} // namespace common_installer
int main(int argc, char** argv) {