diff --git a/atom/browser/api/atom_api_dialog.cc b/atom/browser/api/atom_api_dialog.cc index 61999e1c703..326834472d2 100644 --- a/atom/browser/api/atom_api_dialog.cc +++ b/atom/browser/api/atom_api_dialog.cc @@ -45,10 +45,13 @@ struct Converter { return false; dict.Get("window", &(out->parent_window)); dict.Get("title", &(out->title)); + dict.Get("message", &(out->message)); dict.Get("buttonLabel", &(out->button_label)); + dict.Get("nameFieldLabel", &(out->name_field_label)); dict.Get("defaultPath", &(out->default_path)); dict.Get("filters", &(out->filters)); dict.Get("properties", &(out->properties)); + dict.Get("showsTagField", &(out->shows_tag_field)); return true; } }; diff --git a/atom/browser/ui/file_dialog.h b/atom/browser/ui/file_dialog.h index 95fffe6ebb9..e9734adeb60 100644 --- a/atom/browser/ui/file_dialog.h +++ b/atom/browser/ui/file_dialog.h @@ -40,10 +40,13 @@ typedef base::Callback { assert.throws(() => { dialog.showOpenDialog({defaultPath: {}}) }, /Default path must be a string/) + + assert.throws(() => { + dialog.showOpenDialog({message: {}}) + }, /Message must be a string/) }) }) @@ -35,6 +39,14 @@ describe('dialog module', () => { assert.throws(() => { dialog.showSaveDialog({defaultPath: {}}) }, /Default path must be a string/) + + assert.throws(() => { + dialog.showSaveDialog({message: {}}) + }, /Message must be a string/) + + assert.throws(() => { + dialog.showSaveDialog({nameFieldLabel: {}}) + }, /Name field label must be a string/) }) })