Commit acd1f6fc authored by rbpotter's avatar rbpotter Committed by Commit Bot

Settings: Move CBD dialog tests to a separate file

Move the tests for the clear browsing data dialog to a separate file,
since this element and its children live in
c/b/r/settings/clear_browsing_data_dialog, not in the privacy_page
folder.

Also adding an import for a dependency that wasn't imported correctly
before.

Bug: 1026426
Change-Id: Icaaba7ac9c361f25f6c6fbcecc45132cc81f2c9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2085695
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: default avatardpapad <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746894}
parent 9b309f29
......@@ -13,6 +13,7 @@
<link rel="import" href="installed_app_checkbox.html">
<link rel="import" href="../controls/settings_checkbox.html">
<link rel="import" href="../controls/settings_dropdown_menu.html">
<link rel="import" href="../people_page/sync_browser_proxy.html">
<link rel="import" href="../icons.html">
<link rel="import" href="../route.html">
<link rel="import" href="../router.html">
......
......@@ -77,6 +77,14 @@ window.runMochaTest = function(suiteName, testName) {
mocha.grep(new RegExp('^' + suiteName + ' ' + escapedTestName + '$')).run();
};
/**
* Helper function provided to make running a single Mocha suite more robust.
* @param {string} suiteName
*/
window.runMochaSuite = function(suiteName) {
mocha.grep(new RegExp('^' + suiteName + ' ')).run();
};
// Configure mocha.
mocha.setup({
// Use TDD interface instead of BDD.
......
This diff is collapsed.
......@@ -933,11 +933,6 @@ CrSettingsPrivacyPageTest.prototype = {
]),
};
TEST_F('CrSettingsPrivacyPageTest', 'ClearBrowsingDataTests', function() {
settings_privacy_page.registerClearBrowsingDataTests();
mocha.run();
});
TEST_F('CrSettingsPrivacyPageTest', 'PrivacyPageTests', function() {
settings_privacy_page.registerPrivacyPageTests();
mocha.run();
......@@ -955,11 +950,6 @@ TEST_F('CrSettingsPrivacyPageTest', 'UMALoggingTests', function() {
mocha.run();
});
TEST_F('CrSettingsPrivacyPageTest', 'InstalledAppsTests', () => {
settings_privacy_page.registerInstalledAppsTests();
mocha.run();
});
GEN('#if defined(OS_MACOSX) || defined(OS_WIN)');
// TODO(crbug.com/1043665): disabling due to failures on several builders.
TEST_F(
......@@ -970,11 +960,46 @@ TEST_F(
});
GEN('#endif');
/**
* Test fixture for
* chrome/browser/resources/settings/clear_browsing_data_dialog/
* clear_browsing_data_dialog.html.
* @constructor
* @extends {CrSettingsBrowserTest}
*/
function CrSettingsClearBrowsingDataTest() {}
CrSettingsClearBrowsingDataTest.prototype = {
__proto__: CrSettingsBrowserTest.prototype,
/** @override */
browsePreload: 'chrome://settings/clear_browsing_data_dialog/' +
'clear_browsing_data_dialog.html',
/** @override */
extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
'//ui/webui/resources/js/promise_resolver.js',
'../test_util.js',
'../test_browser_proxy.js',
'clear_browsing_data_test.js',
'test_sync_browser_proxy.js',
]),
};
TEST_F(
'CrSettingsClearBrowsingDataTest', 'ClearBrowsingDataAllPlatforms',
function() {
runMochaSuite('ClearBrowsingDataAllPlatforms');
});
TEST_F('CrSettingsClearBrowsingDataTest', 'InstalledApps', () => {
runMochaSuite('InstalledApps');
});
GEN('#if !defined(OS_CHROMEOS)');
TEST_F(
'CrSettingsPrivacyPageTest', 'ClearBrowsingDataTestsDesktop', function() {
settings_privacy_page.registerClearBrowsingDataTestsDesktop();
mocha.run();
'CrSettingsClearBrowsingDataTest', 'ClearBrowsingDataDesktop', function() {
runMochaSuite('ClearBrowsingDataDesktop');
});
GEN('#endif');
......
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