| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <gtest/gtest.h> | 7 #include <gtest/gtest.h> |
| 8 | 8 |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 void AutomationProxy::SignalNewTabUITab(int load_time) { | 228 void AutomationProxy::SignalNewTabUITab(int load_time) { |
| 229 new_tab_ui_load_time_ = load_time; | 229 new_tab_ui_load_time_ = load_time; |
| 230 new_tab_ui_load_complete_.Signal(); | 230 new_tab_ui_load_complete_.Signal(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 bool AutomationProxy::SavePackageShouldPromptUser(bool should_prompt) { | 233 bool AutomationProxy::SavePackageShouldPromptUser(bool should_prompt) { |
| 234 return Send(new AutomationMsg_SavePackageShouldPromptUser(should_prompt)); | 234 return Send(new AutomationMsg_SavePackageShouldPromptUser(should_prompt)); |
| 235 } | 235 } |
| 236 | 236 |
| 237 scoped_refptr<ExtensionProxy> AutomationProxy::InstallExtension( | 237 scoped_refptr<ExtensionProxy> AutomationProxy::InstallExtension( |
| 238 const FilePath& crx_file, bool with_ui) { | 238 const std::string& extension_path, bool with_ui) { |
| 239 int handle = 0; | 239 int handle = 0; |
| 240 if (!Send(new AutomationMsg_InstallExtensionAndGetHandle(crx_file, with_ui, | 240 if (!Send(new AutomationMsg_InstallExtension(extension_path, |
| 241 &handle))) | 241 with_ui, &handle))) |
| 242 return NULL; | 242 return NULL; |
| 243 | 243 |
| 244 return ProxyObjectFromHandle<ExtensionProxy>(handle); | 244 return ProxyObjectFromHandle<ExtensionProxy>(handle); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void AutomationProxy::EnsureExtensionTestResult() { | 247 void AutomationProxy::EnsureExtensionTestResult() { |
| 248 bool result; | 248 bool result; |
| 249 std::string message; | 249 std::string message; |
| 250 if (!Send(new AutomationMsg_WaitForExtensionTestResult(&result, | 250 if (!Send(new AutomationMsg_WaitForExtensionTestResult(&result, |
| 251 &message))) { | 251 &message))) { |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 } | 553 } |
| 554 | 554 |
| 555 bool AutomationProxy::SendJSONRequest(const std::string& request, | 555 bool AutomationProxy::SendJSONRequest(const std::string& request, |
| 556 int timeout_ms, | 556 int timeout_ms, |
| 557 std::string* response) { | 557 std::string* response) { |
| 558 bool result = false; | 558 bool result = false; |
| 559 if (!SendAutomationJSONRequest(this, request, timeout_ms, response, &result)) | 559 if (!SendAutomationJSONRequest(this, request, timeout_ms, response, &result)) |
| 560 return false; | 560 return false; |
| 561 return result; | 561 return result; |
| 562 } | 562 } |
| OLD | NEW |