Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(617)

Side by Side Diff: chrome/test/data/webui/md_bookmarks/item_test.js

Issue 2603303002: [MD Bookmarks] Add UI for Material Bookmarks. (Closed)
Patch Set: renaming and reverting Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 suite('<bookmarks-item>', function() {
6 var item;
7 var TEST_ITEM = {
8 id: '0', url: 'http://www.google.com'
9 };
10
11 setup(function() {
12 item = document.createElement('bookmarks-item');
13 item.isTesting_ = true;
tsergeant 2017/01/04 03:44:12 This doesn't do anything anymore, get rid of it.
jiaxi 2017/01/04 04:12:34 Done.
14 replaceBody(item);
15 item.item = TEST_ITEM;
16 });
17
18 test('changing the url changes the favicon', function() {
19 var favicon = item.$.icon.style.backgroundImage;
20 item.set('item.url', 'http://www.mail.google.com');
21 assertNotEquals(favicon, item.$.icon.style.backgroundImage);
22 });
23
24 test('changing isFolder_ hides/unhides the folder/icon', function() {
25 item.isFolder_ = true;
26 assertFalse(item.$['folder-icon'].hidden);
27 assertTrue(item.$.icon.hidden);
28
29 item.isFolder_ = false;
30 assertTrue(item.$['folder-icon'].hidden);
31 assertFalse(item.$.icon.hidden);
32 });
33 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698