OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "base/scoped_ptr.h" | 5 #include "base/scoped_ptr.h" |
6 #include "chrome/test/automation/tab_proxy.h" | 6 #include "chrome/test/automation/tab_proxy.h" |
7 #include "chrome/test/pyautolib/pyautolib.h" | 7 #include "chrome/test/pyautolib/pyautolib.h" |
8 #include "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
9 | 9 |
10 PyUITestSuite::PyUITestSuite(int argc, char** argv) | 10 PyUITestSuite::PyUITestSuite(int argc, char** argv) |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 scoped_refptr<BrowserProxy> browser_proxy = | 91 scoped_refptr<BrowserProxy> browser_proxy = |
92 automation()->GetBrowserWindow(window_index); | 92 automation()->GetBrowserWindow(window_index); |
93 EXPECT_TRUE(browser_proxy.get()); | 93 EXPECT_TRUE(browser_proxy.get()); |
94 if (!browser_proxy.get()) | 94 if (!browser_proxy.get()) |
95 return false; | 95 return false; |
96 bool is_visible; | 96 bool is_visible; |
97 EXPECT_TRUE(browser_proxy->IsFindWindowFullyVisible(&is_visible)); | 97 EXPECT_TRUE(browser_proxy->IsFindWindowFullyVisible(&is_visible)); |
98 return is_visible; | 98 return is_visible; |
99 } | 99 } |
100 | 100 |
101 std::string PyUITestSuite::GetDownloadDirectory() { | 101 FilePath PyUITestSuite::GetDownloadDirectory() { |
102 FilePath download_dir; | 102 FilePath download_dir; |
103 scoped_refptr<TabProxy> tab_proxy(GetActiveTab()); | 103 scoped_refptr<TabProxy> tab_proxy(GetActiveTab()); |
104 EXPECT_TRUE(tab_proxy.get()); | 104 EXPECT_TRUE(tab_proxy.get()); |
105 if (!tab_proxy.get()) | 105 if (!tab_proxy.get()) |
106 return download_dir.value(); | 106 return download_dir; |
107 EXPECT_TRUE(tab_proxy->GetDownloadDirectory(&download_dir)); | 107 EXPECT_TRUE(tab_proxy->GetDownloadDirectory(&download_dir)); |
108 return download_dir.value(); | 108 return download_dir; |
109 } | 109 } |
110 | 110 |
111 bool PyUITestSuite::OpenNewBrowserWindow(bool show) { | 111 bool PyUITestSuite::OpenNewBrowserWindow(bool show) { |
112 return automation()->OpenNewBrowserWindow(Browser::TYPE_NORMAL, show); | 112 return automation()->OpenNewBrowserWindow(Browser::TYPE_NORMAL, show); |
113 } | 113 } |
114 | 114 |
115 bool PyUITestSuite::InstallExtension(const FilePath& crx_file) { | 115 bool PyUITestSuite::InstallExtension(const FilePath& crx_file) { |
116 return automation()->InstallExtension(crx_file); | 116 return automation()->InstallExtension(crx_file); |
117 } | 117 } |
118 | 118 |
OLD | NEW |