Chromium Code Reviews| Index: chrome/test/data/webui/md_bookmarks/list_test.js |
| diff --git a/chrome/test/data/webui/md_bookmarks/list_test.js b/chrome/test/data/webui/md_bookmarks/list_test.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f579f03bcad6f2fce22be0230bdc3b6d28429c61 |
| --- /dev/null |
| +++ b/chrome/test/data/webui/md_bookmarks/list_test.js |
| @@ -0,0 +1,25 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +suite('<bookmarks-list>', function() { |
| + var list; |
| + var TEST_LIST = |
| + [createItem('0'), createItem('1'), createFolder('2', [], null)]; |
| + |
| + setup(function() { |
| + list = document.createElement('bookmarks-list'); |
| + replaceBody(list); |
| + list.displayedList = TEST_LIST; |
| + }); |
| + |
| + test('folder menu item hide the url field', function() { |
| + // Bookmark editor shows the url field. |
| + list.menuItem_ = TEST_LIST[0]; |
| + assertFalse(list.$['url'].hidden); |
| + |
| + // Folder editor hides the url field. |
| + list.menuItem_ = TEST_LIST[2]; |
| + assertTrue(list.$['url'].hidden); |
| + }); |
|
calamity
2017/02/02 06:49:13
Also mock out chrome.bookmarks.update and make sur
angelayang
2017/02/03 02:26:24
Done.
|
| +}); |