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

Unified Diff: chrome/test/data/webui/md_history/history_item_test.js

Issue 2215613002: MD History: Improve dom-if usage in history-item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@history_improve_collapse_button
Patch Set: Fix tests Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webui/md_history/history_item_test.js
diff --git a/chrome/test/data/webui/md_history/history_item_test.js b/chrome/test/data/webui/md_history/history_item_test.js
index 94744a0d609bee67d0b00d58f0cfc8ffeb68196e..83ce632a523372c26b2d862034d4608f785003d4 100644
--- a/chrome/test/data/webui/md_history/history_item_test.js
+++ b/chrome/test/data/webui/md_history/history_item_test.js
@@ -81,23 +81,19 @@ cr.define('md_history.history_item_test', function() {
return flush().then(function() {
element.set('historyData_.1.starred', true);
element.set('historyData_.5.starred', true);
+ return flush();
+ }).then(function() {
items = Polymer.dom(element.root).querySelectorAll('history-item');
- items[1].$['bookmark-star'].focus();
- MockInteractions.tap(items[1].$['bookmark-star']);
+ items[1].$$('#bookmark-star').focus();
+ MockInteractions.tap(items[1].$$('#bookmark-star'));
// Check that focus is shifted to overflow menu icon.
assertEquals(items[1].root.activeElement, items[1].$['menu-button']);
// Check that all items matching this url are unstarred.
assertEquals(element.historyData_[1].starred, false);
assertEquals(element.historyData_[5].starred, false);
- assertEquals(
- window.getComputedStyle(items[1].$['bookmark-star']).visibility,
- 'hidden');
- assertEquals(
- window.getComputedStyle(items[5].$['bookmark-star']).visibility,
- 'hidden');
});
});

Powered by Google App Engine
This is Rietveld 408576698