OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 // Example: | 856 // Example: |
857 // input: { "windex": 1, | 857 // input: { "windex": 1, |
858 // "tab_index": 3, | 858 // "tab_index": 3, |
859 // "auto_id": { "type": 0, "id": "awoein" }, | 859 // "auto_id": { "type": 0, "id": "awoein" }, |
860 // "url": "http://www.google.com", | 860 // "url": "http://www.google.com", |
861 // "navigation_count": 1 // number of navigations to wait for | 861 // "navigation_count": 1 // number of navigations to wait for |
862 // } | 862 // } |
863 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS } | 863 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS } |
864 void NavigateToURL(base::DictionaryValue* args, IPC::Message* reply_message); | 864 void NavigateToURL(base::DictionaryValue* args, IPC::Message* reply_message); |
865 | 865 |
| 866 // Get the index of the currently active tab. Uses the JSON interface. |
| 867 // The integer |windex| must be given to specify the browser window. |
| 868 // Example: |
| 869 // input: { "windex": 1 } |
| 870 // output: { "tab_index": 3 } |
| 871 void GetActiveTabIndexJSON(DictionaryValue* args, |
| 872 IPC::Message* reply_message); |
| 873 |
| 874 // Append a new tab. Uses the JSON interface. |
| 875 // The integer |windex| must be given to specify the browser window. The tab |
| 876 // is opened to |url| and blocks until the page loads. |
| 877 // Example: |
| 878 // input: { "windex": 1, |
| 879 // "url": "http://google.com" |
| 880 // } |
| 881 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS } |
| 882 void AppendTabJSON(DictionaryValue* args, IPC::Message* reply_message); |
| 883 |
866 // Waits until any pending navigation completes in the specified tab. | 884 // Waits until any pending navigation completes in the specified tab. |
867 // The pair |windex| and |tab_index| or the single |auto_id| must be given | 885 // The pair |windex| and |tab_index| or the single |auto_id| must be given |
868 // to specify the tab. | 886 // to specify the tab. |
869 // Example: | 887 // Example: |
870 // input: { "windex": 1, | 888 // input: { "windex": 1, |
871 // "tab_index": 1, | 889 // "tab_index": 1, |
872 // "auto_id": { "type": 0, "id": "awoein" }, | 890 // "auto_id": { "type": 0, "id": "awoein" }, |
873 // } | 891 // } |
874 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS } | 892 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS } |
875 void WaitUntilNavigationCompletes( | 893 void WaitUntilNavigationCompletes( |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1583 ImportSettingsData import_settings_data_; | 1601 ImportSettingsData import_settings_data_; |
1584 | 1602 |
1585 // The automation event observer queue. It is lazily created when an observer | 1603 // The automation event observer queue. It is lazily created when an observer |
1586 // is added to avoid overhead when not needed. | 1604 // is added to avoid overhead when not needed. |
1587 scoped_ptr<AutomationEventQueue> automation_event_queue_; | 1605 scoped_ptr<AutomationEventQueue> automation_event_queue_; |
1588 | 1606 |
1589 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1607 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
1590 }; | 1608 }; |
1591 | 1609 |
1592 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1610 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
OLD | NEW |