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

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

Issue 2494943003: [MD settings] show full origin in content settings exceptions (Closed)
Patch Set: unit test fix Created 4 years, 1 month 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_settings_behavior.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 46c1b0d80414d459a4bebb6dbe766e8ba2c972ae..03f0d4893e7ffddc9592a1df8e5583bffb88a40f 100644
--- a/chrome/test/data/webui/settings/site_list_tests.js
+++ b/chrome/test/data/webui/settings/site_list_tests.js
@@ -721,12 +721,19 @@ cr.define('site_list', function() {
assertFalse(testElement.$.category.hidden);
// Validate that the sites gets populated from pre-canned prefs.
- assertEquals(1, testElement.sites.length,
- 'If this fails with 2 instead of the expected 1, then ' +
- 'the de-duping of sites is not working for site_list');
- assertEquals(
- prefsMixedOriginAndPattern.exceptions.geolocation[0].origin,
- testElement.sites[0].originForDisplay);
+ // 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,
+ '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) {
+ assertEquals(
+ prefsMixedOriginAndPattern.exceptions.
+ geolocation[0].
+ origin,
+ testElement.sites[0].originForDisplay);
+ }
assertEquals(undefined, testElement.selectedOrigin);
// Validate that the sites are shown in UI and can be selected.
@@ -734,9 +741,13 @@ cr.define('site_list', function() {
var clickable = firstItem.querySelector('.middle');
assertNotEquals(undefined, clickable);
MockInteractions.tap(clickable);
- assertEquals(
- prefsMixedOriginAndPattern.exceptions.geolocation[0].origin,
- testElement.selectedSite.originForDisplay);
+ if (testElement.sites.length == 1) {
+ assertEquals(
+ prefsMixedOriginAndPattern.exceptions.
+ geolocation[0].
+ origin,
+ testElement.selectedSite.originForDisplay);
+ }
});
});
});
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_settings_behavior.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698