| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/javascript_execution_controller.h" | 5 #include "chrome/test/automation/javascript_execution_controller.h" |
| 6 | 6 |
| 7 #include "base/json/json_value_serializer.h" | 7 #include "base/json/json_string_value_serializer.h" |
| 8 #include "chrome/test/automation/javascript_message_utils.h" | 8 #include "chrome/test/automation/javascript_message_utils.h" |
| 9 | 9 |
| 10 using javascript_utils::JavaScriptPrintf; | 10 using javascript_utils::JavaScriptPrintf; |
| 11 | 11 |
| 12 // Initialize this timeout to an invalid value. Each test framework or test | 12 // Initialize this timeout to an invalid value. Each test framework or test |
| 13 // must set an appropriate timeout using set_timeout, or the | 13 // must set an appropriate timeout using set_timeout, or the |
| 14 // JavaScriptExecutionController will complain. | 14 // JavaScriptExecutionController will complain. |
| 15 int JavaScriptExecutionController::timeout_ms_ = -1; | 15 int JavaScriptExecutionController::timeout_ms_ = -1; |
| 16 | 16 |
| 17 JavaScriptExecutionController::JavaScriptExecutionController() {} | 17 JavaScriptExecutionController::JavaScriptExecutionController() {} |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 return false; | 101 return false; |
| 102 } | 102 } |
| 103 if (!success) { | 103 if (!success) { |
| 104 LOG(WARNING) << "JavaScript evaluation did not complete successfully: " | 104 LOG(WARNING) << "JavaScript evaluation did not complete successfully: " |
| 105 << evaluation_error; | 105 << evaluation_error; |
| 106 return false; | 106 return false; |
| 107 } | 107 } |
| 108 result->reset(evaluation_result_value); | 108 result->reset(evaluation_result_value); |
| 109 return true; | 109 return true; |
| 110 } | 110 } |
| OLD | NEW |