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

Side by Side Diff: chrome/test/data/webui/md_history/history_toolbar_test.js

Issue 2053553002: MD History: Deselect items when clicking 'More from this site' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deselect when results come in 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 unified diff | Download patch
« no previous file with comments | « chrome/test/data/webui/md_history/history_list_test.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('md_history.history_toolbar_test', function() { 5 cr.define('md_history.history_toolbar_test', function() {
6 function registerTests() { 6 function registerTests() {
7 suite('history-toolbar', function() { 7 suite('history-toolbar', function() {
8 var app; 8 var app;
9 var element; 9 var element;
10 var toolbar; 10 var toolbar;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 test('search term gathered correctly from toolbar', function(done) { 45 test('search term gathered correctly from toolbar', function(done) {
46 app.queryingDisabled_ = false; 46 app.queryingDisabled_ = false;
47 registerMessageCallback('queryHistory', this, function (info) { 47 registerMessageCallback('queryHistory', this, function (info) {
48 assertEquals(info[0], 'Test'); 48 assertEquals(info[0], 'Test');
49 done(); 49 done();
50 }); 50 });
51 51
52 toolbar.onSearch('Test'); 52 toolbar.onSearch('Test');
53 }); 53 });
54 54
55 test('more from this site sends and sets correct data', function(done) {
56 app.queryingDisabled_ = false;
57 registerMessageCallback('queryHistory', this, function (info) {
58 assertEquals('example.com', info[0]);
59 flush().then(function() {
60 assertEquals(
61 'example.com',
62 toolbar.$['main-toolbar'].getSearchField().getValue());
63 done();
64 });
65 });
66
67 element.$.sharedMenu.itemData = {domain: 'example.com'};
68 MockInteractions.tap(element.$.menuMoreButton);
69 });
70
71 teardown(function() { 55 teardown(function() {
72 element.historyData_ = []; 56 element.historyData_ = [];
73 element.searchedTerm = ''; 57 element.searchedTerm = '';
74 registerMessageCallback('queryHistory', this, undefined); 58 registerMessageCallback('queryHistory', this, undefined);
75 toolbar.count = 0; 59 toolbar.count = 0;
76 }); 60 });
77 }); 61 });
78 } 62 }
79 return { 63 return {
80 registerTests: registerTests 64 registerTests: registerTests
81 }; 65 };
82 }); 66 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/md_history/history_list_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698