| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/win/scoped_bstr.h" | 10 #include "base/win/scoped_bstr.h" |
| (...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 link.state = link_text.state = 1 << ui::AX_STATE_READ_ONLY; | 934 link.state = link_text.state = 1 << ui::AX_STATE_READ_ONLY; |
| 935 link.child_ids.push_back(link_text.id); | 935 link.child_ids.push_back(link_text.id); |
| 936 | 936 |
| 937 ui::AXNodeData slider, slider_text; | 937 ui::AXNodeData slider, slider_text; |
| 938 slider.id = 10; | 938 slider.id = 10; |
| 939 slider_text.id = 11; | 939 slider_text.id = 11; |
| 940 slider.AddFloatAttribute(ui::AX_ATTR_VALUE_FOR_RANGE, 5.0F); | 940 slider.AddFloatAttribute(ui::AX_ATTR_VALUE_FOR_RANGE, 5.0F); |
| 941 slider_text.SetName("Slider text"); | 941 slider_text.SetName("Slider text"); |
| 942 slider.role = ui::AX_ROLE_SLIDER; | 942 slider.role = ui::AX_ROLE_SLIDER; |
| 943 slider_text.role = ui::AX_ROLE_STATIC_TEXT; | 943 slider_text.role = ui::AX_ROLE_STATIC_TEXT; |
| 944 slider_text.state = 1 << ui::AX_STATE_READ_ONLY; | 944 slider.state = slider_text.state = 1 << ui::AX_STATE_READ_ONLY; |
| 945 slider.child_ids.push_back(slider_text.id); | 945 slider.child_ids.push_back(slider_text.id); |
| 946 | 946 |
| 947 root.child_ids.push_back(2); // Combo box. | 947 root.child_ids.push_back(2); // Combo box. |
| 948 root.child_ids.push_back(4); // Search box. | 948 root.child_ids.push_back(4); // Search box. |
| 949 root.child_ids.push_back(7); // Text field. | 949 root.child_ids.push_back(7); // Text field. |
| 950 root.child_ids.push_back(8); // Link. | 950 root.child_ids.push_back(8); // Link. |
| 951 root.child_ids.push_back(10); // Slider. | 951 root.child_ids.push_back(10); // Slider. |
| 952 | 952 |
| 953 CountedBrowserAccessibility::reset(); | 953 CountedBrowserAccessibility::reset(); |
| 954 scoped_ptr<BrowserAccessibilityManager> manager( | 954 scoped_ptr<BrowserAccessibilityManager> manager( |
| (...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1999 base::win::ScopedComPtr<IDispatch> result; | 1999 base::win::ScopedComPtr<IDispatch> result; |
| 2000 EXPECT_EQ(E_INVALIDARG, ToBrowserAccessibilityWin(child)->get_accChild( | 2000 EXPECT_EQ(E_INVALIDARG, ToBrowserAccessibilityWin(child)->get_accChild( |
| 2001 root_unique_id_variant, result.Receive())); | 2001 root_unique_id_variant, result.Receive())); |
| 2002 | 2002 |
| 2003 base::win::ScopedVariant child_unique_id_variant(-child->unique_id()); | 2003 base::win::ScopedVariant child_unique_id_variant(-child->unique_id()); |
| 2004 EXPECT_EQ(S_OK, ToBrowserAccessibilityWin(root)->get_accChild( | 2004 EXPECT_EQ(S_OK, ToBrowserAccessibilityWin(root)->get_accChild( |
| 2005 child_unique_id_variant, result.Receive())); | 2005 child_unique_id_variant, result.Receive())); |
| 2006 } | 2006 } |
| 2007 | 2007 |
| 2008 } // namespace content | 2008 } // namespace content |
| OLD | NEW |