Plan cloud browse decisions in app core
This commit is contained in:
@@ -31,6 +31,30 @@ void cloud_upload_records_save_before_upload_for_dirty_existing_documents(pp::te
|
||||
PP_EXPECT(harness, plan.save_before_upload);
|
||||
}
|
||||
|
||||
void cloud_browse_is_unavailable_without_canvas(pp::tests::Harness& harness)
|
||||
{
|
||||
PP_EXPECT(harness, pp::app::plan_cloud_browse(false) == pp::app::CloudBrowseAction::unavailable_no_canvas);
|
||||
}
|
||||
|
||||
void cloud_browse_shows_browser_with_canvas(pp::tests::Harness& harness)
|
||||
{
|
||||
PP_EXPECT(harness, pp::app::plan_cloud_browse(true) == pp::app::CloudBrowseAction::show_browser);
|
||||
}
|
||||
|
||||
void cloud_download_selection_waits_for_empty_file(pp::tests::Harness& harness)
|
||||
{
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
pp::app::plan_cloud_download_selection("") == pp::app::CloudDownloadSelectionAction::wait_for_selection);
|
||||
}
|
||||
|
||||
void cloud_download_selection_starts_for_selected_file(pp::tests::Harness& harness)
|
||||
{
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
pp::app::plan_cloud_download_selection("demo.ppi") == pp::app::CloudDownloadSelectionAction::start_download);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int main()
|
||||
@@ -40,5 +64,9 @@ int main()
|
||||
harness.run("cloud upload warns for new documents", cloud_upload_warns_for_new_documents);
|
||||
harness.run("cloud upload prompts for clean existing documents", cloud_upload_prompts_for_clean_existing_documents);
|
||||
harness.run("cloud upload records save before upload for dirty existing documents", cloud_upload_records_save_before_upload_for_dirty_existing_documents);
|
||||
harness.run("cloud browse is unavailable without canvas", cloud_browse_is_unavailable_without_canvas);
|
||||
harness.run("cloud browse shows browser with canvas", cloud_browse_shows_browser_with_canvas);
|
||||
harness.run("cloud download selection waits for empty file", cloud_download_selection_waits_for_empty_file);
|
||||
harness.run("cloud download selection starts for selected file", cloud_download_selection_starts_for_selected_file);
|
||||
return harness.finish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user