| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <oleacc.h> | 5 #include <oleacc.h> |
| 6 | 6 |
| 7 #include "base/win/scoped_bstr.h" | 7 #include "base/win/scoped_bstr.h" |
| 8 #include "base/win/scoped_comptr.h" | 8 #include "base/win/scoped_comptr.h" |
| 9 #include "base/win/scoped_variant.h" | 9 #include "base/win/scoped_variant.h" |
| 10 #include "third_party/iaccessible2/ia2_api_all.h" | 10 #include "third_party/iaccessible2/ia2_api_all.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 ScopedComPtr<IDispatch> child_widget_sibling_dispatch; | 125 ScopedComPtr<IDispatch> child_widget_sibling_dispatch; |
| 126 ScopedComPtr<IAccessible> child_widget_sibling_accessible; | 126 ScopedComPtr<IAccessible> child_widget_sibling_accessible; |
| 127 ScopedVariant childid_self(CHILDID_SELF); | 127 ScopedVariant childid_self(CHILDID_SELF); |
| 128 ScopedVariant result; | 128 ScopedVariant result; |
| 129 ASSERT_EQ(S_OK, child_widget_accessible->accNavigate( | 129 ASSERT_EQ(S_OK, child_widget_accessible->accNavigate( |
| 130 NAVDIR_PREVIOUS, childid_self, result.Receive())); | 130 NAVDIR_PREVIOUS, childid_self, result.Receive())); |
| 131 ASSERT_EQ(VT_DISPATCH, V_VT(result.ptr())); | 131 ASSERT_EQ(VT_DISPATCH, V_VT(result.ptr())); |
| 132 child_widget_sibling_dispatch = V_DISPATCH(result.ptr()); | 132 child_widget_sibling_dispatch = V_DISPATCH(result.ptr()); |
| 133 ASSERT_EQ(S_OK, child_widget_sibling_dispatch.QueryInterface( | 133 ASSERT_EQ(S_OK, child_widget_sibling_dispatch.QueryInterface( |
| 134 child_widget_sibling_accessible.Receive())); | 134 child_widget_sibling_accessible.Receive())); |
| 135 ASSERT_EQ(child_view_accessible.get(), child_widget_sibling_accessible.get()); | 135 ASSERT_EQ(child_view_accessible.Get(), child_widget_sibling_accessible.Get()); |
| 136 | 136 |
| 137 ScopedComPtr<IDispatch> child_widget_parent_dispatch; | 137 ScopedComPtr<IDispatch> child_widget_parent_dispatch; |
| 138 ScopedComPtr<IAccessible> child_widget_parent_accessible; | 138 ScopedComPtr<IAccessible> child_widget_parent_accessible; |
| 139 ASSERT_EQ(S_OK, child_widget_accessible->get_accParent( | 139 ASSERT_EQ(S_OK, child_widget_accessible->get_accParent( |
| 140 child_widget_parent_dispatch.Receive())); | 140 child_widget_parent_dispatch.Receive())); |
| 141 ASSERT_EQ(S_OK, child_widget_parent_dispatch.QueryInterface( | 141 ASSERT_EQ(S_OK, child_widget_parent_dispatch.QueryInterface( |
| 142 child_widget_parent_accessible.Receive())); | 142 child_widget_parent_accessible.Receive())); |
| 143 ASSERT_EQ(root_view_accessible.get(), child_widget_parent_accessible.get()); | 143 ASSERT_EQ(root_view_accessible.Get(), child_widget_parent_accessible.Get()); |
| 144 } | 144 } |
| 145 | 145 |
| 146 // Flaky on Windows: https://crbug.com/461837. | 146 // Flaky on Windows: https://crbug.com/461837. |
| 147 TEST_F(NativeViewAccessibilityWinTest, DISABLED_RetrieveAllAlerts) { | 147 TEST_F(NativeViewAccessibilityWinTest, DISABLED_RetrieveAllAlerts) { |
| 148 Widget widget; | 148 Widget widget; |
| 149 Widget::InitParams init_params = | 149 Widget::InitParams init_params = |
| 150 CreateParams(Widget::InitParams::TYPE_POPUP); | 150 CreateParams(Widget::InitParams::TYPE_POPUP); |
| 151 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 151 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 152 widget.Init(init_params); | 152 widget.Init(init_params); |
| 153 | 153 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 | 219 |
| 220 LONG child_count = 0; | 220 LONG child_count = 0; |
| 221 ScopedComPtr<IAccessible> content_accessible( | 221 ScopedComPtr<IAccessible> content_accessible( |
| 222 widget.GetRootView()->GetNativeViewAccessible()); | 222 widget.GetRootView()->GetNativeViewAccessible()); |
| 223 EXPECT_EQ(S_OK, content_accessible->get_accChildCount(&child_count)); | 223 EXPECT_EQ(S_OK, content_accessible->get_accChildCount(&child_count)); |
| 224 EXPECT_EQ(1L, child_count); | 224 EXPECT_EQ(1L, child_count); |
| 225 } | 225 } |
| 226 | 226 |
| 227 } // namespace test | 227 } // namespace test |
| 228 } // namespace views | 228 } // namespace views |
| OLD | NEW |