Group privilege check refactoring
[platform/core/test/security-tests.git] / src / security-manager-tests / common / scoped_app_launcher.cpp
index 50a9587..bde5681 100644 (file)
@@ -22,7 +22,8 @@
 
 using namespace SecurityManagerTest;
 
-ScopedAppLauncher::ScopedAppLauncher(const AppInstallHelper& app) :
+ScopedAppLauncher::ScopedAppLauncher(const AppInstallHelper& app,
+                                     const std::function<void(void)>& runInAppContext) :
     m_uid(app.getUID()),
     m_appId(app.getAppId())
 {
@@ -39,6 +40,7 @@ ScopedAppLauncher::ScopedAppLauncher(const AppInstallHelper& app) :
                                     "launcher failed");
             Api::prepareAppCandidate();
             Api::prepareApp(app.getAppId().c_str());
+            runInAppContext();
         } catch (...) {
             m_syncPipe.post();
             throw;