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

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

Issue 12223125: Delete Instant pyauto tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.h ('k') | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fe99a4cf698436ce627f710e5dc5c52ccdc20f8b..adb1e94271ff0eb93cc4cc67753b233721057501 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -91,7 +91,6 @@
#include "chrome/browser/ui/bookmarks/bookmark_bar.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_finder.h"
-#include "chrome/browser/ui/browser_instant_controller.h"
#include "chrome/browser/ui/browser_iterator.h"
#include "chrome/browser/ui/browser_list_impl.h"
#include "chrome/browser/ui/browser_tabstrip.h"
@@ -1754,8 +1753,6 @@ void TestingAutomationProvider::BuildJSONHandlerMaps() {
#endif // !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS))
handler_map_["OverrideGeoposition"] =
&TestingAutomationProvider::OverrideGeoposition;
- handler_map_["AppendSwitchASCIIToCommandLine"] =
- &TestingAutomationProvider::AppendSwitchASCIIToCommandLine;
handler_map_["SimulateAsanMemoryBug"] =
&TestingAutomationProvider::SimulateAsanMemoryBug;
@@ -1871,9 +1868,6 @@ void TestingAutomationProvider::BuildJSONHandlerMaps() {
browser_handler_map_["OmniboxMovePopupSelection"] =
&TestingAutomationProvider::OmniboxMovePopupSelection;
- browser_handler_map_["GetInstantInfo"] =
- &TestingAutomationProvider::GetInstantInfo;
-
browser_handler_map_["LoadSearchEngineInfo"] =
&TestingAutomationProvider::LoadSearchEngineInfo;
browser_handler_map_["GetSearchEngineInfo"] =
@@ -3082,31 +3076,6 @@ void TestingAutomationProvider::OmniboxAcceptInput(
loc_bar->AcceptInput();
}
-// Sample json input: { "command": "GetInstantInfo" }
-void TestingAutomationProvider::GetInstantInfo(Browser* browser,
- DictionaryValue* args,
- IPC::Message* reply_message) {
- DictionaryValue* info = new DictionaryValue;
- if (chrome::BrowserInstantController::IsInstantEnabled(browser->profile()) &&
- browser->instant_controller()) {
- InstantController* instant = browser->instant_controller()->instant();
- info->SetBoolean("enabled", true);
- info->SetBoolean("active", (instant->GetPreviewContents() != NULL));
- info->SetBoolean("current", instant->IsPreviewingSearchResults());
- if (instant->GetPreviewContents()) {
- WebContents* contents = instant->GetPreviewContents();
- info->SetBoolean("loading", contents->IsLoading());
- info->SetString("location", contents->GetURL().spec());
- info->SetString("title", contents->GetTitle());
- }
- } else {
- info->SetBoolean("enabled", false);
- }
- scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
- return_value->Set("instant", info);
- AutomationJSONReply(this, reply_message).SendSuccess(return_value.get());
-}
-
// Sample json input: { "command": "GetInitialLoadTimes" }
// Refer to InitialLoadObserver::GetTimingInformation() for sample output.
void TestingAutomationProvider::GetInitialLoadTimes(
@@ -4154,24 +4123,6 @@ void TestingAutomationProvider::OverrideGeoposition(
base::Bind(&SendSuccessIfAlive, AsWeakPtr(), reply_message));
}
-// Sample json input:
-// { "command": "AppendSwitchASCIIToCommandLine",
-// "switch": "instant-field-trial",
-// "value": "disabled" }
-void TestingAutomationProvider::AppendSwitchASCIIToCommandLine(
- DictionaryValue* args, IPC::Message* reply_message) {
- AutomationJSONReply reply(this, reply_message);
- std::string switch_name, switch_value;
- if (!args->GetString("switch", &switch_name) ||
- !args->GetString("value", &switch_value)) {
- reply.SendError("Missing or invalid command line switch");
- return;
- }
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(switch_name,
- switch_value);
- reply.SendSuccess(NULL);
-}
-
// Refer to GetAllNotifications() in chrome/test/pyautolib/pyauto.py for
// sample json input/output.
void TestingAutomationProvider::GetAllNotifications(
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.h ('k') | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698