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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 base::win::ScopedVariant var; | 314 base::win::ScopedVariant var; |
315 | 315 |
316 hr = window->GetCachedPropertyValueEx(UIA_ClassNamePropertyId, TRUE, | 316 hr = window->GetCachedPropertyValueEx(UIA_ClassNamePropertyId, TRUE, |
317 var.Receive()); | 317 var.Receive()); |
318 if (FAILED(hr)) { | 318 if (FAILED(hr)) { |
319 LOG(ERROR) << std::hex << hr; | 319 LOG(ERROR) << std::hex << hr; |
320 return; | 320 return; |
321 } | 321 } |
322 | 322 |
323 if (V_VT(&var) != VT_BSTR) { | 323 if (V_VT(&var) != VT_BSTR) { |
324 LOG(ERROR) << __FUNCTION__ " class name is not a BSTR: " << V_VT(&var); | 324 LOG(ERROR) << __FUNCTION__ << " class name is not a BSTR: " << V_VT(&var); |
325 return; | 325 return; |
326 } | 326 } |
327 | 327 |
328 base::string16 class_name(V_BSTR(&var)); | 328 base::string16 class_name(V_BSTR(&var)); |
329 | 329 |
330 // Window class names are atoms, which are case-insensitive. | 330 // Window class names are atoms, which are case-insensitive. |
331 if (class_name.size() == class_name_.size() && | 331 if (class_name.size() == class_name_.size() && |
332 std::equal(class_name.begin(), class_name.end(), class_name_.begin(), | 332 std::equal(class_name.begin(), class_name.end(), class_name_.begin(), |
333 base::CaseInsensitiveCompare<wchar_t>())) { | 333 base::CaseInsensitiveCompare<wchar_t>())) { |
334 RemoveWindowObserver(); | 334 RemoveWindowObserver(); |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 context_, | 618 context_, |
619 base::ThreadTaskRunnerHandle::Get(), | 619 base::ThreadTaskRunnerHandle::Get(), |
620 base::string16(class_name), | 620 base::string16(class_name), |
621 item_name, | 621 item_name, |
622 init_callback, | 622 init_callback, |
623 result_callback)); | 623 result_callback)); |
624 } | 624 } |
625 | 625 |
626 } // namespace internal | 626 } // namespace internal |
627 } // namespace win8 | 627 } // namespace win8 |
OLD | NEW |