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 /* | 5 /* |
6 * Waits for queued up tasks to finish before proceeding. Inspired by: | 6 * Waits for queued up tasks to finish before proceeding. Inspired by: |
7 * https://github.com/Polymer/web-component-tester/blob/master/browser/environme nt/helpers.js#L97 | 7 * https://github.com/Polymer/web-component-tester/blob/master/browser/environme nt/helpers.js#L97 |
8 */ | 8 */ |
9 function flush(callback) { | 9 function flush(callback) { |
10 Polymer.dom.flush(); | 10 Polymer.dom.flush(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 * @return {!HistoryEntry} An object representing a history entry. | 48 * @return {!HistoryEntry} An object representing a history entry. |
49 */ | 49 */ |
50 function createSearchEntry(timestamp, urlStr) { | 50 function createSearchEntry(timestamp, urlStr) { |
51 var entry = createHistoryEntry(timestamp, urlStr); | 51 var entry = createHistoryEntry(timestamp, urlStr); |
52 entry.dateShort = entry.dateRelativeDay; | 52 entry.dateShort = entry.dateRelativeDay; |
53 entry.dateTimeOfDay = ''; | 53 entry.dateTimeOfDay = ''; |
54 entry.dateRelativeDay = ''; | 54 entry.dateRelativeDay = ''; |
55 | 55 |
56 return entry; | 56 return entry; |
57 } | 57 } |
58 | |
59 /** | |
60 * Create a simple HistoryInfo. | |
61 * @param {?string} searchTerm The search term that the info has. Will be empty | |
62 * string if not specified. | |
63 * @return {!HistoryInfo} | |
64 */ | |
65 function createHistoryInfo(searchTerm) { | |
66 return { | |
67 finished: true, | |
tsergeant
2016/05/25 05:06:56
Nit: normal formatting is probably
return {
fin
calamity
2016/05/25 05:51:41
Done.
| |
68 hasSyncedResults: false, | |
69 queryEndTime: 'Monday', | |
70 queryStartTime: 'Tuesday', | |
71 term: searchTerm || '' | |
72 }; | |
73 } | |
OLD | NEW |