From f90ef128145600899427ef8c5629fa0cd794232d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 24 Jun 2016 17:16:38 -0700 Subject: [PATCH] read/writeBookmark is not implemented on Linux --- docs/api/clipboard.md | 4 ++-- spec/api-clipboard-spec.js | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/api/clipboard.md b/docs/api/clipboard.md index c4ae96c..85712bc 100644 --- a/docs/api/clipboard.md +++ b/docs/api/clipboard.md @@ -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 diff --git a/spec/api-clipboard-spec.js b/spec/api-clipboard-spec.js index 5116bd8..25b65b4 100644 --- a/spec/api-clipboard-spec.js +++ b/spec/api-clipboard-spec.js @@ -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) + } }) }) }) -- 2.7.4