| 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 1cf86362890a2406b1f47cd4565e5d0099f97ea5..69ffd9d0ad22186a2458a15f3d2bc7862868e65c 100644
|
| --- a/chrome/test/data/webui/settings/site_list_tests.js
|
| +++ b/chrome/test/data/webui/settings/site_list_tests.js
|
| @@ -59,6 +59,24 @@ cr.define('site_list', function() {
|
| };
|
|
|
| /**
|
| + * An example of prefs controlleBy policy.
|
| + * @type {SiteSettingsPref}
|
| + */
|
| + var prefsControlled = {
|
| + exceptions: {
|
| + plugins: [
|
| + {
|
| + category: 'plugins',
|
| + embeddingOrigin: 'http://foo-block.com',
|
| + origin: 'http://foo-block.com',
|
| + setting: 'block',
|
| + source: 'policy',
|
| + },
|
| + ]
|
| + }
|
| + };
|
| +
|
| + /**
|
| * An example pref with mixed schemes (present and absent).
|
| * @type {SiteSettingsPref}
|
| */
|
| @@ -594,6 +612,36 @@ cr.define('site_list', function() {
|
| });
|
| });
|
|
|
| + test('update lists for incognito', function() {
|
| + var contentType = settings.ContentSettingsTypes.PLUGINS;
|
| + var categorySubtype = settings.PermissionValues.BLOCK;
|
| + setUpCategory(contentType, categorySubtype, prefsControlled);
|
| + var siteList = testElement.$$('#listContainer');
|
| + return browserProxy.whenCalled('getExceptionList').then(
|
| + function(actualContentType) {
|
| + Polymer.dom.flush();
|
| + assertEquals(1, siteList.querySelectorAll('.list-item').length);
|
| + browserProxy.resetResolver('getExceptionList');
|
| + browserProxy.setIncognito(true);
|
| + return browserProxy.whenCalled('getExceptionList');
|
| + }).then(function() {
|
| + Polymer.dom.flush();
|
| + assertEquals(2, siteList.querySelectorAll('.list-item').length);
|
| + browserProxy.resetResolver('getExceptionList');
|
| + browserProxy.setIncognito(false);
|
| + return browserProxy.whenCalled('getExceptionList');
|
| + }).then(function() {
|
| + Polymer.dom.flush();
|
| + assertEquals(1, siteList.querySelectorAll('.list-item').length);
|
| + browserProxy.resetResolver('getExceptionList');
|
| + browserProxy.setIncognito(true);
|
| + return browserProxy.whenCalled('getExceptionList');
|
| + }).then(function() {
|
| + Polymer.dom.flush();
|
| + assertEquals(2, siteList.querySelectorAll('.list-item').length);
|
| + });
|
| + });
|
| +
|
| test('initial INCOGNITO BLOCK state is correct', function() {
|
| var contentType = settings.ContentSettingsTypes.COOKIES;
|
| var categorySubtype = settings.PermissionValues.BLOCK;
|
|
|