| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_frame/test/chrome_frame_ui_test_utils.h" | 5 #include "chrome_frame/test/chrome_frame_ui_test_utils.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 #include <stack> | 10 #include <stack> |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 } | 541 } |
| 542 return Find(object.get(), match); | 542 return Find(object.get(), match); |
| 543 } | 543 } |
| 544 | 544 |
| 545 bool AccObjectMatcher::DoesMatch(AccObject* object) const { | 545 bool AccObjectMatcher::DoesMatch(AccObject* object) const { |
| 546 DCHECK(object); | 546 DCHECK(object); |
| 547 bool does_match = true; | 547 bool does_match = true; |
| 548 std::wstring name, role_text, value; | 548 std::wstring name, role_text, value; |
| 549 if (name_.length()) { | 549 if (name_.length()) { |
| 550 object->GetName(&name); | 550 object->GetName(&name); |
| 551 does_match = MatchPattern(name, name_); | 551 does_match = MatchPattern(StringToUpperASCII(name), |
| 552 StringToUpperASCII(name_)); |
| 552 } | 553 } |
| 553 if (does_match && role_text_.length()) { | 554 if (does_match && role_text_.length()) { |
| 554 object->GetRoleText(&role_text); | 555 object->GetRoleText(&role_text); |
| 555 does_match = MatchPattern(role_text, role_text_); | 556 does_match = MatchPattern(role_text, role_text_); |
| 556 } | 557 } |
| 557 if (does_match && value_.length()) { | 558 if (does_match && value_.length()) { |
| 558 object->GetValue(&value); | 559 object->GetValue(&value); |
| 559 does_match = MatchPattern(value, value_); | 560 does_match = MatchPattern(value, value_); |
| 560 } | 561 } |
| 561 return does_match; | 562 return does_match; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 } | 664 } |
| 664 | 665 |
| 665 bool IsDesktopUnlocked() { | 666 bool IsDesktopUnlocked() { |
| 666 HDESK desk = ::OpenInputDesktop(0, FALSE, DESKTOP_SWITCHDESKTOP); | 667 HDESK desk = ::OpenInputDesktop(0, FALSE, DESKTOP_SWITCHDESKTOP); |
| 667 if (desk) | 668 if (desk) |
| 668 ::CloseDesktop(desk); | 669 ::CloseDesktop(desk); |
| 669 return desk; | 670 return desk; |
| 670 } | 671 } |
| 671 | 672 |
| 672 } // namespace chrome_frame_test | 673 } // namespace chrome_frame_test |
| OLD | NEW |