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

Unified Diff: chrome/test/data/webui/md_history/history_list_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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webui/md_history/history_list_test.js
diff --git a/chrome/test/data/webui/md_history/history_list_test.js b/chrome/test/data/webui/md_history/history_list_test.js
index 05b3cbffbe733c7f9f3c360818c4189486dce612..c5e25761e2338f29885b11cc5450bfc38388df83 100644
--- a/chrome/test/data/webui/md_history/history_list_test.js
+++ b/chrome/test/data/webui/md_history/history_list_test.js
@@ -40,19 +40,19 @@ cr.define('md_history.history_list_test', function() {
// Make sure that the array of data that determines whether or not an
// item is selected is what we expect after selecting the two items.
- assertFalse(element.historyData[0].selected);
- assertFalse(element.historyData[1].selected);
- assertTrue(element.historyData[2].selected);
- assertTrue(element.historyData[3].selected);
+ assertFalse(element.historyData_[0].selected);
+ assertFalse(element.historyData_[1].selected);
+ assertTrue(element.historyData_[2].selected);
+ assertTrue(element.historyData_[3].selected);
toolbar.onClearSelectionTap_();
// Make sure that clearing the selection updates both the array and
// the actual history-items affected.
- assertFalse(element.historyData[0].selected);
- assertFalse(element.historyData[1].selected);
- assertFalse(element.historyData[2].selected);
- assertFalse(element.historyData[3].selected);
+ assertFalse(element.historyData_[0].selected);
+ assertFalse(element.historyData_[1].selected);
+ assertFalse(element.historyData_[2].selected);
+ assertFalse(element.historyData_[3].selected);
assertFalse(items[2].$.checkbox.checked);
assertFalse(items[3].$.checkbox.checked);
@@ -104,12 +104,12 @@ cr.define('md_history.history_list_test', function() {
// Ensure that the correct identifying data is being used for removal.
registerMessageCallback('removeVisits', this, function (toBeRemoved) {
- assertEquals(toBeRemoved[0].url, element.historyData[0].url);
- assertEquals(toBeRemoved[1].url, element.historyData[1].url);
+ assertEquals(toBeRemoved[0].url, element.historyData_[0].url);
+ assertEquals(toBeRemoved[1].url, element.historyData_[1].url);
assertEquals(toBeRemoved[0].timestamps,
- element.historyData[0].allTimestamps);
+ element.historyData_[0].allTimestamps);
assertEquals(toBeRemoved[1].timestamps,
- element.historyData[1].allTimestamps);
+ element.historyData_[1].allTimestamps);
done();
});
@@ -131,11 +131,11 @@ cr.define('md_history.history_list_test', function() {
items = Polymer.dom(element.root).querySelectorAll('history-item');
// Selects the checkboxes.
- element.set('historyData.2.selected', true);
+ element.set('historyData_.2.selected', true);
items[2].onCheckboxSelected_();
- element.set('historyData.5.selected', true);
+ element.set('historyData_.5.selected', true);
items[5].onCheckboxSelected_();
- element.set('historyData.7.selected', true);
+ element.set('historyData_.7.selected', true);
items[7].onCheckboxSelected_();
element.removeDeletedHistory(3);
@@ -143,12 +143,12 @@ cr.define('md_history.history_list_test', function() {
flush(function() {
items = Polymer.dom(element.root).querySelectorAll('history-item');
- assertEquals(element.historyData.length, 5);
- assertEquals(element.historyData[0].dateRelativeDay,
+ assertEquals(element.historyData_.length, 5);
+ assertEquals(element.historyData_[0].dateRelativeDay,
'2016-03-15');
- assertEquals(element.historyData[2].dateRelativeDay,
+ assertEquals(element.historyData_[2].dateRelativeDay,
'2016-03-13');
- assertEquals(element.historyData[4].dateRelativeDay,
+ assertEquals(element.historyData_[4].dateRelativeDay,
'2016-03-11');
// Checks that the first and last items have been reset correctly.
@@ -201,7 +201,7 @@ cr.define('md_history.history_list_test', function() {
});
teardown(function() {
- element.historyData = [];
+ element.historyData_ = [];
element.searchedTerm = '';
registerMessageCallback('removeVisits', this, undefined);
});

Powered by Google App Engine
This is Rietveld 408576698