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

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

Issue 1641543002: MD History: Refactored design for displaying history information (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@second_patch
Patch Set: removed dodgy fix for end of history query: Created 4 years, 10 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 cr.define('md_history.history_item_test', function() {
6 var TEST_HISTORY_RESULTS = [
7 {"time": "1000000000"},
8 {"time": "10000000"},
9 {"time": "900000"},
10 {"time": "899999"}
11 ];
12
13 function registerTests() {
14 suite('history-item', function() {
15 var element;
16
17 suiteSetup(function() {
18 element = $('history-list');
19 });
20
21 test('basic separator insertion', function() {
22 element.addNewResults(TEST_HISTORY_RESULTS);
23
24 flush(function() {
25 // Check that the correct number of time gaps are inserted.
26 var spacers =
27 Polymer.dom(element.root).querySelectorAll('#time-gap-separator');
28 assertEquals(2, spacers.length);
29
30 var items = Polymer.dom(element.root)
31 .querySelectorAll('history-item');
32 assertTrue(items[0].hasTimeGap);
33 assertTrue(items[1].hasTimeGap);
34 assertFalse(items[2].hasTimeGap);
35 });
36 });
37
38 teardown(function() {
39 element.historyDataByDay_ = [];
40 });
41 });
42 }
43 return {
44 registerTests: registerTests
45 };
46 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698