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

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

Issue 2186073003: [MD History] Close delete items dialog when a new query is initiated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@open_tabs_new_window
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/md_history/list_container.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_list_test', function() { 5 cr.define('md_history.history_list_test', function() {
6 function registerTests() { 6 function registerTests() {
7 suite('history-list', function() { 7 suite('history-list', function() {
8 var app; 8 var app;
9 var element; 9 var element;
10 var toolbar; 10 var toolbar;
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 MockInteractions.tap(app.$.toolbar.$$('#delete-button')); 242 MockInteractions.tap(app.$.toolbar.$$('#delete-button'));
243 243
244 // Confirmation dialog should appear. 244 // Confirmation dialog should appear.
245 assertTrue(listContainer.$.dialog.opened); 245 assertTrue(listContainer.$.dialog.opened);
246 246
247 MockInteractions.tap(listContainer.$$('.action-button')); 247 MockInteractions.tap(listContainer.$$('.action-button'));
248 }); 248 });
249 }); 249 });
250 250
251 test('delete dialog closed on url change', function() {
252 app.queryState_.queryingDisabled = false;
253 var listContainer = app.$.history;
254 app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS);
255 app.historyResult(createHistoryInfo(), ADDITIONAL_RESULTS);
256 return flush().then(function() {
257 items = Polymer.dom(element.root).querySelectorAll('history-item');
258
259 MockInteractions.tap(items[2].$.checkbox);
260 MockInteractions.tap(app.$.toolbar.$$('#delete-button'));
261
262 // Confirmation dialog should appear.
263 assertTrue(listContainer.$.dialog.opened);
264
265 app.set('queryState_.searchTerm', 'something else');
266 assertFalse(listContainer.$.dialog.opened);
267 });
268 });
269
251 teardown(function() { 270 teardown(function() {
252 element.historyData_ = []; 271 element.historyData_ = [];
253 registerMessageCallback('removeVisits', this, undefined); 272 registerMessageCallback('removeVisits', this, undefined);
254 registerMessageCallback('queryHistory', this, undefined); 273 registerMessageCallback('queryHistory', this, function() {});
tsergeant 2016/07/28 07:20:45 Why is this necessary? Should we be doing this eve
calamity 2016/08/01 02:46:11 The added test fails with cannot read property 'ap
255 app.queryState_.queryingDisabled = true; 274 app.queryState_.queryingDisabled = true;
256 app.set('queryState_.searchTerm', ''); 275 app.set('queryState_.searchTerm', '');
257 return flush(); 276 return flush();
258 }); 277 });
259 }); 278 });
260 } 279 }
261 return { 280 return {
262 registerTests: registerTests 281 registerTests: registerTests
263 }; 282 };
264 }); 283 });
OLDNEW
« 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