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

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

Issue 5255005: Add pyauto tests for the New Tab page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 10 years, 1 month 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
« no previous file with comments | « chrome/test/pyautolib/pyautolib.h ('k') | chrome/test/pyautolib/pyautolib.i » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/pyautolib.cc
diff --git a/chrome/test/pyautolib/pyautolib.cc b/chrome/test/pyautolib/pyautolib.cc
index 6d355486fa44bb63ae0fd7e250ba2c0c8dabf8b2..6e5a0a9435346403954dde1421f55e021bd22ee9 100644
--- a/chrome/test/pyautolib/pyautolib.cc
+++ b/chrome/test/pyautolib/pyautolib.cc
@@ -171,6 +171,15 @@ bool PyUITestBase::OpenNewBrowserWindow(bool show) {
return automation()->OpenNewBrowserWindow(Browser::TYPE_NORMAL, show);
}
+bool PyUITestBase::CloseBrowserWindow(int window_index) {
+ scoped_refptr<BrowserProxy> browser_proxy =
+ automation()->GetBrowserWindow(window_index);
+ if (!browser_proxy.get())
+ return false;
+ bool app_closed;
+ return CloseBrowser(browser_proxy.get(), &app_closed);
+}
+
int PyUITestBase::GetBrowserWindowCount() {
int num_windows = 0;
EXPECT_TRUE(automation()->GetBrowserWindowCount(&num_windows));
« no previous file with comments | « chrome/test/pyautolib/pyautolib.h ('k') | chrome/test/pyautolib/pyautolib.i » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698