Commit 14cb217e authored by Sean Harrison's avatar Sean Harrison Committed by Commit Bot

Friendly Privacy Settings Initial Redesign: Reland 2 the Relandening

Changes between reland 1 and reland 2:

1.) Added lazy load ensure load to relevant privacy subpage tests.

> Changes between original submission and reland:

> 1.) Privacy-page subpages are now in lazy_load.html
> 2.) Fixed bug that erroneously showed "privacy" in the settings menu of "Guest" mode settings.
> 3.) Fixed bug where going to chrome://settings/clearBrowsingData didn't work unless the advanced section was expanded when the flag for this change was disabled.
> 4.) Reordered a few settings rows to match the most current mocks.

>> Revert "Friendly Privacy Setting Initial Redesign"

>> This reverts commit 544412a4.

>> Reason for revert: Performance and functional regressions
>> https://bugs.chromium.org/p/chromium/issues/detail?id=1024034#c5

>>> Original change's description:
>>> Friendly Privacy Setting Initial Redesign

> >>> This CL does 3 things:
> >>> 1) The order of rows in the privacy page is affected, regardless of the value of the "privacySettingsRedesignEnabled" flag.
> >>> 2) The privacy-page is moved to the "basic", only when the "privacySettingsRedesignEnabled" flag is on.
> >>> 3) A "more" expansion button is introduced in the privacy-page only when the "privacySettingsRedesignEnabled" flag.

