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 "base/path_service.h" | 5 #include "base/path_service.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "content/browser/child_process_security_policy_impl.h" | 7 #include "content/browser/child_process_security_policy_impl.h" |
8 #include "content/browser/frame_host/render_frame_host_impl.h" | 8 #include "content/browser/frame_host/render_frame_host_impl.h" |
9 #include "content/common/input_messages.h" | 9 #include "content/common/input_messages.h" |
10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 : public RenderViewHostDelegateView { | 116 : public RenderViewHostDelegateView { |
117 public: | 117 public: |
118 virtual ~MockDraggingRenderViewHostDelegateView() {} | 118 virtual ~MockDraggingRenderViewHostDelegateView() {} |
119 virtual void ShowPopupMenu(const gfx::Rect& bounds, | 119 virtual void ShowPopupMenu(const gfx::Rect& bounds, |
120 int item_height, | 120 int item_height, |
121 double item_font_size, | 121 double item_font_size, |
122 int selected_item, | 122 int selected_item, |
123 const std::vector<MenuItem>& items, | 123 const std::vector<MenuItem>& items, |
124 bool right_aligned, | 124 bool right_aligned, |
125 bool allow_multiple_selection) OVERRIDE {} | 125 bool allow_multiple_selection) OVERRIDE {} |
| 126 virtual void HidePopupMenu() OVERRIDE {} |
126 virtual void StartDragging(const DropData& drop_data, | 127 virtual void StartDragging(const DropData& drop_data, |
127 blink::WebDragOperationsMask allowed_ops, | 128 blink::WebDragOperationsMask allowed_ops, |
128 const gfx::ImageSkia& image, | 129 const gfx::ImageSkia& image, |
129 const gfx::Vector2d& image_offset, | 130 const gfx::Vector2d& image_offset, |
130 const DragEventSourceInfo& event_info) OVERRIDE { | 131 const DragEventSourceInfo& event_info) OVERRIDE { |
131 drag_url_ = drop_data.url; | 132 drag_url_ = drop_data.url; |
132 html_base_url_ = drop_data.html_base_url; | 133 html_base_url_ = drop_data.html_base_url; |
133 } | 134 } |
134 virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE {} | 135 virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE {} |
135 virtual void GotFocus() OVERRIDE {} | 136 virtual void GotFocus() OVERRIDE {} |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 } | 288 } |
288 | 289 |
289 TEST_F(RenderViewHostTest, RoutingIdSane) { | 290 TEST_F(RenderViewHostTest, RoutingIdSane) { |
290 RenderFrameHostImpl* root_rfh = | 291 RenderFrameHostImpl* root_rfh = |
291 contents()->GetFrameTree()->root()->current_frame_host(); | 292 contents()->GetFrameTree()->root()->current_frame_host(); |
292 EXPECT_EQ(test_rvh()->GetProcess(), root_rfh->GetProcess()); | 293 EXPECT_EQ(test_rvh()->GetProcess(), root_rfh->GetProcess()); |
293 EXPECT_NE(test_rvh()->GetRoutingID(), root_rfh->routing_id()); | 294 EXPECT_NE(test_rvh()->GetRoutingID(), root_rfh->routing_id()); |
294 } | 295 } |
295 | 296 |
296 } // namespace content | 297 } // namespace content |
OLD | NEW |