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

Unified Diff: chrome/test/pyautolib/pyautolib.cc

Issue 10804038: Convert cookie and download automation commands to the JSON interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/pyautolib/pyautolib.cc
diff --git a/chrome/test/pyautolib/pyautolib.cc b/chrome/test/pyautolib/pyautolib.cc
index 91da779b4c5cac635dfe14cc81da5e3c10353e89..d9dc74c53727e5f7b7d96ba420a7f904ed75fa43 100644
--- a/chrome/test/pyautolib/pyautolib.cc
+++ b/chrome/test/pyautolib/pyautolib.cc
@@ -106,22 +106,6 @@ bool PyUITestBase::ActivateTab(int tab_index, int window_index) {
return browser_proxy->BringToFront() && browser_proxy->ActivateTab(tab_index);
}
-void PyUITestBase::SetDownloadShelfVisible(bool is_visible, int window_index) {
- scoped_refptr<BrowserProxy> browser_proxy = GetBrowserWindow(window_index);
- ASSERT_TRUE(browser_proxy.get());
- EXPECT_TRUE(browser_proxy->SetShelfVisible(is_visible));
-}
-
-bool PyUITestBase::IsDownloadShelfVisible(int window_index) {
- scoped_refptr<BrowserProxy> browser_proxy = GetBrowserWindow(window_index);
- EXPECT_TRUE(browser_proxy.get());
- if (!browser_proxy.get())
- return false;
- bool visible = false;
- EXPECT_TRUE(browser_proxy->IsShelfVisible(&visible));
- return visible;
-}
-
int PyUITestBase::GetTabCount(int window_index) {
return UITestBase::GetTabCount(window_index);
}
@@ -146,16 +130,6 @@ bool PyUITestBase::IsFindInPageVisible(int window_index) {
return is_visible;
}
-FilePath PyUITestBase::GetDownloadDirectory() {
- FilePath download_dir;
- scoped_refptr<TabProxy> tab_proxy(GetActiveTab());
- EXPECT_TRUE(tab_proxy.get());
- if (!tab_proxy.get())
- return download_dir;
- EXPECT_TRUE(tab_proxy->GetDownloadDirectory(&download_dir));
- return download_dir;
-}
-
bool PyUITestBase::OpenNewBrowserWindow(bool show) {
return automation()->OpenNewBrowserWindow(Browser::TYPE_TABBED, show);
}
@@ -371,35 +345,3 @@ void PyUITestBase::RequestFailureResponse(
bool PyUITestBase::ResetToDefaultTheme() {
return automation()->ResetToDefaultTheme();
}
-
-bool PyUITestBase::SetCookie(const GURL& cookie_url,
- const std::string& value,
- int window_index,
- int tab_index) {
- scoped_refptr<BrowserProxy> browser_proxy = GetBrowserWindow(window_index);
- EXPECT_TRUE(browser_proxy.get());
- if (!browser_proxy.get())
- return false;
- scoped_refptr<TabProxy> tab_proxy = browser_proxy->GetTab(tab_index);
- EXPECT_TRUE(tab_proxy.get());
- if (!tab_proxy.get())
- return false;
- return tab_proxy->SetCookie(cookie_url, value);
-}
-
-std::string PyUITestBase::GetCookie(const GURL& cookie_url,
- int window_index,
- int tab_index) {
- std::string cookie_val;
- scoped_refptr<BrowserProxy> browser_proxy = GetBrowserWindow(window_index);
- EXPECT_TRUE(browser_proxy.get());
- // TODO(phadjan.jr): figure out a way to unambiguously report error.
- if (!browser_proxy.get())
- return cookie_val;
- scoped_refptr<TabProxy> tab_proxy = browser_proxy->GetTab(tab_index);
- EXPECT_TRUE(tab_proxy.get());
- if (!tab_proxy.get())
- return cookie_val;
- EXPECT_TRUE(tab_proxy->GetCookies(cookie_url, &cookie_val));
- return cookie_val;
-}

Powered by Google App Engine
This is Rietveld 408576698