| Index: chrome/test/data/extensions/api_test/bookmark_manager/standard/test.js
|
| diff --git a/chrome/test/data/extensions/api_test/bookmark_manager/standard/test.js b/chrome/test/data/extensions/api_test/bookmark_manager/standard/test.js
|
| index 7667a7b243f8d6e14bc9d3c61f939b0a690b4b95..e09929ebc35af5637cd32dd8d833e86fb9368b0a 100644
|
| --- a/chrome/test/data/extensions/api_test/bookmark_manager/standard/test.js
|
| +++ b/chrome/test/data/extensions/api_test/bookmark_manager/standard/test.js
|
| @@ -9,6 +9,7 @@ const pass = chrome.test.callbackPass;
|
| const fail = chrome.test.callbackFail;
|
| const assertEq = chrome.test.assertEq;
|
| const assertTrue = chrome.test.assertTrue;
|
| +const assertFalse = chrome.test.assertFalse;
|
| const bookmarks = chrome.bookmarks;
|
| const bookmarkManager = chrome.bookmarkManagerPrivate;
|
| var fooNode, fooNode2, barNode, gooNode, count, emptyFolder, emptyFolder2;
|
| @@ -294,6 +295,26 @@ var tests = [
|
| }));
|
| },
|
|
|
| + function clipboard6() {
|
| + // Verify that we can't cut managed folders.
|
| + bookmarks.getChildren('4', pass(function(result) {
|
| + assertEq(2, result.length);
|
| + const error = "Can't modify managed bookmarks.";
|
| + bookmarkManager.cut([ result[0].id ], fail(error));
|
| +
|
| + // Copying is fine.
|
| + bookmarkManager.copy([ result[0].id ], pass());
|
| +
|
| + // Pasting to a managed folder is not allowed.
|
| + assertTrue(result[1].url === undefined);
|
| + bookmarkManager.canPaste(result[1].id, pass(function(result) {
|
| + assertFalse(result, 'Should not be able to paste to managed folders.');
|
| + }));
|
| +
|
| + bookmarkManager.paste(result[1].id, fail(error));
|
| + }));
|
| + },
|
| +
|
| function canEdit() {
|
| bookmarkManager.canEdit(pass(function(result) {
|
| assertTrue(result, 'Should be able to edit bookmarks');
|
|
|