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/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "content/browser/child_process_security_policy_impl.h" | 6 #include "content/browser/child_process_security_policy_impl.h" |
7 #include "content/browser/renderer_host/test_render_view_host.h" | 7 #include "content/browser/renderer_host/test_render_view_host.h" |
8 #include "content/browser/web_contents/navigation_controller_impl.h" | 8 #include "content/browser/web_contents/navigation_controller_impl.h" |
9 #include "content/browser/web_contents/test_web_contents.h" | 9 #include "content/browser/web_contents/test_web_contents.h" |
10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 rvh()->AllowBindings(content::BINDINGS_POLICY_WEB_UI); | 77 rvh()->AllowBindings(content::BINDINGS_POLICY_WEB_UI); |
78 EXPECT_FALSE(rvh()->GetEnabledBindings() & content::BINDINGS_POLICY_WEB_UI); | 78 EXPECT_FALSE(rvh()->GetEnabledBindings() & content::BINDINGS_POLICY_WEB_UI); |
79 } | 79 } |
80 | 80 |
81 class MockDraggingRenderViewHostDelegateView | 81 class MockDraggingRenderViewHostDelegateView |
82 : public content::RenderViewHostDelegateView { | 82 : public content::RenderViewHostDelegateView { |
83 public: | 83 public: |
84 virtual ~MockDraggingRenderViewHostDelegateView() {} | 84 virtual ~MockDraggingRenderViewHostDelegateView() {} |
85 virtual void ShowContextMenu( | 85 virtual void ShowContextMenu( |
86 const content::ContextMenuParams& params) OVERRIDE {} | 86 const content::ContextMenuParams& params, |
| 87 const content::ContextMenuSourceType& type) OVERRIDE {} |
87 virtual void ShowPopupMenu(const gfx::Rect& bounds, | 88 virtual void ShowPopupMenu(const gfx::Rect& bounds, |
88 int item_height, | 89 int item_height, |
89 double item_font_size, | 90 double item_font_size, |
90 int selected_item, | 91 int selected_item, |
91 const std::vector<WebMenuItem>& items, | 92 const std::vector<WebMenuItem>& items, |
92 bool right_aligned, | 93 bool right_aligned, |
93 bool allow_multiple_selection) OVERRIDE {} | 94 bool allow_multiple_selection) OVERRIDE {} |
94 virtual void StartDragging(const WebDropData& drop_data, | 95 virtual void StartDragging(const WebDropData& drop_data, |
95 WebKit::WebDragOperationsMask allowed_ops, | 96 WebKit::WebDragOperationsMask allowed_ops, |
96 const gfx::ImageSkia& image, | 97 const gfx::ImageSkia& image, |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 // the code actually expects it to have at least one int para, this this | 217 // the code actually expects it to have at least one int para, this this |
217 // bogus message will not fail at de-serialization but should fail in | 218 // bogus message will not fail at de-serialization but should fail in |
218 // OnMsgInputEventAck() processing. | 219 // OnMsgInputEventAck() processing. |
219 IPC::Message message(0, ViewHostMsg_HandleInputEvent_ACK::ID, | 220 IPC::Message message(0, ViewHostMsg_HandleInputEvent_ACK::ID, |
220 IPC::Message::PRIORITY_NORMAL); | 221 IPC::Message::PRIORITY_NORMAL); |
221 test_rvh()->OnMessageReceived(message); | 222 test_rvh()->OnMessageReceived(message); |
222 EXPECT_EQ(1, process()->bad_msg_count()); | 223 EXPECT_EQ(1, process()->bad_msg_count()); |
223 } | 224 } |
224 | 225 |
225 #endif | 226 #endif |
OLD | NEW |