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 "base/string_util.h" | 6 #include "base/string_util.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/test/automation/extension_proxy.h" | 8 #include "chrome/test/automation/extension_proxy.h" |
9 #include "chrome/test/automation/tab_proxy.h" | 9 #include "chrome/test/automation/tab_proxy.h" |
10 #include "chrome/test/pyautolib/pyautolib.h" | 10 #include "chrome/test/pyautolib/pyautolib.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 if (!tab_proxy.get()) | 149 if (!tab_proxy.get()) |
150 return download_dir; | 150 return download_dir; |
151 EXPECT_TRUE(tab_proxy->GetDownloadDirectory(&download_dir)); | 151 EXPECT_TRUE(tab_proxy->GetDownloadDirectory(&download_dir)); |
152 return download_dir; | 152 return download_dir; |
153 } | 153 } |
154 | 154 |
155 bool PyUITestBase::OpenNewBrowserWindow(bool show) { | 155 bool PyUITestBase::OpenNewBrowserWindow(bool show) { |
156 return automation()->OpenNewBrowserWindow(Browser::TYPE_NORMAL, show); | 156 return automation()->OpenNewBrowserWindow(Browser::TYPE_NORMAL, show); |
157 } | 157 } |
158 | 158 |
159 bool PyUITestBase::InstallExtension(const FilePath& crx_file, bool with_ui) { | 159 bool PyUITestBase::InstallExtension(const FilePath& crx_file) { |
160 scoped_refptr<ExtensionProxy> proxy = | 160 scoped_refptr<ExtensionProxy> proxy = |
161 automation()->InstallExtension(crx_file, with_ui); | 161 automation()->InstallExtension(crx_file); |
162 return proxy.get() != NULL; | 162 return proxy.get() != NULL; |
163 } | 163 } |
164 | 164 |
165 bool PyUITestBase::GetBookmarkBarVisibility() { | 165 bool PyUITestBase::GetBookmarkBarVisibility() { |
166 scoped_refptr<BrowserProxy> browser_proxy = | 166 scoped_refptr<BrowserProxy> browser_proxy = |
167 automation()->GetBrowserWindow(0); // Window doesn't matter. | 167 automation()->GetBrowserWindow(0); // Window doesn't matter. |
168 EXPECT_TRUE(browser_proxy.get()); | 168 EXPECT_TRUE(browser_proxy.get()); |
169 if (!browser_proxy.get()) | 169 if (!browser_proxy.get()) |
170 return false; | 170 return false; |
171 | 171 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 std::string& request) { | 281 std::string& request) { |
282 scoped_refptr<BrowserProxy> browser_proxy = | 282 scoped_refptr<BrowserProxy> browser_proxy = |
283 automation()->GetBrowserWindow(window_index); | 283 automation()->GetBrowserWindow(window_index); |
284 EXPECT_TRUE(browser_proxy.get()); | 284 EXPECT_TRUE(browser_proxy.get()); |
285 std::string response; | 285 std::string response; |
286 if (browser_proxy.get()) { | 286 if (browser_proxy.get()) { |
287 EXPECT_TRUE(browser_proxy->SendJSONRequest(request, &response)); | 287 EXPECT_TRUE(browser_proxy->SendJSONRequest(request, &response)); |
288 } | 288 } |
289 return response; | 289 return response; |
290 } | 290 } |
OLD | NEW |