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 f6c913babf426384bae2a4d68f7edf8b6bc45fb5..e83a9dd27d1dc13b72b2dcc5f3243eb4d1397fae 100644 |
--- a/chrome/test/data/webui/md_history/history_list_test.js |
+++ b/chrome/test/data/webui/md_history/history_list_test.js |
@@ -267,10 +267,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) { |
Dan Beam
2016/08/02 06:02:43
registerMessageCallback() is a bummer. didn't kno
calamity
2016/08/08 05:06:43
Any alternatives?
Dan Beam
2016/08/08 21:27:59
don't call chrome.send() directly from your code.
|
+ 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, function() {}); |
Dan Beam
2016/08/02 06:02:43
why is this necessary?
calamity
2016/08/08 05:06:43
undefined would work here too. We need to tear dow
|
app.queryState_.queryingDisabled = true; |
app.set('queryState_.searchTerm', ''); |
return flush(); |