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

Side by Side Diff: content/renderer/external_popup_menu_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/public/test/render_view_test.h" 7 #include "content/public/test/render_view_test.h"
8 #include "content/renderer/render_frame_impl.h" 8 #include "content/renderer/render_frame_impl.h"
9 #include "content/renderer/render_view_impl.h" 9 #include "content/renderer/render_view_impl.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 12 matching lines...) Expand all
23 23
24 class ExternalPopupMenuTest : public RenderViewTest { 24 class ExternalPopupMenuTest : public RenderViewTest {
25 public: 25 public:
26 ExternalPopupMenuTest() {} 26 ExternalPopupMenuTest() {}
27 27
28 RenderViewImpl* view() { 28 RenderViewImpl* view() {
29 return static_cast<RenderViewImpl*>(view_); 29 return static_cast<RenderViewImpl*>(view_);
30 } 30 }
31 31
32 RenderFrameImpl* frame() { 32 RenderFrameImpl* frame() {
33 return view()->main_render_frame(); 33 return view()->GetMainRenderFrame();
34 } 34 }
35 35
36 virtual void SetUp() { 36 virtual void SetUp() {
37 RenderViewTest::SetUp(); 37 RenderViewTest::SetUp();
38 // We need to set this explictly as RenderMain is not run. 38 // We need to set this explictly as RenderMain is not run.
39 blink::WebView::setUseExternalPopupMenus(true); 39 blink::WebView::setUseExternalPopupMenus(true);
40 40
41 std::string html = "<select id='mySelect' onchange='selectChanged(this)'>" 41 std::string html = "<select id='mySelect' onchange='selectChanged(this)'>"
42 " <option>zero</option>" 42 " <option>zero</option>"
43 " <option selected='1'>one</option>" 43 " <option selected='1'>one</option>"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 ASSERT_EQ(5U, param.a.popup_items.size()); 196 ASSERT_EQ(5U, param.a.popup_items.size());
197 197
198 // Select index 1 item. This should select item with index 2, 198 // Select index 1 item. This should select item with index 2,
199 // skipping the item with 'display: none' 199 // skipping the item with 'display: none'
200 frame()->OnSelectPopupMenuItem(1); 200 frame()->OnSelectPopupMenuItem(1);
201 201
202 EXPECT_EQ(2, GetSelectedIndex()); 202 EXPECT_EQ(2, GetSelectedIndex());
203 } 203 }
204 204
205 } // namespace content 205 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/accessibility/renderer_accessibility_browsertest.cc ('k') | content/renderer/history_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698