| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "win8/test/ui_automation_client.h" | 5 #include "win8/test/ui_automation_client.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlcom.h> | 8 #include <atlcom.h> |
| 9 #include <oleauto.h> | 9 #include <oleauto.h> |
| 10 #include <uiautomation.h> | 10 #include <uiautomation.h> |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 | 370 |
| 371 // Search for an invokable element named item_name. | 371 // Search for an invokable element named item_name. |
| 372 var.Set(true); | 372 var.Set(true); |
| 373 result = automation_->CreatePropertyCondition( | 373 result = automation_->CreatePropertyCondition( |
| 374 UIA_IsInvokePatternAvailablePropertyId, | 374 UIA_IsInvokePatternAvailablePropertyId, |
| 375 var, | 375 var, |
| 376 invokable_condition.Receive()); | 376 invokable_condition.Receive()); |
| 377 var.Reset(); | 377 var.Reset(); |
| 378 if (FAILED(result)) { | 378 if (FAILED(result)) { |
| 379 LOG(ERROR) << std::hex << result; | 379 LOG(ERROR) << std::hex << result; |
| 380 return false; | 380 return result; |
| 381 } | 381 } |
| 382 | 382 |
| 383 var.Set(item_name_.c_str()); | 383 var.Set(item_name_.c_str()); |
| 384 result = automation_->CreatePropertyCondition(UIA_NamePropertyId, | 384 result = automation_->CreatePropertyCondition(UIA_NamePropertyId, |
| 385 var, | 385 var, |
| 386 item_name_condition.Receive()); | 386 item_name_condition.Receive()); |
| 387 var.Reset(); | 387 var.Reset(); |
| 388 if (FAILED(result)) { | 388 if (FAILED(result)) { |
| 389 LOG(ERROR) << std::hex << result; | 389 LOG(ERROR) << std::hex << result; |
| 390 return result; | 390 return result; |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 context_, | 611 context_, |
| 612 base::ThreadTaskRunnerHandle::Get(), | 612 base::ThreadTaskRunnerHandle::Get(), |
| 613 base::string16(class_name), | 613 base::string16(class_name), |
| 614 item_name, | 614 item_name, |
| 615 init_callback, | 615 init_callback, |
| 616 result_callback)); | 616 result_callback)); |
| 617 } | 617 } |
| 618 | 618 |
| 619 } // namespace internal | 619 } // namespace internal |
| 620 } // namespace win8 | 620 } // namespace win8 |
| OLD | NEW |