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

Unified Diff: chrome/test/data/webui/settings/site_list_tests.js

Issue 2768053004: [MD settings] change sites to private sites_
Patch Set: Created 3 years, 9 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
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_list.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/settings/site_list_tests.js
diff --git a/chrome/test/data/webui/settings/site_list_tests.js b/chrome/test/data/webui/settings/site_list_tests.js
index 1d5b108e2e2c19f9b8bdefc5e3d3049c819d5b15..b8264e78e8a846cf20a304e94e48c441908e7417 100644
--- a/chrome/test/data/webui/settings/site_list_tests.js
+++ b/chrome/test/data/webui/settings/site_list_tests.js
@@ -492,7 +492,7 @@ cr.define('site_list', function() {
assertEquals(
settings.ContentSettingsTypes.GEOLOCATION, contentType);
- assertEquals(0, testElement.sites.length);
+ assertEquals(0, testElement.sites_.length);
dpapad 2017/03/23 22:38:12 As I see it, making |sites| private, should be acc
assertEquals(
settings.PermissionValues.ALLOW, testElement.categorySubtype);
@@ -509,11 +509,11 @@ cr.define('site_list', function() {
assertEquals(
settings.ContentSettingsTypes.GEOLOCATION, contentType);
- assertEquals(2, testElement.sites.length);
+ assertEquals(2, testElement.sites_.length);
assertEquals(prefs.exceptions.geolocation[0].origin,
- testElement.sites[0].origin);
+ testElement.sites_[0].origin);
assertEquals(prefs.exceptions.geolocation[1].origin,
- testElement.sites[1].origin);
+ testElement.sites_[1].origin);
assertEquals(
settings.PermissionValues.ALLOW, testElement.categorySubtype);
Polymer.dom.flush(); // Populates action menu.
@@ -554,14 +554,14 @@ cr.define('site_list', function() {
assertEquals(
settings.ContentSettingsTypes.GEOLOCATION, contentType);
- assertEquals(3, testElement.sites.length);
+ assertEquals(3, testElement.sites_.length);
for(var i = 0; i < 3; i++) {
assertEquals(
prefsMixedProvider.exceptions.geolocation[0].origin,
- testElement.sites[0].origin);
+ testElement.sites_[0].origin);
assertEquals(
prefsMixedProvider.exceptions.geolocation[0].source,
- testElement.sites[0].source);
+ testElement.sites_[0].source);
}
});
});
@@ -575,13 +575,13 @@ cr.define('site_list', function() {
assertEquals(contentType, actualContentType);
assertEquals(categorySubtype, testElement.categorySubtype);
- assertEquals(2, testElement.sites.length);
+ assertEquals(2, testElement.sites_.length);
assertEquals(
prefs.exceptions.geolocation[2].origin,
- testElement.sites[0].origin);
+ testElement.sites_[0].origin);
assertEquals(
prefs.exceptions.geolocation[3].origin,
- testElement.sites[1].origin);
+ testElement.sites_[1].origin);
Polymer.dom.flush(); // Populates action menu.
openActionMenu(0);
assertMenu(['Allow', 'Edit', 'Remove'], testElement);
@@ -599,10 +599,10 @@ cr.define('site_list', function() {
assertEquals(contentType, actualContentType);
assertEquals(categorySubtype, testElement.categorySubtype);
- assertEquals(1, testElement.sites.length);
+ assertEquals(1, testElement.sites_.length);
assertEquals(
prefsSessionOnly.exceptions.cookies[2].origin,
- testElement.sites[0].origin);
+ testElement.sites_[0].origin);
Polymer.dom.flush(); // Populates action menu.
openActionMenu(0);
@@ -651,10 +651,10 @@ cr.define('site_list', function() {
assertEquals(contentType, actualContentType);
assertEquals(categorySubtype, testElement.categorySubtype);
- assertEquals(1, testElement.sites.length);
+ assertEquals(1, testElement.sites_.length);
assertEquals(
prefsIncognito.exceptions.cookies[0].origin,
- testElement.sites[0].origin);
+ testElement.sites_[0].origin);
Polymer.dom.flush(); // Populates action menu.
openActionMenu(0);
@@ -685,13 +685,13 @@ cr.define('site_list', function() {
assertEquals(contentType, actualContentType);
assertEquals(categorySubtype, testElement.categorySubtype);
- assertEquals(2, testElement.sites.length);
+ assertEquals(2, testElement.sites_.length);
assertEquals(
prefsIncognito.exceptions.cookies[1].origin,
- testElement.sites[0].origin);
+ testElement.sites_[0].origin);
assertEquals(
prefsIncognito.exceptions.cookies[2].origin,
- testElement.sites[1].origin);
+ testElement.sites_[1].origin);
Polymer.dom.flush(); // Populates action menu.
openActionMenu(0);
@@ -748,13 +748,13 @@ cr.define('site_list', function() {
Polymer.dom.flush();
// Validate that the sites gets populated from pre-canned prefs.
- assertEquals(2, testElement.sites.length);
+ assertEquals(2, testElement.sites_.length);
assertEquals(
prefs.exceptions.geolocation[0].origin,
- testElement.sites[0].origin);
+ testElement.sites_[0].origin);
assertEquals(
prefs.exceptions.geolocation[1].origin,
- testElement.sites[1].origin);
+ testElement.sites_[1].origin);
assertFalse(!!testElement.selectedOrigin);
// Validate that the sites are shown in UI and can be selected.
@@ -882,15 +882,15 @@ cr.define('site_list', function() {
assertFalse(testElement.$.category.hidden);
// Validate that the sites gets populated from pre-canned prefs.
- assertEquals(3, testElement.sites.length,
+ assertEquals(3, testElement.sites_.length,
'If this fails with 5 instead of the expected 3, then ' +
'the de-duping of sites is not working for site_list');
assertEquals(prefsVarious.exceptions.geolocation[1].origin,
- testElement.sites[0].origin);
+ testElement.sites_[0].origin);
assertEquals(prefsVarious.exceptions.geolocation[0].origin,
- testElement.sites[1].origin);
+ testElement.sites_[1].origin);
assertEquals(prefsVarious.exceptions.notifications[0].origin,
- testElement.sites[2].origin);
+ testElement.sites_[2].origin);
assertEquals(undefined, testElement.selectedOrigin);
// Validate that the sites are shown in UI and can be selected.
@@ -928,15 +928,15 @@ cr.define('site_list', function() {
// TODO(dschuyler): de-duping of sites is under discussion, so
// it is currently disabled. It should be enabled again or this
// code should be removed.
- assertEquals(2, testElement.sites.length,
+ assertEquals(2, testElement.sites_.length,
'If this fails with 1 instead of the expected 2, then ' +
'the de-duping of sites has been enabled for site_list.');
- if (testElement.sites.length == 1) {
+ if (testElement.sites_.length == 1) {
assertEquals(
prefsMixedOriginAndPattern.exceptions.
geolocation[0].
origin,
- testElement.sites[0].displayName);
+ testElement.sites_[0].displayName);
}
assertEquals(undefined, testElement.selectedOrigin);
@@ -945,12 +945,12 @@ cr.define('site_list', function() {
var clickable = firstItem.querySelector('.middle');
assertNotEquals(undefined, clickable);
MockInteractions.tap(clickable);
- if (testElement.sites.length == 1) {
+ if (testElement.sites_.length == 1) {
assertEquals(
prefsMixedOriginAndPattern.exceptions.
geolocation[0].
origin,
- testElement.sites[0].displayName);
+ testElement.sites_[0].displayName);
}
});
});
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_list.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698