| Index: chrome/test/webdriver/automation.h
|
| diff --git a/chrome/test/webdriver/automation.h b/chrome/test/webdriver/automation.h
|
| index ac7d405d99a232d8fb278bd66959a7cd5d2344db..cc7b3d10573f4c999c963b4c99e7b5e676b79eff 100644
|
| --- a/chrome/test/webdriver/automation.h
|
| +++ b/chrome/test/webdriver/automation.h
|
| @@ -6,6 +6,7 @@
|
| #define CHROME_TEST_WEBDRIVER_AUTOMATION_H_
|
|
|
| #include <string>
|
| +#include <vector>
|
|
|
| #include "base/task.h"
|
| #include "base/ref_counted.h"
|
| @@ -14,6 +15,8 @@
|
| #include "chrome/test/ui/ui_test.h"
|
| #include "ui/base/keycodes/keyboard_codes.h"
|
|
|
| +class TabProxy;
|
| +
|
| namespace webdriver {
|
|
|
| struct WebKeyEvent {
|
| @@ -53,25 +56,28 @@ class Automation : private UITestBase {
|
|
|
| // Executes the given |script| in the specified frame of the current
|
| // tab. |result| will be set to the JSON result. Returns true on success.
|
| - void ExecuteScript(const std::string& frame_xpath,
|
| + void ExecuteScript(int tab_id,
|
| + const std::string& frame_xpath,
|
| const std::string& script,
|
| std::string* result,
|
| bool* success);
|
|
|
| // Sends a key event to the current browser. Waits until the key has
|
| // been processed by the web page.
|
| - void SendWebKeyEvent(const WebKeyEvent& key_event, bool* success);
|
| + void SendWebKeyEvent(int tab_id, const WebKeyEvent& key_event, bool* success);
|
|
|
| - void NavigateToURL(const std::string& url, bool* success);
|
| - void GoForward(bool* success);
|
| - void GoBack(bool* success);
|
| - void Reload(bool* success);
|
| - void GetURL(std::string* url, bool* success);
|
| - void GetTabTitle(std::string* tab_title, bool* success);
|
| + void NavigateToURL(int tab_id, const std::string& url, bool* success);
|
| + void GoForward(int tab_id, bool* success);
|
| + void GoBack(int tab_id, bool* success);
|
| + void Reload(int tab_id, bool* success);
|
| + void GetURL(int tab_id, std::string* url, bool* success);
|
| + void GetTabTitle(int tab_id, std::string* tab_title, bool* success);
|
| + void GetTabIds(std::vector<int>* tab_ids, bool* success);
|
| + void CloseTab(int tab_id, bool* success);
|
|
|
| private:
|
| - scoped_refptr<BrowserProxy> browser_;
|
| - scoped_refptr<TabProxy> tab_;
|
| + bool GetTab(int tab_id, TabProxy** tab, bool* success);
|
| + std::vector<scoped_refptr<TabProxy> > tabs_;
|
|
|
| ScopedTempDir profile_dir_;
|
|
|
|
|