>>> Bug: 1014143
>>> Change-Id: I678e81aa3b67acd2ae41eeda355cd3b32a5b4088
>>> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1872094
>>> Commit-Queue: Sean Harrison <harrisonsean@chromium.org>
>>> Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
>>> Cr-Commit-Position: refs/heads/master@{#714287}

Change-Id: I127cdd31a404f4c7df0d75650e762536fcefd053
Bug: 1031520
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1950954
Commit-Queue: Sean Harrison <harrisonsean@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722657}
parent 20ec40c4
......@@ -2994,6 +2994,9 @@
<message name="IDS_SETTINGS_PRIVACY" desc="Name of the settings page which allows users to modify privacy and security settings.">
Privacy and security
</message>
<message name="IDS_SETTINGS_PRIVACY_MORE" desc="Label on the expansion button to show more privacy settings.">
More
</message>
<message name="IDS_SETTINGS_LINKDOCTOR_PREF" desc="The documentation string of the 'Use Link Doctor' preference to help with navigation errors.">
Show suggestions for similar pages when a page can't be found
</message>
......
......@@ -5,6 +5,7 @@
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="../appearance_page/appearance_page.html">
<link rel="import" href="../privacy_page/privacy_page.html">
<link rel="import" href="../autofill_page/autofill_page.html">
<link rel="import" href="../change_password_page/change_password_page.html">
<link rel="import" href="../controls/settings_idle_load.html">
......@@ -175,6 +176,15 @@
</settings-autofill-page>
</settings-section>
</template>
<template is="dom-if" if="[[showPrivacyPageAndRedesign_(
pageVisibility.privacy, 'BASIC')]]" restamp>
<settings-section page-title="$i18n{privacyPageTitle}"
section="privacy">
<settings-privacy-page prefs="{{prefs}}"
page-visibility="[[pageVisibility.privacy]]">
</settings-privacy-page>
</settings-section>
</template>
<template is="dom-if" if="[[showPage_(pageVisibility.appearance)]]"
restamp>
<settings-section page-title="$i18n{appearancePageTitle}"
......@@ -274,8 +284,8 @@
</settings-section>
</template>
</if>
<template is="dom-if" if="[[showPage_(pageVisibility.privacy)]]"
restamp>
<template is="dom-if" if="[[showPrivacyPageAndRedesign_(
pageVisibility.privacy, 'ADVANCED')]]" restamp>
<settings-section page-title="$i18n{privacyPageTitle}"
section="privacy">
<settings-privacy-page prefs="{{prefs}}"
......
......@@ -202,6 +202,20 @@ Polymer({
return visibility !== false;
},
/**
* @param {boolean|undefined} visibility
* @param {string} location
* @return {boolean}
* @private
*/
showPrivacyPageAndRedesign_: function(visibility, location) {
if (!this.showPage_(visibility)) {
return false;
}
return (location == 'BASIC') ==
loadTimeData.getBoolean('privacySettingsRedesignEnabled');
},
/**
* Queues a task to search the basic sections, then another for the advanced
* sections.
......
......@@ -7,18 +7,34 @@
<link rel="import" href="autofill_page/passwords_section.html">
<link rel="import" href="autofill_page/payments_section.html">
<link rel="import" href="search_engines_page/search_engines_page.html">
<link rel="import" href="privacy_page/security_keys_subpage.html">
<link rel="import" href="site_settings/site_data_details_subpage.html">
<link rel="import" href="site_settings_page/site_settings_page.html">
<!-- <link rel="import" href="site_settings/all_sites.html"> -->
<link rel="import" href="site_settings/category_default_setting.html">
<link rel="import" href="site_settings/category_setting_exceptions.html">
<link rel="import" href="site_settings/chooser_exception_list.html">
<link rel="import" href="site_settings/media_picker.html">
<link rel="import" href="site_settings/pdf_documents.html">
<link rel="import" href="site_settings/protocol_handlers.html">
<link rel="import" href="site_settings/site_data.html">
<link rel="import" href="site_settings/site_details.html">
<link rel="import" href="site_settings/zoom_levels.html">
<if expr="not chromeos">
<link rel="import" href="people_page/manage_profile.html">
<link rel="import" href="people_page/sync_account_control.html">
</if>
<if expr="use_nss_certs">
<link rel="import" href="chrome://resources/cr_components/certificate_manager/certificate_manager.html">
</if>
<!-- Sections -->
<link rel="import" href="a11y_page/a11y_page.html">
<link rel="import" href="downloads_page/downloads_page.html">
<link rel="import" href="languages_page/languages_page.html">
<link rel="import" href="printing_page/printing_page.html">
<link rel="import" href="privacy_page/privacy_page.html">
<link rel="import" href="reset_page/reset_page.html">
<if expr="chromeos">
......
......@@ -112,6 +112,7 @@ cr.define('settings', function() {
pageVisibility = {
autofill: false,
people: false,
privacy: false,
onStartup: false,
reset: false,
appearance: false,
......
......@@ -85,14 +85,6 @@ Polymer({
value: false,
},
/** @private */
privacySettingsRedesignEnabled_: {
type: Boolean,
value: function() {
return loadTimeData.getBoolean('privacySettingsRedesignEnabled');
},
},
/**
* Used for HTML bindings. This is defined as a property rather than within
* the ready callback, because the value needs to be available before
......@@ -112,6 +104,25 @@ Polymer({
}
},
/** @private */
privacySettingsRedesignEnabled_: {
type: Boolean,
value: function() {
return loadTimeData.getBoolean('privacySettingsRedesignEnabled');
},
},
/**
* Whether the more settings list is opened.
* @private
*/
moreOpened_: {
type: Boolean,
value: function() {
return !loadTimeData.getBoolean('privacySettingsRedesignEnabled');
},
},
/** @private */
enableBlockAutoplayContentSetting_: {
type: Boolean,
......@@ -481,5 +492,21 @@ Polymer({
e.stopPropagation();
settings.LifetimeBrowserProxyImpl.getInstance().restart();
},
/**
* @return {string}
* @private
*/
getIronCollapseCssClass_: function() {
return this.privacySettingsRedesignEnabled_ ? 'iron-collapse-indented' : '';
},
/**
* @return {string}
* @private
*/
getTopBarCssClass_: function() {
return this.privacySettingsRedesignEnabled_ ? 'settings-box first' : '';
},
});
})();
......@@ -255,6 +255,75 @@ cr.define('settings', function() {
return r;
}
/**
* Add all of the child routes that originate from the privacy route,
* regardless of whether the privacy section under basic or advanced.
* @param {!SettingsRoutes} r
*/
function addPrivacyChildRoutes(r) {
r.CERTIFICATES = r.PRIVACY.createChild('/certificates');
r.SITE_SETTINGS = r.PRIVACY.createChild('/content');
if (loadTimeData.getBoolean('enableSecurityKeysSubpage')) {
r.SECURITY_KEYS = r.PRIVACY.createChild('/securityKeys');
}
r.SITE_SETTINGS_ALL = r.SITE_SETTINGS.createChild('all');
r.SITE_SETTINGS_SITE_DETAILS =
r.SITE_SETTINGS_ALL.createChild('/content/siteDetails');
r.SITE_SETTINGS_HANDLERS = r.SITE_SETTINGS.createChild('/handlers');
// TODO(tommycli): Find a way to refactor these repetitive category
// routes.
r.SITE_SETTINGS_ADS = r.SITE_SETTINGS.createChild('ads');
r.SITE_SETTINGS_AUTOMATIC_DOWNLOADS =
r.SITE_SETTINGS.createChild('automaticDownloads');
r.SITE_SETTINGS_BACKGROUND_SYNC =
r.SITE_SETTINGS.createChild('backgroundSync');
r.SITE_SETTINGS_CAMERA = r.SITE_SETTINGS.createChild('camera');
r.SITE_SETTINGS_CLIPBOARD = r.SITE_SETTINGS.createChild('clipboard');
r.SITE_SETTINGS_COOKIES = r.SITE_SETTINGS.createChild('cookies');
r.SITE_SETTINGS_SITE_DATA =
r.SITE_SETTINGS_COOKIES.createChild('/siteData');
r.SITE_SETTINGS_DATA_DETAILS =
r.SITE_SETTINGS_SITE_DATA.createChild('/cookies/detail');
r.SITE_SETTINGS_IMAGES = r.SITE_SETTINGS.createChild('images');
if (loadTimeData.getBoolean('enableInsecureContentContentSetting')) {
r.SITE_SETTINGS_MIXEDSCRIPT =
r.SITE_SETTINGS.createChild('insecureContent');
}
r.SITE_SETTINGS_JAVASCRIPT = r.SITE_SETTINGS.createChild('javascript');
r.SITE_SETTINGS_SOUND = r.SITE_SETTINGS.createChild('sound');
r.SITE_SETTINGS_SENSORS = r.SITE_SETTINGS.createChild('sensors');
r.SITE_SETTINGS_LOCATION = r.SITE_SETTINGS.createChild('location');
r.SITE_SETTINGS_MICROPHONE = r.SITE_SETTINGS.createChild('microphone');
r.SITE_SETTINGS_NOTIFICATIONS =
r.SITE_SETTINGS.createChild('notifications');
r.SITE_SETTINGS_FLASH = r.SITE_SETTINGS.createChild('flash');
r.SITE_SETTINGS_POPUPS = r.SITE_SETTINGS.createChild('popups');
r.SITE_SETTINGS_UNSANDBOXED_PLUGINS =
r.SITE_SETTINGS.createChild('unsandboxedPlugins');
r.SITE_SETTINGS_MIDI_DEVICES = r.SITE_SETTINGS.createChild('midiDevices');
r.SITE_SETTINGS_USB_DEVICES = r.SITE_SETTINGS.createChild('usbDevices');
r.SITE_SETTINGS_SERIAL_PORTS = r.SITE_SETTINGS.createChild('serialPorts');
r.SITE_SETTINGS_ZOOM_LEVELS = r.SITE_SETTINGS.createChild('zoomLevels');
r.SITE_SETTINGS_PDF_DOCUMENTS = r.SITE_SETTINGS.createChild('pdfDocuments');
r.SITE_SETTINGS_PROTECTED_CONTENT =
r.SITE_SETTINGS.createChild('protectedContent');
if (loadTimeData.getBoolean('enablePaymentHandlerContentSetting')) {
r.SITE_SETTINGS_PAYMENT_HANDLER =
r.SITE_SETTINGS.createChild('paymentHandler');
}
if (loadTimeData.getBoolean('enableExperimentalWebPlatformFeatures')) {
r.SITE_SETTINGS_BLUETOOTH_SCANNING =
r.SITE_SETTINGS.createChild('bluetoothScanning');
}
if (loadTimeData.getBoolean('enableNativeFileSystemWriteContentSetting')) {
r.SITE_SETTINGS_NATIVE_FILE_SYSTEM_WRITE =
r.SITE_SETTINGS.createChild('filesystem');
}
}
/**
* Adds Route objects for each path corresponding to browser-only content.
* @param {!SettingsRoutes} r Routes to include browser-only content.
......@@ -283,6 +352,16 @@ cr.define('settings', function() {
r.ADDRESSES = r.AUTOFILL.createChild('/addresses');
}
if (loadTimeData.getBoolean('privacySettingsRedesignEnabled')) {
r.CLEAR_BROWSER_DATA = r.BASIC.createChild('/clearBrowserData');
r.CLEAR_BROWSER_DATA.isNavigableDialog = true;
if (pageVisibility.privacy !== false) {
r.PRIVACY = r.BASIC.createSection('/privacy', 'privacy');
addPrivacyChildRoutes(r);
}
}
if (pageVisibility.defaultBrowser !== false) {
r.DEFAULT_BROWSER =
r.BASIC.createSection('/defaultBrowser', 'defaultBrowser');
......@@ -299,76 +378,16 @@ cr.define('settings', function() {
if (pageVisibility.advancedSettings !== false) {
r.ADVANCED = new Route('/advanced');
r.CLEAR_BROWSER_DATA = r.ADVANCED.createChild('/clearBrowserData');
r.CLEAR_BROWSER_DATA.isNavigableDialog = true;
if (!loadTimeData.getBoolean('privacySettingsRedesignEnabled')) {
r.CLEAR_BROWSER_DATA = r.ADVANCED.createChild('/clearBrowserData');
r.CLEAR_BROWSER_DATA.isNavigableDialog = true;
if (pageVisibility.privacy !== false) {
r.PRIVACY = r.ADVANCED.createSection('/privacy', 'privacy');
r.CERTIFICATES = r.PRIVACY.createChild('/certificates');
r.SITE_SETTINGS = r.PRIVACY.createChild('/content');
if (loadTimeData.getBoolean('enableSecurityKeysSubpage')) {
r.SECURITY_KEYS = r.PRIVACY.createChild('/securityKeys');
if (pageVisibility.privacy !== false) {
r.PRIVACY = r.ADVANCED.createSection('/privacy', 'privacy');
addPrivacyChildRoutes(r);
}
}
r.SITE_SETTINGS_ALL = r.SITE_SETTINGS.createChild('all');
r.SITE_SETTINGS_SITE_DETAILS =
r.SITE_SETTINGS_ALL.createChild('/content/siteDetails');
r.SITE_SETTINGS_HANDLERS = r.SITE_SETTINGS.createChild('/handlers');
// TODO(tommycli): Find a way to refactor these repetitive category
// routes.
r.SITE_SETTINGS_ADS = r.SITE_SETTINGS.createChild('ads');
r.SITE_SETTINGS_AUTOMATIC_DOWNLOADS =
r.SITE_SETTINGS.createChild('automaticDownloads');
r.SITE_SETTINGS_BACKGROUND_SYNC =
r.SITE_SETTINGS.createChild('backgroundSync');
r.SITE_SETTINGS_CAMERA = r.SITE_SETTINGS.createChild('camera');
r.SITE_SETTINGS_CLIPBOARD = r.SITE_SETTINGS.createChild('clipboard');
r.SITE_SETTINGS_COOKIES = r.SITE_SETTINGS.createChild('cookies');
r.SITE_SETTINGS_SITE_DATA =
r.SITE_SETTINGS_COOKIES.createChild('/siteData');
r.SITE_SETTINGS_DATA_DETAILS =
r.SITE_SETTINGS_SITE_DATA.createChild('/cookies/detail');
r.SITE_SETTINGS_IMAGES = r.SITE_SETTINGS.createChild('images');
if (loadTimeData.getBoolean('enableInsecureContentContentSetting')) {
r.SITE_SETTINGS_MIXEDSCRIPT =
r.SITE_SETTINGS.createChild('insecureContent');
}
r.SITE_SETTINGS_JAVASCRIPT = r.SITE_SETTINGS.createChild('javascript');
r.SITE_SETTINGS_SOUND = r.SITE_SETTINGS.createChild('sound');
r.SITE_SETTINGS_SENSORS = r.SITE_SETTINGS.createChild('sensors');
r.SITE_SETTINGS_LOCATION = r.SITE_SETTINGS.createChild('location');
r.SITE_SETTINGS_MICROPHONE = r.SITE_SETTINGS.createChild('microphone');
r.SITE_SETTINGS_NOTIFICATIONS =
r.SITE_SETTINGS.createChild('notifications');
r.SITE_SETTINGS_FLASH = r.SITE_SETTINGS.createChild('flash');
r.SITE_SETTINGS_POPUPS = r.SITE_SETTINGS.createChild('popups');
r.SITE_SETTINGS_UNSANDBOXED_PLUGINS =
r.SITE_SETTINGS.createChild('unsandboxedPlugins');
r.SITE_SETTINGS_MIDI_DEVICES = r.SITE_SETTINGS.createChild('midiDevices');
r.SITE_SETTINGS_USB_DEVICES = r.SITE_SETTINGS.createChild('usbDevices');
r.SITE_SETTINGS_SERIAL_PORTS = r.SITE_SETTINGS.createChild('serialPorts');
r.SITE_SETTINGS_ZOOM_LEVELS = r.SITE_SETTINGS.createChild('zoomLevels');
r.SITE_SETTINGS_PDF_DOCUMENTS =
r.SITE_SETTINGS.createChild('pdfDocuments');
r.SITE_SETTINGS_PROTECTED_CONTENT =
r.SITE_SETTINGS.createChild('protectedContent');
if (loadTimeData.getBoolean('enablePaymentHandlerContentSetting')) {
r.SITE_SETTINGS_PAYMENT_HANDLER =
r.SITE_SETTINGS.createChild('paymentHandler');
}
if (loadTimeData.getBoolean('enableExperimentalWebPlatformFeatures')) {
r.SITE_SETTINGS_BLUETOOTH_SCANNING =
r.SITE_SETTINGS.createChild('bluetoothScanning');
}
if (loadTimeData.getBoolean(
'enableNativeFileSystemWriteContentSetting')) {
r.SITE_SETTINGS_NATIVE_FILE_SYSTEM_WRITE =
r.SITE_SETTINGS.createChild('filesystem');
}
r.LANGUAGES = r.ADVANCED.createSection('/languages', 'languages');
// <if expr="not is_macosx">
r.EDIT_DICTIONARY = r.LANGUAGES.createChild('/editDictionary');
......
......@@ -136,6 +136,11 @@
<iron-icon icon="settings:assignment"></iron-icon>
$i18n{autofillPageTitle}
</a>
<a href="/privacy" hidden="[[shouldHidePrivacy_(
privacySettingsRedesignEnabled_, pageVisibility.privacy)]]">
<iron-icon icon="cr:security"></iron-icon>
$i18n{privacyPageTitle}
</a>
<a id="appearance" href="/appearance"
hidden="[[!pageVisibility.appearance]]">
<iron-icon icon="settings:palette"></iron-icon>
......@@ -194,7 +199,7 @@
$i18n{dateTimePageTitle}
</a>
</if>
<a href="/privacy">
<a href="/privacy" hidden="[[privacySettingsRedesignEnabled_]]">
<iron-icon icon="cr:security"></iron-icon>
$i18n{privacyPageTitle}
</a>
......
......@@ -18,6 +18,14 @@ Polymer({
notify: true,
},
/** @private */
privacySettingsRedesignEnabled_: {
type: Boolean,
value: function() {
return loadTimeData.getBoolean('privacySettingsRedesignEnabled');
},
},
/**
* Dictionary defining page visibility.
* @type {!PageVisibility}
......@@ -46,6 +54,17 @@ Polymer({
this.advancedOpened = !this.advancedOpened;
},
/**
* @return {boolean}
* @private
*/
shouldHidePrivacy_: function() {
const pageVisibility = settings.pageVisibility || {};
return !(
this.privacySettingsRedesignEnabled_ &&
(pageVisibility.privacy !== false));
},
/**
* Prevent clicks on sidebar items from navigating. These are only links for
* accessibility purposes, taps are handled separately by <iron-selector>.
......
......@@ -4,6 +4,7 @@
<link rel="import" href="chrome://resources/cr_elements/cr_search_field/cr_search_field.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/cr_elements/md_select_css.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html">
<link rel="import" href="../global_scroll_target_behavior.html">
......
......@@ -2534,6 +2534,7 @@ void AddPrivacyStrings(content::WebUIDataSource* html_source,
Profile* profile) {
static constexpr webui::LocalizedString kLocalizedStrings[] = {
{"privacyPageTitle", IDS_SETTINGS_PRIVACY},
{"privacyPageMore", IDS_SETTINGS_PRIVACY_MORE},
{"signinAllowedTitle", IDS_SETTINGS_SIGNIN_ALLOWED},
{"signinAllowedDescription", IDS_SETTINGS_SIGNIN_ALLOWED_DESC},
{"doNotTrack", IDS_SETTINGS_ENABLE_DO_NOT_TRACK},
......
......@@ -83,7 +83,6 @@ suite('AllSites', function() {
}),
])
]);
browserProxy = new TestSiteSettingsPrefsBrowserProxy();
localDataBrowserProxy = new TestLocalDataBrowserProxy();
settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy;
......@@ -582,4 +581,4 @@ suite('AllSites', function() {
assertEquals(testElement.filteredList_[0].origins[0].usage, 0);
assertEquals(testElement.filteredList_[0].origins[0].numCookies, 0);
});
});
});
\ No newline at end of file
......@@ -188,7 +188,8 @@ cr.define('certificate_manager', function() {
/** @type {!CaTrustInfo} */
const caTrustInfo = {ssl: true, email: false, objSign: false};
setup(function() {
setup(async function() {
await settings.forceLazyLoaded();
settings.navigateTo(settings.routes.CERTIFICATES);
browserProxy = new TestCertificatesBrowserProxy();
browserProxy.setCaCertificateTrust(caTrustInfo);
......
......@@ -1093,6 +1093,7 @@ CrSettingsCertificateManagerTest.prototype = {
extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
'../test_util.js',
'../test_browser_proxy.js',
'ensure_lazy_loaded.js',
'certificate_manager_test.js',
]),
};
......@@ -1250,7 +1251,8 @@ CrSettingsSiteDataDetailsTest.prototype = {
__proto__: CrSettingsBrowserTest.prototype,
/** @override */
browsePreload: 'chrome://settings/privacy_page/privacy_page.html',
browsePreload:
'chrome://settings/site_settings/site_data_details_subpage.html',
/** @override */
extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
......@@ -1327,7 +1329,7 @@ CrSettingsCategoryDefaultSettingTest.prototype = {
__proto__: CrSettingsBrowserTest.prototype,
/** @override */
browsePreload: 'chrome://settings/privacy_page/privacy_page.html',
browsePreload: 'chrome://settings/privacy_page/category_default_setting.html',
/** @override */
extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
......@@ -1352,13 +1354,15 @@ CrSettingsCategorySettingExceptionsTest.prototype = {
__proto__: CrSettingsBrowserTest.prototype,
/** @override */
browsePreload: 'chrome://settings/privacy_page/privacy_page.html',
browsePreload:
'chrome://settings/site_settings/category_setting_exceptions.html',
/** @override */
extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
'../test_browser_proxy.js',
'test_util.js',
'test_site_settings_prefs_browser_proxy.js',
'ensure_lazy_loaded.js',
'category_setting_exceptions_tests.js',
]),
};
......@@ -1377,7 +1381,7 @@ CrSettingsSiteEntryTest.prototype = {
__proto__: CrSettingsBrowserTest.prototype,
/** @override */
browsePreload: 'chrome://settings/privacy_page/privacy_page.html',
browsePreload: 'chrome://settings/site_settings/site_entry.html',
/** @override */
extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
......@@ -1435,6 +1439,7 @@ CrSettingsSiteDetailsTest.prototype = {
extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
'../test_browser_proxy.js',
'test_util.js',
'ensure_lazy_loaded.js',
'test_site_settings_prefs_browser_proxy.js',
'site_details_tests.js',
]),
......@@ -1462,7 +1467,7 @@ CrSettingsSiteDetailsPermissionTest.prototype = {
__proto__: CrSettingsBrowserTest.prototype,
/** @override */
browsePreload: 'chrome://settings/privacy_page/privacy_page.html',
browsePreload: 'chrome://settings/site_settings/site_details_permision.html',
/** @override */
extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
......@@ -1487,7 +1492,7 @@ CrSettingsSiteListTest.prototype = {
__proto__: CrSettingsBrowserTest.prototype,
/** @override */
browsePreload: 'chrome://settings/privacy_page/privacy_page.html',
browsePreload: 'chrome://settings/site_settings/site_lists.html',
/** @override */
extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
......@@ -1531,6 +1536,7 @@ CrSettingsSiteListEntryTest.prototype = {
'../test_browser_proxy.js',
'../test_util.js',
'test_util.js',
'ensure_lazy_loaded.js',
'test_site_settings_prefs_browser_proxy.js',
'site_list_entry_tests.js',
]),
......@@ -1558,6 +1564,7 @@ CrSettingsZoomLevelsTest.prototype = {
'../test_util.js',
'test_util.js',
'test_site_settings_prefs_browser_proxy.js',
'ensure_lazy_loaded.js',
'zoom_levels_tests.js',
]),
};
......@@ -1583,6 +1590,7 @@ CrSettingsProtocolHandlersTest.prototype = {
'../test_browser_proxy.js',
'test_util.js',
'test_site_settings_prefs_browser_proxy.js',
'ensure_lazy_loaded.js',
'protocol_handlers_tests.js',
]),
};
......
......@@ -64,7 +64,8 @@ suite('ProtocolHandlers', function() {
*/
let browserProxy = null;
setup(function() {
setup(async function() {
await settings.forceLazyLoaded();
browserProxy = new TestSiteSettingsPrefsBrowserProxy();
settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy;
});
......
......@@ -279,7 +279,7 @@ cr.define('settings_main_page', function() {
Polymer.dom.flush();
// Navigate to an "advanced" subpage.
settings.navigateTo(settings.routes.SITE_SETTINGS);
settings.navigateTo(settings.routes.LANGUAGES);
Polymer.dom.flush();
return assertAdvancedVisibilityAfterSearch('block');
});
......@@ -306,7 +306,7 @@ cr.define('settings_main_page', function() {
// TODO(michaelpg): Move these to a new test for settings-basic-page.
test('can collapse advanced on advanced section route', function() {
settings.navigateTo(settings.routes.PRIVACY);
settings.navigateTo(settings.routes.LANGUAGES);
Polymer.dom.flush();
const basicPage = settingsMain.$$('settings-basic-page');
......@@ -338,7 +338,7 @@ cr.define('settings_main_page', function() {
});
test('navigating to a basic page does not collapse advanced', function() {
settings.navigateTo(settings.routes.PRIVACY);
settings.navigateTo(settings.routes.LANGUAGES);
Polymer.dom.flush();
assertToggleContainerVisible(true);
......
......@@ -39,7 +39,8 @@ suite('ZoomLevels', function() {
},
];
setup(function() {
setup(async function() {
await settings.forceLazyLoaded();
browserProxy = new TestSiteSettingsPrefsBrowserProxy();
settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy;
return initPage();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment