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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 10916328: Convert themes.py to browser test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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/browser/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 50bef18bddfce965da92c969e777a0fbbba1e8f2..0ed1fe44133b313403880d044b5c995ededdac32 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -87,8 +87,6 @@
#include "chrome/browser/sessions/session_tab_helper.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
-#include "chrome/browser/themes/theme_service.h"
-#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h"
#include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h"
#include "chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.h"
@@ -1948,13 +1946,6 @@ void TestingAutomationProvider::BuildJSONHandlerMaps() {
browser_handler_map_["GetSavedPasswords"] =
&TestingAutomationProvider::GetSavedPasswords;
- handler_map_["ResetToDefaultTheme"] =
- &TestingAutomationProvider::ResetToDefaultTheme;
-
- // SetTheme() implemented using InstallExtension().
- browser_handler_map_["GetThemeInfo"] =
- &TestingAutomationProvider::GetThemeInfo;
-
browser_handler_map_["FindInPage"] = &TestingAutomationProvider::FindInPage;
browser_handler_map_["GetAllNotifications"] =
@@ -3693,23 +3684,6 @@ void TestingAutomationProvider::IsFindInPageVisible(
reply.SendSuccess(&dict);
}
-// Sample json input: { "command": "GetThemeInfo" }
-// Refer GetThemeInfo() in chrome/test/pyautolib/pyauto.py for sample output.
-void TestingAutomationProvider::GetThemeInfo(
- Browser* browser,
- DictionaryValue* args,
- IPC::Message* reply_message) {
- scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
- const Extension* theme = ThemeServiceFactory::GetThemeForProfile(profile());
- if (theme) {
- return_value->SetString("name", theme->name());
- return_value->Set("images", theme->GetThemeImages()->DeepCopy());
- return_value->Set("colors", theme->GetThemeColors()->DeepCopy());
- return_value->Set("tints", theme->GetThemeTints()->DeepCopy());
- }
- AutomationJSONReply(this, reply_message).SendSuccess(return_value.get());
-}
-
void TestingAutomationProvider::InstallExtension(
DictionaryValue* args, IPC::Message* reply_message) {
FilePath::StringType path_string;
@@ -6285,20 +6259,6 @@ void TestingAutomationProvider::ActivateTabJSON(
reply.SendSuccess(NULL);
}
-void TestingAutomationProvider::ResetToDefaultTheme(
- base::DictionaryValue* args,
- IPC::Message* reply_message) {
- AutomationJSONReply reply(this, reply_message);
- Browser* browser;
- std::string error_msg;
- if (!GetBrowserFromJSONArgs(args, &browser, &error_msg)) {
- reply.SendError(error_msg);
- return;
- }
- ThemeServiceFactory::GetForProfile(browser->profile())->UseDefaultTheme();
- reply.SendSuccess(NULL);
-}
-
void TestingAutomationProvider::IsPageActionVisible(
base::DictionaryValue* args,
IPC::Message* reply_message) {
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.h ('k') | chrome/browser/extensions/extension_install_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698