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

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

Issue 1972073002: [MD History] Make history-list:historyData private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_loading
Patch Set: oopz 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
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 cr.define('md_history.history_item_test', function() { 5 cr.define('md_history.history_item_test', function() {
6 function registerTests() { 6 function registerTests() {
7 suite('history-item', function() { 7 suite('history-item', function() {
8 var element; 8 var element;
9 var TEST_HISTORY_RESULTS; 9 var TEST_HISTORY_RESULTS;
10 var SEARCH_HISTORY_RESULTS; 10 var SEARCH_HISTORY_RESULTS;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 done(); 59 done();
60 }); 60 });
61 }); 61 });
62 62
63 test('separator insertion after deletion', function(done) { 63 test('separator insertion after deletion', function(done) {
64 element.addNewResults(TEST_HISTORY_RESULTS); 64 element.addNewResults(TEST_HISTORY_RESULTS);
65 flush(function() { 65 flush(function() {
66 var items = 66 var items =
67 Polymer.dom(element.root).querySelectorAll('history-item'); 67 Polymer.dom(element.root).querySelectorAll('history-item');
68 68
69 element.removeDeletedHistory_([element.historyData[3]]); 69 element.removeDeletedHistory_([element.historyData_[3]]);
70 assertEquals(5, element.historyData.length); 70 assertEquals(5, element.historyData_.length);
71 71
72 // Checks that a new time gap separator has been inserted. 72 // Checks that a new time gap separator has been inserted.
73 assertTrue(items[2].hasTimeGap); 73 assertTrue(items[2].hasTimeGap);
74 74
75 element.removeDeletedHistory_([element.historyData[3]]); 75 element.removeDeletedHistory_([element.historyData_[3]]);
76 76
77 // Checks time gap separator is removed. 77 // Checks time gap separator is removed.
78 assertFalse(items[2].hasTimeGap); 78 assertFalse(items[2].hasTimeGap);
79 done(); 79 done();
80 }); 80 });
81 }); 81 });
82 82
83 teardown(function() { 83 teardown(function() {
84 element.historyData = []; 84 element.historyData_ = [];
85 element.searchedTerm = ''; 85 element.searchedTerm = '';
86 }); 86 });
87 }); 87 });
88 } 88 }
89 return { 89 return {
90 registerTests: registerTests 90 registerTests: registerTests
91 }; 91 };
92 }); 92 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/history_list.js ('k') | chrome/test/data/webui/md_history/history_list_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698