#include "xwalk/application/browser/application.h"
#include "xwalk/application/browser/application_service.h"
#include "xwalk/application/browser/application_system.h"
+#include "xwalk/application/common/application_file_util.h"
#include "xwalk/application/test/application_browsertest.h"
#include "xwalk/application/test/application_testapi.h"
#include "xwalk/runtime/browser/xwalk_runner.h"
using xwalk::application::Application;
using xwalk::application::ApplicationService;
+using xwalk::application::Manifest;
+using xwalk::application::GetManifestPath;
class ApplicationMultiAppTest : public ApplicationBrowserTest {
};
ApplicationService* service = application_sevice();
const size_t currently_running_count = service->active_applications().size();
// Launch the first app.
- Application* app1 = service->LaunchFromUnpackedPath(
- test_data_dir_.Append(FILE_PATH_LITERAL("dummy_app1")));
+ base::FilePath manifest_path =
+ GetManifestPath(test_data_dir_.Append(FILE_PATH_LITERAL("dummy_app1")),
+ Manifest::TYPE_MANIFEST);
+ Application* app1 = application_sevice()->LaunchFromManifestPath(
+ manifest_path, Manifest::TYPE_MANIFEST);
ASSERT_TRUE(app1);
// Wait for app is fully loaded.
test_runner_->WaitForTestNotification();
// Verify that no new App instance was created, if one exists
// with the same ID.
- Application* failed_app1 = service->LaunchFromUnpackedPath(
- test_data_dir_.Append(FILE_PATH_LITERAL("dummy_app1")));
+ Application* failed_app1 = application_sevice()->LaunchFromManifestPath(
+ manifest_path, Manifest::TYPE_MANIFEST);
ASSERT_FALSE(failed_app1);
// Launch the second app.
- Application* app2 = service->LaunchFromUnpackedPath(
- test_data_dir_.Append(FILE_PATH_LITERAL("dummy_app2")));
+ manifest_path =
+ GetManifestPath(test_data_dir_.Append(FILE_PATH_LITERAL("dummy_app2")),
+ Manifest::TYPE_MANIFEST);
+ Application* app2 = application_sevice()->LaunchFromManifestPath(
+ manifest_path, Manifest::TYPE_MANIFEST);
ASSERT_TRUE(app2);
// Wait for app is fully loaded.
test_runner_->PostResultToNotificationCallback();