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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.h

Issue 10692067: Convert PyAuto's NavigateToURL, GetActiveTabIndex, Refresh, RefreshActiveTab, and AppendTab to the … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Nirnimesh's comments. Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.cc ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698