diff options
Diffstat (limited to 'chrome/browser/automation/testing_automation_provider.h')
-rw-r--r-- | chrome/browser/automation/testing_automation_provider.h | 60 |
1 files changed, 58 insertions, 2 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h index 838a079..8cd999d 100644 --- a/chrome/browser/automation/testing_automation_provider.h +++ b/chrome/browser/automation/testing_automation_provider.h @@ -7,9 +7,11 @@ #pragma once #include "base/basictypes.h" +#include "base/scoped_ptr.h" #include "chrome/browser/automation/automation_provider.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/history/history.h" +#include "chrome/browser/sync/profile_sync_service_harness.h" #include "chrome/common/notification_registrar.h" class DictionaryValue; @@ -612,6 +614,36 @@ class TestingAutomationProvider : public AutomationProvider, DictionaryValue* args, IPC::Message* reply_message); + // Signs in to sync using the given username and password. + // Uses the JSON interface for input/output. + void SignInToSync(Browser* browser, + DictionaryValue* args, + IPC::Message* reply_message); + + // Returns info about sync. + // Uses the JSON interface for input/output. + void GetSyncInfo(Browser* browser, + DictionaryValue* args, + IPC::Message* reply_message); + + // Waits for the ongoing sync cycle to complete. + // Uses the JSON interface for input/output. + void AwaitSyncCycleCompletion(Browser* browser, + DictionaryValue* args, + IPC::Message* reply_message); + + // Enables sync for one or more sync datatypes. + // Uses the JSON interface for input/output. + void EnableSyncForDatatypes(Browser* browser, + DictionaryValue* args, + IPC::Message* reply_message); + + // Disables sync for one or more sync datatypes. + // Uses the JSON interface for input/output. + void DisableSyncForDatatypes(Browser* browser, + DictionaryValue* args, + IPC::Message* reply_message); + // Translate DictionaryValues of autofill profiles and credit cards to the // data structure used in the browser. // Args: @@ -626,9 +658,9 @@ class TestingAutomationProvider : public AutomationProvider, // for profiles and credit cards to a ListValue of DictionaryValues. The // caller owns the returned object. static ListValue* GetListFromAutoFillProfiles( - std::vector<AutoFillProfile*> autofill_profiles); + const std::vector<AutoFillProfile*>& autofill_profiles); static ListValue* GetListFromCreditCards( - std::vector<CreditCard*> credit_cards); + const std::vector<CreditCard*>& credit_cards); // Return the map from the internal data representation to the string value // of auto fill fields and credit card fields. @@ -637,6 +669,24 @@ class TestingAutomationProvider : public AutomationProvider, static std::map<AutoFillFieldType, std::wstring> GetCreditCardFieldToStringMap(); + // Get a list of active HTML5 notifications. + // Uses the JSON interface for input/output. + void GetActiveNotifications(Browser* browser, + DictionaryValue* args, + IPC::Message* reply_message); + + // Close an active HTML5 notification. + // Uses the JSON interface for input/output. + void CloseNotification(Browser* browser, + DictionaryValue* args, + IPC::Message* reply_message); + + // Waits for the number of active HTML5 notifications to reach a given count. + // Uses the JSON interface for input/output. + void WaitForNotificationCount(Browser* browser, + DictionaryValue* args, + IPC::Message* reply_message); + void WaitForTabCountToBecome(int browser_handle, int target_tab_count, IPC::Message* reply_message); @@ -656,6 +706,9 @@ class TestingAutomationProvider : public AutomationProvider, ContentSetting setting, bool* success); + // Load all plug-ins on the page. + void LoadBlockedPlugins(int tab_handle, bool* success); + // Resets to the default theme. void ResetToDefaultTheme(); @@ -681,6 +734,9 @@ class TestingAutomationProvider : public AutomationProvider, PopupMenuWaiter* popup_menu_waiter_; #endif // defined(TOOLKIT_VIEWS) + // Used to wait on various browser sync events. + scoped_ptr<ProfileSyncServiceHarness> sync_waiter_; + // Handle for an in-process redirect query. We expect only one redirect query // at a time (we should have only one caller, and it will block while waiting // for the results) so there is only one handle. When non-0, indicates a |