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

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

Issue 2112803002: MD History: Trim long item titles to reduce effect on performance (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test Created 4 years, 6 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 77700e3cb3ca3809dded16d970ad1fa47a02b1df..9ab28b9d823af8bfa739b9f6f0c4f8a84b1c5e66 100644
--- a/chrome/test/data/webui/md_history/history_item_test.js
+++ b/chrome/test/data/webui/md_history/history_item_test.js
@@ -76,6 +76,16 @@ cr.define('md_history.history_item_test', function() {
});
});
+ test('long titles are trimmed', function() {
+ var item = document.createElement('history-item');
+ var longtitle = '0123456789'.repeat(100);
+ item.item =
+ createHistoryEntry('2016-06-30', 'http://example.com/' + longtitle);
+
+ var label = item.$$('history-searched-label');
+ assertEquals(TITLE_MAX_LENGTH, label.title.length);
+ });
+
teardown(function() {
element.historyData_ = [];
element.searchedTerm = '';
« 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