Add specs for missing startDrag options
This commit is contained in:
parent
2ee5f6f358
commit
8ce1930f0d
2 changed files with 18 additions and 2 deletions
|
@ -1327,7 +1327,7 @@ void WebContents::StartDrag(const mate::Dictionary& item,
|
|||
|
||||
// Error checking.
|
||||
if (icon.IsEmpty()) {
|
||||
args->ThrowError("icon must be set");
|
||||
args->ThrowError("Must specify non-empty 'icon' option");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1337,7 +1337,7 @@ void WebContents::StartDrag(const mate::Dictionary& item,
|
|||
base::MessageLoop::current());
|
||||
DragFileItems(files, icon->image(), web_contents()->GetNativeView());
|
||||
} else {
|
||||
args->ThrowError("There is nothing to drag");
|
||||
args->ThrowError("Must specify either 'file' or 'files' option");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue