OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/test/automation/automation_proxy.h" | 5 #include "chrome/test/automation/automation_proxy.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/file_version_info.h" | 10 #include "base/file_version_info.h" |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 void AutomationProxy::SignalNewTabUITab(int load_time) { | 227 void AutomationProxy::SignalNewTabUITab(int load_time) { |
228 new_tab_ui_load_time_ = load_time; | 228 new_tab_ui_load_time_ = load_time; |
229 new_tab_ui_load_complete_.Signal(); | 229 new_tab_ui_load_complete_.Signal(); |
230 } | 230 } |
231 | 231 |
232 bool AutomationProxy::SavePackageShouldPromptUser(bool should_prompt) { | 232 bool AutomationProxy::SavePackageShouldPromptUser(bool should_prompt) { |
233 return Send(new AutomationMsg_SavePackageShouldPromptUser(0, should_prompt)); | 233 return Send(new AutomationMsg_SavePackageShouldPromptUser(0, should_prompt)); |
234 } | 234 } |
235 | 235 |
236 scoped_refptr<ExtensionProxy> AutomationProxy::InstallExtension( | 236 scoped_refptr<ExtensionProxy> AutomationProxy::InstallExtension( |
237 const FilePath& crx_file, bool with_ui) { | 237 const FilePath& crx_file) { |
238 int handle = 0; | 238 int handle = 0; |
239 if (!Send(new AutomationMsg_InstallExtensionAndGetHandle(0, crx_file, with_ui, | 239 if (!Send(new AutomationMsg_InstallExtensionAndGetHandle(0, crx_file, |
240 &handle))) | 240 &handle))) |
241 return NULL; | 241 return NULL; |
242 | 242 |
243 return ProxyObjectFromHandle<ExtensionProxy>(handle); | 243 return ProxyObjectFromHandle<ExtensionProxy>(handle); |
244 } | 244 } |
245 | 245 |
246 void AutomationProxy::EnsureExtensionTestResult() { | 246 void AutomationProxy::EnsureExtensionTestResult() { |
247 bool result; | 247 bool result; |
248 std::string message; | 248 std::string message; |
249 if (!Send(new AutomationMsg_WaitForExtensionTestResult(0, &result, | 249 if (!Send(new AutomationMsg_WaitForExtensionTestResult(0, &result, |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 bool AutomationProxy::LoginWithUserAndPass(const std::string& username, | 524 bool AutomationProxy::LoginWithUserAndPass(const std::string& username, |
525 const std::string& password) { | 525 const std::string& password) { |
526 bool success; | 526 bool success; |
527 bool sent = Send(new AutomationMsg_LoginWithUserAndPass(0, username, | 527 bool sent = Send(new AutomationMsg_LoginWithUserAndPass(0, username, |
528 password, | 528 password, |
529 &success)); | 529 &success)); |
530 // If message sending unsuccessful or test failed, return false. | 530 // If message sending unsuccessful or test failed, return false. |
531 return sent && success; | 531 return sent && success; |
532 } | 532 } |
533 #endif | 533 #endif |
534 | |
535 bool AutomationProxy::ResetToDefaultTheme() { | |
536 return Send(new AutomationMsg_ResetToDefaultTheme(0)); | |
537 } | |
OLD | NEW |