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

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

Issue 554743009: remove main_render_frame(), use GetMainRenderFrame() instead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 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
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 "base/time/time.h" 6 #include "base/time/time.h"
7 #include "content/common/frame_messages.h" 7 #include "content/common/frame_messages.h"
8 #include "content/common/view_message_enums.h" 8 #include "content/common/view_message_enums.h"
9 #include "content/public/test/render_view_test.h" 9 #include "content/public/test/render_view_test.h"
10 #include "content/renderer/accessibility/renderer_accessibility_complete.h" 10 #include "content/renderer/accessibility/renderer_accessibility_complete.h"
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 // Post a "value changed" event, but then swap out 318 // Post a "value changed" event, but then swap out
319 // before sending it. It shouldn't send the event while 319 // before sending it. It shouldn't send the event while
320 // swapped out. 320 // swapped out.
321 sink_->ClearMessages(); 321 sink_->ClearMessages();
322 WebDocument document = view()->GetWebView()->mainFrame()->document(); 322 WebDocument document = view()->GetWebView()->mainFrame()->document();
323 WebAXObject root_obj = document.accessibilityObject(); 323 WebAXObject root_obj = document.accessibilityObject();
324 accessibility->HandleAXEvent( 324 accessibility->HandleAXEvent(
325 root_obj, 325 root_obj,
326 ui::AX_EVENT_VALUE_CHANGED); 326 ui::AX_EVENT_VALUE_CHANGED);
327 view()->main_render_frame()->OnSwapOut(kProxyRoutingId); 327 view()->GetMainRenderFrame()->OnSwapOut(kProxyRoutingId);
328 accessibility->SendPendingAccessibilityEvents(); 328 accessibility->SendPendingAccessibilityEvents();
329 EXPECT_FALSE(sink_->GetUniqueMessageMatching( 329 EXPECT_FALSE(sink_->GetUniqueMessageMatching(
330 AccessibilityHostMsg_Events::ID)); 330 AccessibilityHostMsg_Events::ID));
331 331
332 // Navigate, so we're not swapped out anymore. Now we should 332 // Navigate, so we're not swapped out anymore. Now we should
333 // send accessibility events again. Note that the 333 // send accessibility events again. Note that the
334 // message that was queued up before will be quickly discarded 334 // message that was queued up before will be quickly discarded
335 // because the element it was referring to no longer exists, 335 // because the element it was referring to no longer exists,
336 // so the event here is from loading this new page. 336 // so the event here is from loading this new page.
337 FrameMsg_Navigate_Params nav_params; 337 FrameMsg_Navigate_Params nav_params;
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 548
549 const IPC::Message* message = 549 const IPC::Message* message =
550 sink_->GetUniqueMessageMatching(AccessibilityHostMsg_Events::ID); 550 sink_->GetUniqueMessageMatching(AccessibilityHostMsg_Events::ID);
551 ASSERT_TRUE(message); 551 ASSERT_TRUE(message);
552 Tuple1<std::vector<AccessibilityHostMsg_EventParams> > param; 552 Tuple1<std::vector<AccessibilityHostMsg_EventParams> > param;
553 AccessibilityHostMsg_Events::Read(message, &param); 553 AccessibilityHostMsg_Events::Read(message, &param);
554 ASSERT_EQ(0U, param.a.size()); 554 ASSERT_EQ(0U, param.a.size());
555 } 555 }
556 556
557 } // namespace content 557 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | content/renderer/external_popup_menu_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698