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

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

Issue 2141433003: MD History: Shift focus to overflow menu icon while removing bookmark (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor change Created 4 years, 5 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
« no previous file with comments | « chrome/browser/resources/md_history/history_item.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8714c511600e4e2bbbb7e8e3af7c7e1f728df8bb..94744a0d609bee67d0b00d58f0cfc8ffeb68196e 100644
--- a/chrome/test/data/webui/md_history/history_item_test.js
+++ b/chrome/test/data/webui/md_history/history_item_test.js
@@ -79,14 +79,25 @@ cr.define('md_history.history_item_test', function() {
test('remove bookmarks', function() {
element.addNewResults(TEST_HISTORY_RESULTS);
return flush().then(function() {
- element.historyData_[1].starred = true;
- element.historyData_[5].starred = true;
+ element.set('historyData_.1.starred', true);
+ element.set('historyData_.5.starred', true);
items = Polymer.dom(element.root).querySelectorAll('history-item');
- 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');
});
});
« no previous file with comments | « chrome/browser/resources/md_history/history_item.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698