| 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 "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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 tracker_.reset(new AutomationHandleTracker()); | 167 tracker_.reset(new AutomationHandleTracker()); |
| 168 } | 168 } |
| 169 | 169 |
| 170 AutomationLaunchResult AutomationProxy::WaitForAppLaunch() { | 170 AutomationLaunchResult AutomationProxy::WaitForAppLaunch() { |
| 171 AutomationLaunchResult result = AUTOMATION_SUCCESS; | 171 AutomationLaunchResult result = AUTOMATION_SUCCESS; |
| 172 if (app_launched_.TimedWait(command_execution_timeout_)) { | 172 if (app_launched_.TimedWait(command_execution_timeout_)) { |
| 173 if (perform_version_check_) { | 173 if (perform_version_check_) { |
| 174 // Obtain our own version number and compare it to what the automation | 174 // Obtain our own version number and compare it to what the automation |
| 175 // provider sent. | 175 // provider sent. |
| 176 chrome::VersionInfo version_info; | 176 chrome::VersionInfo version_info; |
| 177 DCHECK(version_info.is_valid()); | |
| 178 | 177 |
| 179 // Note that we use a simple string comparison since we expect the version | 178 // Note that we use a simple string comparison since we expect the version |
| 180 // to be a punctuated numeric string. Consider using base/Version if we | 179 // to be a punctuated numeric string. Consider using base/Version if we |
| 181 // ever need something more complicated here. | 180 // ever need something more complicated here. |
| 182 if (server_version_ != version_info.Version()) { | 181 if (server_version_ != version_info.Version()) { |
| 183 result = AUTOMATION_VERSION_MISMATCH; | 182 result = AUTOMATION_VERSION_MISMATCH; |
| 184 } | 183 } |
| 185 } | 184 } |
| 186 } else { | 185 } else { |
| 187 result = AUTOMATION_TIMEOUT; | 186 result = AUTOMATION_TIMEOUT; |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 password, | 542 password, |
| 544 &success)); | 543 &success)); |
| 545 // If message sending unsuccessful or test failed, return false. | 544 // If message sending unsuccessful or test failed, return false. |
| 546 return sent && success; | 545 return sent && success; |
| 547 } | 546 } |
| 548 #endif | 547 #endif |
| 549 | 548 |
| 550 bool AutomationProxy::ResetToDefaultTheme() { | 549 bool AutomationProxy::ResetToDefaultTheme() { |
| 551 return Send(new AutomationMsg_ResetToDefaultTheme(0)); | 550 return Send(new AutomationMsg_ResetToDefaultTheme(0)); |
| 552 } | 551 } |
| OLD | NEW |