| OLD | NEW | 
|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ui/accessibility/platform/ax_platform_node.h" | 5 #include "ui/accessibility/platform/ax_platform_node.h" | 
| 6 | 6 | 
| 7 #include <atlbase.h> | 7 #include <atlbase.h> | 
| 8 #include <atlcom.h> | 8 #include <atlcom.h> | 
| 9 #include <oleacc.h> | 9 #include <oleacc.h> | 
| 10 | 10 | 
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 171 | 171 | 
| 172   EXPECT_EQ(E_INVALIDARG, root_obj->get_accValue(SELF, nullptr)); | 172   EXPECT_EQ(E_INVALIDARG, root_obj->get_accValue(SELF, nullptr)); | 
| 173   ScopedVariant bad_id(999); | 173   ScopedVariant bad_id(999); | 
| 174   ScopedBstr v2; | 174   ScopedBstr v2; | 
| 175   EXPECT_EQ(E_INVALIDARG, root_obj->get_accValue(bad_id, v2.Receive())); | 175   EXPECT_EQ(E_INVALIDARG, root_obj->get_accValue(bad_id, v2.Receive())); | 
| 176 } | 176 } | 
| 177 | 177 | 
| 178 TEST_F(AXPlatformNodeWinTest, TestIAccessibleShortcut) { | 178 TEST_F(AXPlatformNodeWinTest, TestIAccessibleShortcut) { | 
| 179   AXNodeData root; | 179   AXNodeData root; | 
| 180   root.id = 1; | 180   root.id = 1; | 
| 181   root.AddStringAttribute(AX_ATTR_SHORTCUT, "Shortcut"); | 181   root.AddStringAttribute(AX_ATTR_KEY_SHORTCUTS, "Shortcut"); | 
| 182   Init(root); | 182   Init(root); | 
| 183 | 183 | 
| 184   ScopedComPtr<IAccessible> root_obj(GetRootIAccessible()); | 184   ScopedComPtr<IAccessible> root_obj(GetRootIAccessible()); | 
| 185   ScopedBstr shortcut; | 185   ScopedBstr shortcut; | 
| 186   EXPECT_EQ(S_OK, root_obj->get_accKeyboardShortcut(SELF, shortcut.Receive())); | 186   EXPECT_EQ(S_OK, root_obj->get_accKeyboardShortcut(SELF, shortcut.Receive())); | 
| 187   EXPECT_STREQ(L"Shortcut", shortcut); | 187   EXPECT_STREQ(L"Shortcut", shortcut); | 
| 188 | 188 | 
| 189   EXPECT_EQ(E_INVALIDARG, root_obj->get_accKeyboardShortcut(SELF, nullptr)); | 189   EXPECT_EQ(E_INVALIDARG, root_obj->get_accKeyboardShortcut(SELF, nullptr)); | 
| 190   ScopedVariant bad_id(999); | 190   ScopedVariant bad_id(999); | 
| 191   ScopedBstr k2; | 191   ScopedBstr k2; | 
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 513   EXPECT_HRESULT_SUCCEEDED(text_field->setSelection(0, 1, 0)); | 513   EXPECT_HRESULT_SUCCEEDED(text_field->setSelection(0, 1, 0)); | 
| 514   EXPECT_HRESULT_SUCCEEDED(text_field->setSelection(0, 2, 2)); | 514   EXPECT_HRESULT_SUCCEEDED(text_field->setSelection(0, 2, 2)); | 
| 515   EXPECT_HRESULT_SUCCEEDED(text_field->setSelection(0, IA2_TEXT_OFFSET_CARET, | 515   EXPECT_HRESULT_SUCCEEDED(text_field->setSelection(0, IA2_TEXT_OFFSET_CARET, | 
| 516                                                     IA2_TEXT_OFFSET_LENGTH)); | 516                                                     IA2_TEXT_OFFSET_LENGTH)); | 
| 517 | 517 | 
| 518   EXPECT_HRESULT_FAILED(text_field->setSelection(1, 0, 0)); | 518   EXPECT_HRESULT_FAILED(text_field->setSelection(1, 0, 0)); | 
| 519   EXPECT_HRESULT_FAILED(text_field->setSelection(0, 0, 5)); | 519   EXPECT_HRESULT_FAILED(text_field->setSelection(0, 0, 5)); | 
| 520 } | 520 } | 
| 521 | 521 | 
| 522 }  // namespace ui | 522 }  // namespace ui | 
| OLD | NEW | 
|---|