OLD | NEW |
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 element; | 8 var element; |
9 var toolbar; | 9 var toolbar; |
10 var TEST_HISTORY_RESULTS; | 10 var TEST_HISTORY_RESULTS; |
11 | 11 |
12 suiteSetup(function() { | 12 suiteSetup(function() { |
13 element = $('history-list'); | 13 element = $('history-app').$['history-list']; |
14 toolbar = $('toolbar'); | 14 toolbar = $('history-app').$['toolbar']; |
15 TEST_HISTORY_RESULTS = | 15 TEST_HISTORY_RESULTS = |
16 [createHistoryEntry('2016-03-15', 'https://google.com')]; | 16 [createHistoryEntry('2016-03-15', 'https://google.com')]; |
17 }); | 17 }); |
18 | 18 |
19 test('selecting checkbox causes toolbar to change', function(done) { | 19 test('selecting checkbox causes toolbar to change', function(done) { |
20 element.addNewResults(TEST_HISTORY_RESULTS, ''); | 20 element.addNewResults(TEST_HISTORY_RESULTS, ''); |
21 | 21 |
22 flush(function() { | 22 flush(function() { |
23 var item = element.$$('history-item'); | 23 var item = element.$$('history-item'); |
24 MockInteractions.tap(item.$.checkbox); | 24 MockInteractions.tap(item.$.checkbox); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 element.historyData = []; | 69 element.historyData = []; |
70 registerMessageCallback('queryHistory', this, undefined); | 70 registerMessageCallback('queryHistory', this, undefined); |
71 toolbar.count = 0; | 71 toolbar.count = 0; |
72 }); | 72 }); |
73 }); | 73 }); |
74 } | 74 } |
75 return { | 75 return { |
76 registerTests: registerTests | 76 registerTests: registerTests |
77 }; | 77 }; |
78 }); | 78 }); |
OLD | NEW |