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

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

Issue 2246033002: [MD History] Fix the 'Remove from history' button. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shift_select
Patch Set: rebase 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
« no previous file with comments | « chrome/browser/resources/md_history/list_container.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_list_test.js
diff --git a/chrome/test/data/webui/md_history/history_list_test.js b/chrome/test/data/webui/md_history/history_list_test.js
index 3561ad4435a1087a33660d9ab79c4e4793bae48f..766a9a29fd01b27f9bfd6d8105ef32ffa4f78c45 100644
--- a/chrome/test/data/webui/md_history/history_list_test.js
+++ b/chrome/test/data/webui/md_history/history_list_test.js
@@ -161,18 +161,21 @@ cr.define('md_history.history_list_test', function() {
test('more from this site sends and sets correct data', function(done) {
app.queryState_.queryingDisabled = false;
- registerMessageCallback('queryHistory', this, function (info) {
- assertEquals('example.com', info[0]);
- flush().then(function() {
- assertEquals(
- 'example.com',
- toolbar.$['main-toolbar'].getSearchField().getValue());
- done();
+ flush().then(function () {
+ registerMessageCallback('queryHistory', this, function (info) {
+ assertEquals('www.google.com', info[0]);
+ flush().then(function() {
+ assertEquals(
+ 'www.google.com',
+ toolbar.$['main-toolbar'].getSearchField().getValue());
+ done();
+ });
});
- });
- app.$['history'].$.sharedMenu.itemData = {domain: 'example.com'};
- MockInteractions.tap(app.$['history'].$.menuMoreButton);
+ items = polymerSelectAll(element, 'history-item');
+ MockInteractions.tap(items[0].$['menu-button']);
+ MockInteractions.tap(app.$['history'].$.menuMoreButton);
+ });
});
test('scrolling history list closes overflow menu', function() {
@@ -263,6 +266,31 @@ cr.define('md_history.history_list_test', function() {
});
});
+ test('delete via menu button', function(done) {
+ var listContainer = app.$.history;
+ app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS);
+
+ flush().then(function() {
+ items = polymerSelectAll(element, 'history-item');
+ registerMessageCallback('removeVisits', this, function() {
+ flush().then(function() {
+ deleteComplete();
+ return flush();
+ }).then(function() {
+ assertDeepEquals([
+ 'https://www.google.com',
+ 'https://www.google.com',
+ 'https://en.wikipedia.org',
+ ], element.historyData_.map(item => item.title));
+ done();
+ });
+ });
+ MockInteractions.tap(items[1].$['menu-button']);
+ MockInteractions.tap(app.$['history'].$.menuRemoveButton);
+ });
+ });
+
+
test('deleting items using shortcuts', function(done) {
var listContainer = app.$.history;
app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS);
« no previous file with comments | « chrome/browser/resources/md_history/list_container.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698