| Index: chrome/test/data/webui/md_history/history_toolbar_test.js
|
| diff --git a/chrome/test/data/webui/md_history/history_toolbar_test.js b/chrome/test/data/webui/md_history/history_toolbar_test.js
|
| index 0d79836e2b1e5128abed1420490443f6985fb479..cd2f89b172e71807ec38dfcf954c254272bc67ef 100644
|
| --- a/chrome/test/data/webui/md_history/history_toolbar_test.js
|
| +++ b/chrome/test/data/webui/md_history/history_toolbar_test.js
|
| @@ -3,23 +3,17 @@
|
| // found in the LICENSE file.
|
|
|
| cr.define('md_history.history_toolbar_test', function() {
|
| - // Array of test history data.
|
| - var TEST_HISTORY_RESULTS = [
|
| - {
|
| - "dateRelativeDay": "Today - Wednesday, December 9, 2015",
|
| - "title": "Google",
|
| - "url": "https://www.google.com"
|
| - }
|
| - ];
|
| -
|
| function registerTests() {
|
| suite('history-toolbar', function() {
|
| var element;
|
| var toolbar;
|
| + var TEST_HISTORY_RESULTS = [];
|
|
|
| suiteSetup(function() {
|
| element = $('history-card-manager');
|
| toolbar = $('toolbar');
|
| + TEST_HISTORY_RESULTS.push(createHistoryEntry(86400000,
|
| + "https://google.com"));
|
| });
|
|
|
| test('selecting checkbox causes toolbar to change', function(done) {
|
| @@ -68,7 +62,7 @@ cr.define('md_history.history_toolbar_test', function() {
|
| var index = heading.search('Found 1 search result for \'Google\'.');
|
|
|
| assertTrue(0 <= index);
|
| - assertEquals(title.innerHTML, '<b>Google</b>');
|
| + assertEquals(title.innerHTML, 'https://<b>google</b>.com');
|
| done();
|
| });
|
| });
|
| @@ -98,7 +92,21 @@ cr.define('md_history.history_toolbar_test', function() {
|
| })
|
| });
|
|
|
| + test('more from this site sends and sets correct data', function(done) {
|
| + registerMessageCallback('queryHistory', this, function (info) {
|
| + assertEquals(info[0], 'Test');
|
| + done();
|
| + });
|
| +
|
| + element.menuIdentifier = {};
|
| + element.menuIdentifier.domain = 'Test';
|
| + element.onMoreFromSiteTap_();
|
| + assertEquals(toolbar.$$('#search-input').$$('#search-input').value,
|
| + 'Test');
|
| + });
|
| +
|
| teardown(function() {
|
| + element.searchTerm = '';
|
| element.historyDataByDay_ = [];
|
| toolbar.count = 0;
|
| });
|
|
|