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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/task.h" | 10 #include "base/task.h" |
| 11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
| 12 #include "base/scoped_temp_dir.h" | 12 #include "base/scoped_temp_dir.h" |
| 13 #include "chrome/test/automation/browser_proxy.h" | 13 #include "chrome/test/automation/browser_proxy.h" |
| 14 #include "chrome/test/automation/tab_proxy.h" | 14 #include "chrome/test/automation/tab_proxy.h" |
| 15 #include "chrome/test/ui/ui_test.h" | 15 #include "chrome/test/ui/ui_test.h" |
|
kkania
2011/02/09 16:53:13
add "class GURL;"
| |
| 16 | 16 |
| 17 namespace webdriver { | 17 namespace webdriver { |
| 18 | 18 |
| 19 // Creates and controls the Chrome instance. | 19 // Creates and controls the Chrome instance. |
| 20 // This class should be created and accessed on a single thread. | 20 // This class should be created and accessed on a single thread. |
| 21 // TODO(phajdan.jr): Abstract UITestBase classes, see: | 21 // TODO(phajdan.jr): Abstract UITestBase classes, see: |
| 22 // http://code.google.com/p/chromium/issues/detail?id=56865 | 22 // http://code.google.com/p/chromium/issues/detail?id=56865 |
| 23 class Automation : private UITestBase { | 23 class Automation : private UITestBase { |
| 24 public: | 24 public: |
| 25 Automation() {} | 25 Automation() {} |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 36 void ExecuteScript(const std::string& frame_xpath, | 36 void ExecuteScript(const std::string& frame_xpath, |
| 37 const std::string& script, | 37 const std::string& script, |
| 38 std::string* result, | 38 std::string* result, |
| 39 bool* success); | 39 bool* success); |
| 40 | 40 |
| 41 void NavigateToURL(const std::string& url, bool* success); | 41 void NavigateToURL(const std::string& url, bool* success); |
| 42 void GoForward(bool* success); | 42 void GoForward(bool* success); |
| 43 void GoBack(bool* success); | 43 void GoBack(bool* success); |
| 44 void Reload(bool* success); | 44 void Reload(bool* success); |
| 45 void GetURL(std::string* url, bool* success); | 45 void GetURL(std::string* url, bool* success); |
| 46 void GetGURL(GURL* gurl, bool* success); | |
| 46 void GetTabTitle(std::string* tab_title, bool* success); | 47 void GetTabTitle(std::string* tab_title, bool* success); |
| 48 void GetCookies(const GURL& gurl, std::string* cookies, bool* success); | |
| 49 void GetCookieByName(const GURL& gurl, const std::string& cookie_name, | |
| 50 std::string* cookie, bool* success); | |
| 51 void DeleteCookie(const GURL& gurl, const std::string& cookie_name, | |
| 52 bool* success); | |
| 53 void SetCookie(const GURL& gurl, const std::string& cookie, bool* success); | |
| 47 | 54 |
| 48 private: | 55 private: |
| 49 scoped_refptr<BrowserProxy> browser_; | 56 scoped_refptr<BrowserProxy> browser_; |
| 50 scoped_refptr<TabProxy> tab_; | 57 scoped_refptr<TabProxy> tab_; |
| 51 | 58 |
| 52 ScopedTempDir profile_dir_; | 59 ScopedTempDir profile_dir_; |
| 53 | 60 |
| 54 DISALLOW_COPY_AND_ASSIGN(Automation); | 61 DISALLOW_COPY_AND_ASSIGN(Automation); |
| 55 }; | 62 }; |
| 56 | 63 |
| 57 } // namespace webdriver | 64 } // namespace webdriver |
| 58 | 65 |
| 59 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Automation); | 66 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Automation); |
| 60 | 67 |
| 61 #endif // CHROME_TEST_WEBDRIVER_AUTOMATION_H_ | 68 #endif // CHROME_TEST_WEBDRIVER_AUTOMATION_H_ |
| OLD | NEW |