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

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

Issue 2862463002: [MD settings] split up site settings tests (Closed)
Patch Set: mocha grep Created 3 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/settings/cr_settings_browsertest.js
diff --git a/chrome/test/data/webui/settings/cr_settings_browsertest.js b/chrome/test/data/webui/settings/cr_settings_browsertest.js
index 07647ed2d335cb4b3c443ba65eec4bff9f411a29..81f228105c64a9a76b9acfa547428cbf95ffd6b6 100644
--- a/chrome/test/data/webui/settings/cr_settings_browsertest.js
+++ b/chrome/test/data/webui/settings/cr_settings_browsertest.js
@@ -23,7 +23,7 @@ CrSettingsBrowserTest.prototype = {
/** @override */
get browsePreload() {
- throw 'this is abstract and should be overriden by subclasses';
+ throw 'this is abstract and should be overridden by subclasses';
},
/** @override */
@@ -777,13 +777,12 @@ TEST_F('CrSettingsPrivacyPageTest', 'PrivacyPage', function() {
});
/**
- * Test fixture for chrome/browser/resources/settings/site_settings/.
* @constructor
* @extends {CrSettingsBrowserTest}
*/
-function CrSettingsSiteSettingsTest() {}
+function CrSettingsSiteDataDetailsTest() {}
-CrSettingsSiteSettingsTest.prototype = {
+CrSettingsSiteDataDetailsTest.prototype = {
__proto__: CrSettingsBrowserTest.prototype,
/** @override */
@@ -796,29 +795,199 @@ CrSettingsSiteSettingsTest.prototype = {
/** @override */
extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
- // TODO(dbeam): split these up.
+ 'test_browser_proxy.js',
+ 'test_site_settings_prefs_browser_proxy.js',
+ 'site_data_details_subpage_tests.js',
+ ]),
+};
+
+TEST_F('CrSettingsSiteDataDetailsTest', 'SiteSettings', function() {
+ mocha.run();
+});
+
+/**
+ * @constructor
+ * @extends {CrSettingsBrowserTest}
+ */
+function CrSettingsCategoryDefaultSettingTest() {}
+
+CrSettingsCategoryDefaultSettingTest.prototype = {
+ __proto__: CrSettingsBrowserTest.prototype,
+
+ /** @override */
+ browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html',
+
+ /** @override */
+ extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
+ 'test_browser_proxy.js',
+ 'test_site_settings_prefs_browser_proxy.js',
'category_default_setting_tests.js',
+ ]),
+};
+
+TEST_F(
+ 'CrSettingsCategoryDefaultSettingTest', 'CategoryDefaultSetting',
Dan Beam 2017/05/04 22:57:42 what's the point of the second name here? it just
dschuyler 2017/05/04 23:45:41 Moved to https://codereview.chromium.org/286202300
+ function() {
+ mocha.run();
+ });
+
+/**
+ * @constructor
+ * @extends {CrSettingsBrowserTest}
+ */
+function CrSettingsCategorySettingExceptionsTest() {}
+
+CrSettingsCategorySettingExceptionsTest.prototype = {
+ __proto__: CrSettingsBrowserTest.prototype,
+
+ /** @override */
+ browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html',
+
+ /** @override */
+ extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
+ 'test_browser_proxy.js',
+ 'test_site_settings_prefs_browser_proxy.js',
'category_setting_exceptions_tests.js',
+ ]),
+};
+
+TEST_F(
+ 'CrSettingsCategorySettingExceptionsTest', 'CategorySettingExceptions',
Dan Beam 2017/05/04 22:57:42 same
dschuyler 2017/05/04 23:45:41 Acknowledged.
+ function() {
+ mocha.run();
+ });
+
+/**
+ * @constructor
+ * @extends {CrSettingsBrowserTest}
+ */
+function CrSettingsSiteDetailsTest() {}
+
+CrSettingsSiteDetailsTest.prototype = {
+ __proto__: CrSettingsBrowserTest.prototype,
+
+ /** @override */
+ browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html',
+
+ /** @override */
+ extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
+ 'test_browser_proxy.js',
+ 'test_site_settings_prefs_browser_proxy.js',
'site_details_tests.js',
+ ]),
+};
+
+TEST_F('CrSettingsSiteDetailsTest', 'SiteDetails', function() {
+ mocha.run();
+});
+
+/**
+ * @constructor
+ * @extends {CrSettingsBrowserTest}
+ */
+function CrSettingsSiteDetailsPermissionTest() {}
+
+CrSettingsSiteDetailsPermissionTest.prototype = {
+ __proto__: CrSettingsBrowserTest.prototype,
+
+ /** @override */
+ browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html',
+
+ /** @override */
+ extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
+ 'test_browser_proxy.js',
+ 'test_site_settings_prefs_browser_proxy.js',
'site_details_permission_tests.js',
+ ]),
+};
+
+TEST_F(
+ 'CrSettingsSiteDetailsPermissionTest', 'SiteDetailsPermission', function() {
+ mocha.run();
+ });
+
+/**
+ * @constructor
+ * @extends {CrSettingsBrowserTest}
+ */
+function CrSettingsSiteListTest() {}
+
+CrSettingsSiteListTest.prototype = {
+ __proto__: CrSettingsBrowserTest.prototype,
+
+ /** @override */
+ browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html',
+
+ /** @override */
+ commandLineSwitches: [{
+ switchName: 'enable-site-settings',
+ }],
+
+ /** @override */
+ extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
+ 'test_browser_proxy.js',
+ 'test_site_settings_prefs_browser_proxy.js',
'site_list_tests.js',
+ ]),
+};
+
+TEST_F('CrSettingsSiteListTest', 'SiteList', function() {
+ mocha.grep('SiteList').run();
+});
+
+TEST_F('CrSettingsSiteListTest', 'EditExceptionDialog', function() {
+ mocha.grep('EditExceptionDialog').run();
+});
+
+TEST_F('CrSettingsSiteListTest', 'AddExceptionDialog', function() {
+ mocha.grep('AddExceptionDialog').run();
Dan Beam 2017/05/04 22:57:42 sweet
dschuyler 2017/05/04 23:45:41 Acknowledged.
+});
+
+/**
+ * @constructor
+ * @extends {CrSettingsBrowserTest}
+ */
+function CrSettingsZoomLevelsTest() {}
+
+CrSettingsZoomLevelsTest.prototype = {
+ __proto__: CrSettingsBrowserTest.prototype,
+
+ /** @override */
+ browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html',
+
+ /** @override */
+ extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
'test_browser_proxy.js',
'test_site_settings_prefs_browser_proxy.js',
'zoom_levels_tests.js',
- 'usb_devices_tests.js',
- 'site_data_details_subpage_tests.js',
]),
};
-TEST_F('CrSettingsSiteSettingsTest', 'SiteSettings', function() {
- category_default_setting.registerTests();
- category_setting_exceptions.registerTests();
- site_details.registerTests();
- site_details_permission.registerTests();
- site_list.registerTests();
- zoom_levels.registerTests();
- usb_devices.registerTests();
+TEST_F('CrSettingsZoomLevelsTest', 'ZoomLevels', function() {
+ mocha.run();
+});
+
+/**
+ * @constructor
+ * @extends {CrSettingsBrowserTest}
+ */
+function CrSettingsUsbDevicesTest() {}
+
+CrSettingsUsbDevicesTest.prototype = {
+ __proto__: CrSettingsBrowserTest.prototype,
+
+ /** @override */
+ browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html',
+
+ /** @override */
+ extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
+ 'test_browser_proxy.js',
+ 'test_site_settings_prefs_browser_proxy.js',
+ 'usb_devices_tests.js',
+ ]),
+};
+TEST_F('CrSettingsUsbDevicesTest', 'UsbDevices', function() {
mocha.run();
});

Powered by Google App Engine
This is Rietveld 408576698