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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 void SetMode(AccessibilityMode mode) { | 69 void SetMode(AccessibilityMode mode) { |
70 frame()->OnSetAccessibilityMode(mode); | 70 frame()->OnSetAccessibilityMode(mode); |
71 } | 71 } |
72 | 72 |
73 void GetAllAccEvents( | 73 void GetAllAccEvents( |
74 std::vector<AccessibilityHostMsg_EventParams>* param_list) { | 74 std::vector<AccessibilityHostMsg_EventParams>* param_list) { |
75 const IPC::Message* message = | 75 const IPC::Message* message = |
76 sink_->GetUniqueMessageMatching(AccessibilityHostMsg_Events::ID); | 76 sink_->GetUniqueMessageMatching(AccessibilityHostMsg_Events::ID); |
77 ASSERT_TRUE(message); | 77 ASSERT_TRUE(message); |
78 std::tuple<std::vector<AccessibilityHostMsg_EventParams>, int> param; | 78 std::tuple<std::vector<AccessibilityHostMsg_EventParams>, int, int> param; |
79 AccessibilityHostMsg_Events::Read(message, ¶m); | 79 AccessibilityHostMsg_Events::Read(message, ¶m); |
80 *param_list = std::get<0>(param); | 80 *param_list = std::get<0>(param); |
81 } | 81 } |
82 | 82 |
83 void GetLastAccEvent( | 83 void GetLastAccEvent( |
84 AccessibilityHostMsg_EventParams* params) { | 84 AccessibilityHostMsg_EventParams* params) { |
85 std::vector<AccessibilityHostMsg_EventParams> param_list; | 85 std::vector<AccessibilityHostMsg_EventParams> param_list; |
86 GetAllAccEvents(¶m_list); | 86 GetAllAccEvents(¶m_list); |
87 ASSERT_GE(param_list.size(), 1U); | 87 ASSERT_GE(param_list.size(), 1U); |
88 *params = param_list[0]; | 88 *params = param_list[0]; |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 GetLastAccEvent(&event); | 333 GetLastAccEvent(&event); |
334 ASSERT_EQ(5U, event.update.nodes.size()); | 334 ASSERT_EQ(5U, event.update.nodes.size()); |
335 | 335 |
336 EXPECT_EQ(body.axID(), event.update.nodes[0].id); | 336 EXPECT_EQ(body.axID(), event.update.nodes[0].id); |
337 EXPECT_EQ(text_1.axID(), event.update.nodes[1].id); | 337 EXPECT_EQ(text_1.axID(), event.update.nodes[1].id); |
338 // The third event is to update text_2, but its id changes | 338 // The third event is to update text_2, but its id changes |
339 // so we don't have a test expectation for it. | 339 // so we don't have a test expectation for it. |
340 } | 340 } |
341 | 341 |
342 } // namespace content | 342 } // namespace content |
OLD | NEW |