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 <tuple> | 5 #include <tuple> |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 14 matching lines...) Expand all Loading... | |
25 #include "ui/accessibility/ax_node_data.h" | 25 #include "ui/accessibility/ax_node_data.h" |
26 | 26 |
27 using blink::WebAXObject; | 27 using blink::WebAXObject; |
28 using blink::WebDocument; | 28 using blink::WebDocument; |
29 | 29 |
30 namespace content { | 30 namespace content { |
31 | 31 |
32 class TestRenderAccessibilityImpl : public RenderAccessibilityImpl { | 32 class TestRenderAccessibilityImpl : public RenderAccessibilityImpl { |
33 public: | 33 public: |
34 explicit TestRenderAccessibilityImpl(RenderFrameImpl* render_frame) | 34 explicit TestRenderAccessibilityImpl(RenderFrameImpl* render_frame) |
35 : RenderAccessibilityImpl(render_frame, ACCESSIBILITY_MODE_COMPLETE) { | 35 : RenderAccessibilityImpl(render_frame, |
36 } | 36 AccessibilityMode::kNativeAPIs | |
dmazzoni
2017/03/13 22:18:15
nit: should this be kAccessibilityModeComplete?
dougt
2017/03/14 03:18:23
Done.
| |
37 AccessibilityMode::kWebContents | | |
38 AccessibilityMode::kInlineTextBoxes | | |
39 AccessibilityMode::kScreenReader | | |
40 AccessibilityMode::kHTML) {} | |
37 | 41 |
38 void SendPendingAccessibilityEvents() { | 42 void SendPendingAccessibilityEvents() { |
39 RenderAccessibilityImpl::SendPendingAccessibilityEvents(); | 43 RenderAccessibilityImpl::SendPendingAccessibilityEvents(); |
40 } | 44 } |
41 }; | 45 }; |
42 | 46 |
43 class RenderAccessibilityImplTest : public RenderViewTest { | 47 class RenderAccessibilityImplTest : public RenderViewTest { |
44 public: | 48 public: |
45 RenderAccessibilityImplTest() {} | 49 RenderAccessibilityImplTest() {} |
46 | 50 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
262 | 266 |
263 ASSERT_EQ(3U, event.update.nodes.size()); | 267 ASSERT_EQ(3U, event.update.nodes.size()); |
264 EXPECT_EQ(node_a.axID(), event.update.node_id_to_clear); | 268 EXPECT_EQ(node_a.axID(), event.update.node_id_to_clear); |
265 EXPECT_EQ(node_a.axID(), event.update.nodes[0].id); | 269 EXPECT_EQ(node_a.axID(), event.update.nodes[0].id); |
266 EXPECT_EQ(node_b.axID(), event.update.nodes[1].id); | 270 EXPECT_EQ(node_b.axID(), event.update.nodes[1].id); |
267 EXPECT_EQ(node_c.axID(), event.update.nodes[2].id); | 271 EXPECT_EQ(node_c.axID(), event.update.nodes[2].id); |
268 EXPECT_EQ(3, CountAccessibilityNodesSentToBrowser()); | 272 EXPECT_EQ(3, CountAccessibilityNodesSentToBrowser()); |
269 } | 273 } |
270 | 274 |
271 } // namespace content | 275 } // namespace content |
OLD | NEW |