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

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

Issue 2184123003: Use event path to detect if anchor has been clicked in WebUIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@close_dialog_on_query
Patch Set: add <b> test 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 | « no previous file | chrome/test/data/webui/util_test.html » ('j') | 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 cbcaa78d30e90f1adbc131099197b0566ad8ecfd..6dd1804740300b72cf7b3a966f9a743f17e43142 100644
--- a/chrome/test/data/webui/md_history/history_list_test.js
+++ b/chrome/test/data/webui/md_history/history_list_test.js
@@ -306,10 +306,29 @@ cr.define('md_history.history_list_test', function() {
});
});
+ test('clicking file:// url sends message to chrome', function(done) {
+ var fileURL = 'file:///home/myfile';
+ app.historyResult(createHistoryInfo(), [
+ createHistoryEntry('2016-03-15', fileURL),
+ ]);
+ flush().then(function() {
+ var items =
+ Polymer.dom(element.root).querySelectorAll('history-item');
+
+ registerMessageCallback('navigateToUrl', this, function(info) {
+ assertEquals(fileURL, info[0]);
+ done();
+ });
+
+ MockInteractions.tap(items[0].$.title);
+ });
+ });
+
teardown(function() {
element.historyData_ = [];
registerMessageCallback('removeVisits', this, undefined);
registerMessageCallback('queryHistory', this, function() {});
+ registerMessageCallback('navigateToUrl', this, undefined);
app.queryState_.queryingDisabled = true;
app.set('queryState_.searchTerm', '');
return flush();
« no previous file with comments | « no previous file | chrome/test/data/webui/util_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698