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

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

Issue 1993613002: [MD History] Implement grouped history UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@privatize
Patch Set: address comments Created 4 years, 7 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/md_history_browsertest.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 /* 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
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,
68 hasSyncedResults: false,
69 queryEndTime: 'Monday',
70 queryStartTime: 'Tuesday',
71 term: searchTerm || ''
72 };
73 }
OLDNEW
« no previous file with comments | « chrome/test/data/webui/md_history/md_history_browsertest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698