read/writeBookmark is not implemented on Linux

This commit is contained in:
Kevin Sawicki 2016-06-24 17:16:38 -07:00
parent 9479536bb8
commit f90ef12814
2 changed files with 8 additions and 3 deletions

View file

@ -75,13 +75,13 @@ Returns the content in the clipboard as RTF.
Writes the `text` into the clipboard in RTF.
### `clipboard.readBookmark()`
### `clipboard.readBookmark()` _macOS_ _Windows_
Returns an Object containing `title` and `url` keys representing the bookmark in
the clipboard. The `title` and `url` values will be empty strings when the
bookmark is unavailable.
### `clipboard.writeBookmark(title, url[, type])`
### `clipboard.writeBookmark(title, url[, type])` _macOS_ _Windows_
* `title` String
* `url` String

View file

@ -43,6 +43,8 @@ describe('clipboard module', function () {
describe('clipboard.readBookmark', function () {
it('returns title and url', function () {
if (process.platform === 'linux') return
clipboard.writeBookmark('a title', 'http://electron.atom.io')
assert.deepEqual(clipboard.readBookmark(), {
title: 'a title',
@ -76,7 +78,10 @@ describe('clipboard module', function () {
assert.equal(clipboard.readHTML(), markup)
assert.equal(clipboard.readRTF(), rtf)
assert.equal(clipboard.readImage().toDataURL(), i.toDataURL())
assert.deepEqual(clipboard.readBookmark(), bookmark)
if (process.platform !== 'linux') {
assert.deepEqual(clipboard.readBookmark(), bookmark)
}
})
})
})