 Chromium Code Reviews
 Chromium Code Reviews 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
    
  
    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| 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 e1274db5547051c02fd5735c9891345cdc9501ec..f6c913babf426384bae2a4d68f7edf8b6bc45fb5 100644 | 
| --- a/chrome/test/data/webui/md_history/history_list_test.js | 
| +++ b/chrome/test/data/webui/md_history/history_list_test.js | 
| @@ -248,10 +248,29 @@ cr.define('md_history.history_list_test', function() { | 
| }); | 
| }); | 
| + test('delete dialog closed on url change', function() { | 
| + app.queryState_.queryingDisabled = false; | 
| + var listContainer = app.$.history; | 
| + app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); | 
| + app.historyResult(createHistoryInfo(), ADDITIONAL_RESULTS); | 
| + return flush().then(function() { | 
| + items = Polymer.dom(element.root).querySelectorAll('history-item'); | 
| + | 
| + MockInteractions.tap(items[2].$.checkbox); | 
| + MockInteractions.tap(app.$.toolbar.$$('#delete-button')); | 
| + | 
| + // Confirmation dialog should appear. | 
| + assertTrue(listContainer.$.dialog.opened); | 
| + | 
| + app.set('queryState_.searchTerm', 'something else'); | 
| + assertFalse(listContainer.$.dialog.opened); | 
| + }); | 
| + }); | 
| + | 
| teardown(function() { | 
| element.historyData_ = []; | 
| registerMessageCallback('removeVisits', this, undefined); | 
| - registerMessageCallback('queryHistory', this, undefined); | 
| + 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
 | 
| app.queryState_.queryingDisabled = true; | 
| app.set('queryState_.searchTerm', ''); | 
| return flush(); |