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

Side by Side Diff: content/browser/renderer_host/render_view_host_unittest.cc

Issue 2505113002: Drag-and-drop: Target drag messages to specific RenderWidgets. (Closed)
Patch Set: Small fix. Created 4 years, 1 month 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/browser/child_process_security_policy_impl.h" 10 #include "content/browser/child_process_security_policy_impl.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 94
95 class MockDraggingRenderViewHostDelegateView 95 class MockDraggingRenderViewHostDelegateView
96 : public RenderViewHostDelegateView { 96 : public RenderViewHostDelegateView {
97 public: 97 public:
98 ~MockDraggingRenderViewHostDelegateView() override {} 98 ~MockDraggingRenderViewHostDelegateView() override {}
99 void StartDragging(const DropData& drop_data, 99 void StartDragging(const DropData& drop_data,
100 blink::WebDragOperationsMask allowed_ops, 100 blink::WebDragOperationsMask allowed_ops,
101 const gfx::ImageSkia& image, 101 const gfx::ImageSkia& image,
102 const gfx::Vector2d& image_offset, 102 const gfx::Vector2d& image_offset,
103 const DragEventSourceInfo& event_info) override { 103 const DragEventSourceInfo& event_info,
104 RenderWidgetHostImpl* source_rwh) override {
104 drag_url_ = drop_data.url; 105 drag_url_ = drop_data.url;
105 html_base_url_ = drop_data.html_base_url; 106 html_base_url_ = drop_data.html_base_url;
106 } 107 }
107 void UpdateDragCursor(blink::WebDragOperation operation) override {} 108 void UpdateDragCursor(blink::WebDragOperation operation) override {}
108 void GotFocus() override {} 109 void GotFocus() override {}
109 void TakeFocus(bool reverse) override {} 110 void TakeFocus(bool reverse) override {}
110 virtual void UpdatePreferredSize(const gfx::Size& pref_size) {} 111 virtual void UpdatePreferredSize(const gfx::Size& pref_size) {}
111 112
112 GURL drag_url() { 113 GURL drag_url() {
113 return drag_url_; 114 return drag_url_;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 const std::string data_url = "data:image/gif;base64," 306 const std::string data_url = "data:image/gif;base64,"
306 "R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="; 307 "R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=";
307 308
308 tester->Reset(); 309 tester->Reset();
309 tester->Test(data_url); 310 tester->Test(data_url);
310 EXPECT_EQ(tester->UrlString(), data_url); 311 EXPECT_EQ(tester->UrlString(), data_url);
311 EXPECT_TRUE(tester->IsDownloaded()); 312 EXPECT_TRUE(tester->IsDownloaded());
312 } 313 }
313 314
314 } // namespace content 315 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698