Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: content/renderer/accessibility/render_accessibility_impl_browsertest.cc

Issue 2341503002: Fix race condition causing DCHECK(ack_pending_) to trip. (Closed)
Patch Set: Update test Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/accessibility/render_accessibility_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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, &param); 79 AccessibilityHostMsg_Events::Read(message, &param);
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(&param_list); 86 GetAllAccEvents(&param_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
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
OLDNEW
« no previous file with comments | « content/renderer/accessibility/render_accessibility_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698