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

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: 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.set('historyData.3.selected', true); 69 element.set('historyData_.3.selected', true);
70 items[3].onCheckboxSelected_(); 70 items[3].onCheckboxSelected_();
71 71
72 element.removeDeletedHistory(1); 72 element.removeDeletedHistory(1);
73 assertEquals(element.historyData.length, 5); 73 assertEquals(element.historyData_.length, 5);
74 74
75 // Checks that a new time gap separator has been inserted. 75 // Checks that a new time gap separator has been inserted.
76 assertTrue(items[2].hasTimeGap); 76 assertTrue(items[2].hasTimeGap);
77 77
78 element.set('historyData.3.selected', true); 78 element.set('historyData_.3.selected', true);
79 items[3].onCheckboxSelected_(); 79 items[3].onCheckboxSelected_();
80 element.removeDeletedHistory(1); 80 element.removeDeletedHistory(1);
81 81
82 // Checks time gap separator is removed. 82 // Checks time gap separator is removed.
83 assertFalse(items[2].hasTimeGap); 83 assertFalse(items[2].hasTimeGap);
84 done(); 84 done();
85 }); 85 });
86 }); 86 });
87 87
88 teardown(function() { 88 teardown(function() {
89 element.historyData = []; 89 element.historyData_ = [];
90 element.searchedTerm = ''; 90 element.searchedTerm = '';
91 }); 91 });
92 }); 92 });
93 } 93 }
94 return { 94 return {
95 registerTests: registerTests 95 registerTests: registerTests
96 }; 96 };
97 }); 97 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698