| 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 if (!succeeded) { | 548 if (!succeeded) { |
| 549 delete response; | 549 delete response; |
| 550 return false; | 550 return false; |
| 551 } | 551 } |
| 552 // Wrap |json| in an array before deserializing because valid JSON has an | 552 // Wrap |json| in an array before deserializing because valid JSON has an |
| 553 // array or an object as the root. | 553 // array or an object as the root. |
| 554 json.insert(0, "["); | 554 json.insert(0, "["); |
| 555 json.append("]"); | 555 json.append("]"); |
| 556 | 556 |
| 557 JSONStringValueSerializer deserializer(json); | 557 JSONStringValueSerializer deserializer(json); |
| 558 succeeded = deserializer.Deserialize(value); | 558 succeeded = deserializer.Deserialize(value, NULL); |
| 559 | 559 |
| 560 delete response; | 560 delete response; |
| 561 return succeeded; | 561 return succeeded; |
| 562 } | 562 } |
| 563 | 563 |
| 564 bool TabProxy::GetConstrainedWindowCount(int* count) const { | 564 bool TabProxy::GetConstrainedWindowCount(int* count) const { |
| 565 if (!is_valid()) | 565 if (!is_valid()) |
| 566 return false; | 566 return false; |
| 567 | 567 |
| 568 if (!count) { | 568 if (!count) { |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 &response, | 1040 &response, |
| 1041 AutomationMsg_WaitForNavigationResponse::ID); | 1041 AutomationMsg_WaitForNavigationResponse::ID); |
| 1042 scoped_ptr<IPC::Message> auto_deleter(response); | 1042 scoped_ptr<IPC::Message> auto_deleter(response); |
| 1043 if (!success) | 1043 if (!success) |
| 1044 return false; | 1044 return false; |
| 1045 | 1045 |
| 1046 void* iter = NULL; | 1046 void* iter = NULL; |
| 1047 response->ReadBool(&iter, &success); | 1047 response->ReadBool(&iter, &success); |
| 1048 return success; | 1048 return success; |
| 1049 } | 1049 } |
| OLD | NEW |