| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Bookmark Manager API test for Chrome. | 5 // Bookmark Manager API test for Chrome. |
| 6 // browser_tests.exe --gtest_filter=ExtensionApiTest.BookmarkManagerEditDisabled | 6 // browser_tests.exe --gtest_filter=ExtensionApiTest.BookmarkManagerEditDisabled |
| 7 | 7 |
| 8 const pass = chrome.test.callbackPass; | 8 const pass = chrome.test.callbackPass; |
| 9 const fail = chrome.test.callbackFail; | 9 const fail = chrome.test.callbackFail; |
| 10 const assertEq = chrome.test.assertEq; | 10 const assertEq = chrome.test.assertEq; |
| 11 const assertFalse = chrome.test.assertFalse; | 11 const assertFalse = chrome.test.assertFalse; |
| 12 const assertTrue = chrome.test.assertTrue; | 12 const assertTrue = chrome.test.assertTrue; |
| 13 const bookmarks = chrome.bookmarks; | 13 const bookmarks = chrome.bookmarks; |
| 14 const bookmarkManager = chrome.experimental.bookmarkManager; | 14 const bookmarkManager = chrome.bookmarkManagerPrivate; |
| 15 | 15 |
| 16 var ERROR = "Bookmark editing is disabled."; | 16 var ERROR = "Bookmark editing is disabled."; |
| 17 | 17 |
| 18 // Bookmark model within this test: | 18 // Bookmark model within this test: |
| 19 // <root>/ | 19 // <root>/ |
| 20 // Bookmarks Bar/ | 20 // Bookmarks Bar/ |
| 21 // Folder/ | 21 // Folder/ |
| 22 // "BBB" | 22 // "BBB" |
| 23 // "AAA" | 23 // "AAA" |
| 24 // Other Bookmarks/ | 24 // Other Bookmarks/ |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 }, | 77 }, |
| 78 | 78 |
| 79 function editDisabled() { | 79 function editDisabled() { |
| 80 bookmarkManager.canEdit(pass(function(result) { | 80 bookmarkManager.canEdit(pass(function(result) { |
| 81 assertFalse(result, 'Should not be able to edit bookmarks'); | 81 assertFalse(result, 'Should not be able to edit bookmarks'); |
| 82 })); | 82 })); |
| 83 } | 83 } |
| 84 ]; | 84 ]; |
| 85 | 85 |
| 86 chrome.test.runTests(tests); | 86 chrome.test.runTests(tests); |
| OLD | NEW |