Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TEST_WEBDRIVER_AUTOMATION_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_AUTOMATION_H_ |
| 6 #define CHROME_TEST_WEBDRIVER_AUTOMATION_H_ | 6 #define CHROME_TEST_WEBDRIVER_AUTOMATION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 void Terminate(); | 46 void Terminate(); |
| 47 | 47 |
| 48 // Executes the given |script| in the specified frame of the current | 48 // Executes the given |script| in the specified frame of the current |
| 49 // tab. |result| will be set to the JSON result. Returns true on success. | 49 // tab. |result| will be set to the JSON result. Returns true on success. |
| 50 void ExecuteScript(int tab_id, | 50 void ExecuteScript(int tab_id, |
| 51 const std::string& frame_xpath, | 51 const std::string& frame_xpath, |
| 52 const std::string& script, | 52 const std::string& script, |
| 53 std::string* result, | 53 std::string* result, |
| 54 bool* success); | 54 bool* success); |
| 55 | 55 |
| 56 // Sends a key event to the current browser. Waits until the key has | 56 // Sends a webkit key event to the current browser. Waits until the key has |
| 57 // been processed by the web page. | 57 // been processed by the web page. |
| 58 void SendWebKeyEvent(int tab_id, const WebKeyEvent& key_event, bool* success); | 58 void SendWebKeyEvent(int tab_id, |
| 59 const WebKeyEvent& key_event, | |
| 60 bool* success); | |
| 61 | |
| 62 // Sends an OS level key event to the current browser. Waits until the key | |
|
kkania
2011/03/11 16:32:13
Your func doesn't wait until the key has been proc
| |
| 63 // has been processed by the web page. | |
| 64 void SendNativeKeyEvent(int tab_id, | |
| 65 ui::KeyboardCode keycode, | |
|
kkania
2011/03/11 16:32:13
key_code
timothe
2011/03/21 18:02:05
Done.
| |
| 66 int modifiers, | |
| 67 bool* success); | |
| 59 | 68 |
| 60 void NavigateToURL(int tab_id, const std::string& url, bool* success); | 69 void NavigateToURL(int tab_id, const std::string& url, bool* success); |
| 61 void GoForward(int tab_id, bool* success); | 70 void GoForward(int tab_id, bool* success); |
| 62 void GoBack(int tab_id, bool* success); | 71 void GoBack(int tab_id, bool* success); |
| 63 void Reload(int tab_id, bool* success); | 72 void Reload(int tab_id, bool* success); |
| 64 void GetURL(int tab_id, std::string* url, bool* success); | 73 void GetURL(int tab_id, std::string* url, bool* success); |
| 65 void GetGURL(int tab_id, GURL* gurl, bool* success); | 74 void GetGURL(int tab_id, GURL* gurl, bool* success); |
| 66 void GetTabTitle(int tab_id, std::string* tab_title, bool* success); | 75 void GetTabTitle(int tab_id, std::string* tab_title, bool* success); |
| 67 void GetCookies( | 76 void GetCookies( |
| 68 int tab_id, const GURL& gurl, std::string* cookies, bool* success); | 77 int tab_id, const GURL& gurl, std::string* cookies, bool* success); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 scoped_ptr<ProxyLauncher> launcher_; | 113 scoped_ptr<ProxyLauncher> launcher_; |
| 105 | 114 |
| 106 DISALLOW_COPY_AND_ASSIGN(Automation); | 115 DISALLOW_COPY_AND_ASSIGN(Automation); |
| 107 }; | 116 }; |
| 108 | 117 |
| 109 } // namespace webdriver | 118 } // namespace webdriver |
| 110 | 119 |
| 111 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Automation); | 120 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Automation); |
| 112 | 121 |
| 113 #endif // CHROME_TEST_WEBDRIVER_AUTOMATION_H_ | 122 #endif // CHROME_TEST_WEBDRIVER_AUTOMATION_H_ |
| OLD | NEW |