Plan export start decisions in app core
This commit is contained in:
@@ -46,6 +46,38 @@ void video_export_builds_suggested_name(pp::tests::Harness& harness)
|
||||
PP_EXPECT(harness, animation.value().name == "demo-animation");
|
||||
}
|
||||
|
||||
void export_start_allows_valid_canvas_state(pp::tests::Harness& harness)
|
||||
{
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
pp::app::plan_document_export_start(true, true, true)
|
||||
== pp::app::DocumentExportStartDecision::start_now);
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
pp::app::plan_document_export_start(false, false, true)
|
||||
== pp::app::DocumentExportStartDecision::start_now);
|
||||
}
|
||||
|
||||
void export_start_blocks_demo_only_when_license_required(pp::tests::Harness& harness)
|
||||
{
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
pp::app::plan_document_export_start(true, false, true)
|
||||
== pp::app::DocumentExportStartDecision::show_license_disabled);
|
||||
}
|
||||
|
||||
void export_start_reports_missing_canvas_after_license_gate(pp::tests::Harness& harness)
|
||||
{
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
pp::app::plan_document_export_start(false, true, false)
|
||||
== pp::app::DocumentExportStartDecision::unavailable_no_canvas);
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
pp::app::plan_document_export_start(true, false, false)
|
||||
== pp::app::DocumentExportStartDecision::show_license_disabled);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int main()
|
||||
@@ -56,5 +88,8 @@ int main()
|
||||
harness.run("collection export builds directory and stem", collection_export_builds_directory_and_stem);
|
||||
harness.run("picked directory export builds stem", picked_directory_export_builds_stem);
|
||||
harness.run("video export builds suggested name", video_export_builds_suggested_name);
|
||||
harness.run("export start allows valid canvas state", export_start_allows_valid_canvas_state);
|
||||
harness.run("export start blocks demo only when license required", export_start_blocks_demo_only_when_license_required);
|
||||
harness.run("export start reports missing canvas after license gate", export_start_reports_missing_canvas_after_license_gate);
|
||||
return harness.finish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user