| 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/tab_proxy.h" | 5 #include "chrome/test/automation/tab_proxy.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/common/json_value_serializer.h" | 10 #include "chrome/common/json_value_serializer.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 request, | 64 request, |
| 65 &ordinal2, | 65 &ordinal2, |
| 66 &matches)); | 66 &matches)); |
| 67 if (!succeeded) | 67 if (!succeeded) |
| 68 return -1; | 68 return -1; |
| 69 if (ordinal) | 69 if (ordinal) |
| 70 *ordinal = ordinal2; | 70 *ordinal = ordinal2; |
| 71 return matches; | 71 return matches; |
| 72 } | 72 } |
| 73 | 73 |
| 74 AutomationMsg_NavigationResponseValues TabProxy::NavigateToURL(const GURL& url)
{ | 74 AutomationMsg_NavigationResponseValues TabProxy::NavigateToURL( |
| 75 const GURL& url) { |
| 75 return NavigateToURLWithTimeout(url, base::kNoTimeout, NULL); | 76 return NavigateToURLWithTimeout(url, base::kNoTimeout, NULL); |
| 76 } | 77 } |
| 77 | 78 |
| 78 AutomationMsg_NavigationResponseValues TabProxy::NavigateToURLWithTimeout( | 79 AutomationMsg_NavigationResponseValues TabProxy::NavigateToURLWithTimeout( |
| 79 const GURL& url, uint32 timeout_ms, bool* is_timeout) { | 80 const GURL& url, uint32 timeout_ms, bool* is_timeout) { |
| 80 if (!is_valid()) | 81 if (!is_valid()) |
| 81 return AUTOMATION_MSG_NAVIGATION_ERROR; | 82 return AUTOMATION_MSG_NAVIGATION_ERROR; |
| 82 | 83 |
| 83 AutomationMsg_NavigationResponseValues navigate_response = | 84 AutomationMsg_NavigationResponseValues navigate_response = |
| 84 AUTOMATION_MSG_NAVIGATION_ERROR; | 85 AUTOMATION_MSG_NAVIGATION_ERROR; |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 | 593 |
| 593 bool TabProxy::OverrideEncoding(const std::wstring& encoding) { | 594 bool TabProxy::OverrideEncoding(const std::wstring& encoding) { |
| 594 if (!is_valid()) | 595 if (!is_valid()) |
| 595 return false; | 596 return false; |
| 596 | 597 |
| 597 bool succeeded = false; | 598 bool succeeded = false; |
| 598 sender_->Send(new AutomationMsg_OverrideEncoding(0, handle_, encoding, | 599 sender_->Send(new AutomationMsg_OverrideEncoding(0, handle_, encoding, |
| 599 &succeeded)); | 600 &succeeded)); |
| 600 return succeeded; | 601 return succeeded; |
| 601 } | 602 } |
| OLD | NEW |