return context_->manifest_data.get();
}
+bf::path StepParseRunner::GetRootApplicationPath() const {
+ return context_->root_application_path.get();
+}
+
void StepParseRunner::PrepareContext() {
context_.reset(new ci::InstallerContext());
context_->root_application_path.set(ci::GetRootAppPath(false, getuid()));
ASSERT_CSTR_EQ(app->submode, "false");
ASSERT_CSTR_EQ(app->process_pool, "false");
}
+
+TEST_F(ManifestTest, UIApplicationElement_SplashScreens_Duplicated_Entry) {
+ StepParseRunner runner(GetMyName());
+ ASSERT_TRUE(runner.Run());
+ manifest_x* m = runner.GetManifest();
+ ASSERT_NE(m, nullptr);
+ auto apps = GListRange<application_x*>(m->application);
+ ASSERT_EQ(Size(&apps), 1);
+ application_x* app = *apps.begin();
+ auto splashscreens = GListRange<splashscreen_x*>(app->splashscreens);
+ ASSERT_EQ(splashscreens.Size(), 2);
+ auto root_path = runner.GetRootApplicationPath();
+ std::string pkgid = "package0id";
+ auto src_directory = root_path / pkgid / "shared" / "res";
+ auto test1 = src_directory / "test1.jpg";
+ auto it = splashscreens.begin();
+ ASSERT_CSTR_EQ((*it)->src, test1.c_str());
+ ASSERT_CSTR_EQ((*it)->type, "img");
+ ASSERT_CSTR_EQ((*it)->dpi, "hdpi");
+ ASSERT_CSTR_EQ((*it)->orientation, "landscape");
+ ASSERT_CSTR_EQ((*it)->operation,
+ "http://tizen.org/appcontrol/operation/default");
+ it++;
+ ASSERT_CSTR_EQ((*it)->src, test1.c_str());
+ ASSERT_CSTR_EQ((*it)->type, "img");
+ ASSERT_CSTR_EQ((*it)->dpi, "hdpi");
+ ASSERT_CSTR_EQ((*it)->orientation, "landscape");
+ ASSERT_CSTR_EQ((*it)->operation,
+ "http://tizen.org/appcontrol/operation/test_operation");
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="5.5" package="package0id" version="1.0.0">
+ <ui-application appid="package0id.appid" exec="testapp" type="capp">
+ <splash-screens>
+ <splash-screen src="test1.jpg" type="img" dpi="hdpi" orientation="landscape" app-control-operation="http://tizen.org/appcontrol/operation/default" />
+ <splash-screen src="test1.jpg" type="img" dpi="hdpi" orientation="landscape" app-control-operation="http://tizen.org/appcontrol/operation/default" />
+ <splash-screen src="test1.jpg" type="img" dpi="hdpi" orientation="landscape" app-control-operation="http://tizen.org/appcontrol/operation/test_operation" />
+ </splash-screens>
+ </ui-application>
+</manifest>