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

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

Issue 281663002: Create RenderFrameProxyHost at time of swap-out instead of commit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review Created 6 years, 7 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 | Annotate | Revision Log
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 "base/strings/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
6 #include "content/common/frame_messages.h" 6 #include "content/common/frame_messages.h"
7 #include "content/common/view_message_enums.h" 7 #include "content/common/view_message_enums.h"
8 #include "content/public/test/render_view_test.h" 8 #include "content/public/test/render_view_test.h"
9 #include "content/renderer/accessibility/renderer_accessibility_complete.h" 9 #include "content/renderer/accessibility/renderer_accessibility_complete.h"
10 #include "content/renderer/render_view_impl.h" 10 #include "content/renderer/render_view_impl.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 // Post a "value changed" event, but then swap out 315 // Post a "value changed" event, but then swap out
316 // before sending it. It shouldn't send the event while 316 // before sending it. It shouldn't send the event while
317 // swapped out. 317 // swapped out.
318 sink_->ClearMessages(); 318 sink_->ClearMessages();
319 WebDocument document = view()->GetWebView()->mainFrame()->document(); 319 WebDocument document = view()->GetWebView()->mainFrame()->document();
320 WebAXObject root_obj = document.accessibilityObject(); 320 WebAXObject root_obj = document.accessibilityObject();
321 accessibility->HandleAXEvent( 321 accessibility->HandleAXEvent(
322 root_obj, 322 root_obj,
323 ui::AX_EVENT_VALUE_CHANGED); 323 ui::AX_EVENT_VALUE_CHANGED);
324 view()->main_render_frame()->OnSwapOut(); 324 view()->main_render_frame()->OnSwapOut(MSG_ROUTING_NONE);
325 accessibility->SendPendingAccessibilityEvents(); 325 accessibility->SendPendingAccessibilityEvents();
326 EXPECT_FALSE(sink_->GetUniqueMessageMatching( 326 EXPECT_FALSE(sink_->GetUniqueMessageMatching(
327 AccessibilityHostMsg_Events::ID)); 327 AccessibilityHostMsg_Events::ID));
328 328
329 // Navigate, so we're not swapped out anymore. Now we should 329 // Navigate, so we're not swapped out anymore. Now we should
330 // send accessibility events again. Note that the 330 // send accessibility events again. Note that the
331 // message that was queued up before will be quickly discarded 331 // message that was queued up before will be quickly discarded
332 // because the element it was referring to no longer exists, 332 // because the element it was referring to no longer exists,
333 // so the event here is from loading this new page. 333 // so the event here is from loading this new page.
334 FrameMsg_Navigate_Params nav_params; 334 FrameMsg_Navigate_Params nav_params;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 GetLastAccEvent(&event); 510 GetLastAccEvent(&event);
511 ASSERT_EQ(5U, event.update.nodes.size()); 511 ASSERT_EQ(5U, event.update.nodes.size());
512 512
513 EXPECT_EQ(body.axID(), event.update.nodes[0].id); 513 EXPECT_EQ(body.axID(), event.update.nodes[0].id);
514 EXPECT_EQ(text_1.axID(), event.update.nodes[1].id); 514 EXPECT_EQ(text_1.axID(), event.update.nodes[1].id);
515 // The third event is to update text_2, but its id changes 515 // The third event is to update text_2, but its id changes
516 // so we don't have a test expectation for it. 516 // so we don't have a test expectation for it.
517 } 517 }
518 518
519 } // namespace content 519 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698