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

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

Issue 9815030: Merge parts of 117417 from trunk. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
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 "content/browser/renderer_host/test_render_view_host.h" 5 #include "content/browser/renderer_host/test_render_view_host.h"
6 #include "content/browser/tab_contents/navigation_controller_impl.h" 6 #include "content/browser/tab_contents/navigation_controller_impl.h"
7 #include "content/browser/tab_contents/test_tab_contents.h" 7 #include "content/browser/tab_contents/test_tab_contents.h"
8 #include "content/common/view_messages.h" 8 #include "content/common/view_messages.h"
9 #include "content/public/browser/navigation_entry.h" 9 #include "content/public/browser/navigation_entry.h"
10 #include "content/public/common/page_transition_types.h" 10 #include "content/public/common/page_transition_types.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 TEST_F(RenderViewHostTest, StartDragging) { 111 TEST_F(RenderViewHostTest, StartDragging) {
112 TestTabContents* tab_contents = contents(); 112 TestTabContents* tab_contents = contents();
113 MockDraggingRenderViewHostDelegateView view_delegate; 113 MockDraggingRenderViewHostDelegateView view_delegate;
114 tab_contents->set_view_delegate(&view_delegate); 114 tab_contents->set_view_delegate(&view_delegate);
115 115
116 WebDropData drop_data; 116 WebDropData drop_data;
117 GURL file_url = GURL("file:///home/user/secrets.txt"); 117 GURL file_url = GURL("file:///home/user/secrets.txt");
118 drop_data.url = file_url; 118 drop_data.url = file_url;
119 drop_data.html_base_url = file_url; 119 drop_data.html_base_url = file_url;
120 rvh()->TestOnMsgStartDragging(drop_data); 120 rvh()->TestOnMsgStartDragging(drop_data);
121 EXPECT_TRUE(view_delegate.drag_url().is_empty()); 121 EXPECT_EQ(GURL("about:blank"), view_delegate.drag_url());
122 EXPECT_TRUE(view_delegate.html_base_url().is_empty()); 122 EXPECT_EQ(GURL("about:blank"), view_delegate.html_base_url());
123 123
124 GURL http_url = GURL("http://www.domain.com/index.html"); 124 GURL http_url = GURL("http://www.domain.com/index.html");
125 drop_data.url = http_url; 125 drop_data.url = http_url;
126 drop_data.html_base_url = http_url; 126 drop_data.html_base_url = http_url;
127 rvh()->TestOnMsgStartDragging(drop_data); 127 rvh()->TestOnMsgStartDragging(drop_data);
128 EXPECT_EQ(http_url, view_delegate.drag_url()); 128 EXPECT_EQ(http_url, view_delegate.drag_url());
129 EXPECT_EQ(http_url, view_delegate.html_base_url()); 129 EXPECT_EQ(http_url, view_delegate.html_base_url());
130 130
131 GURL https_url = GURL("https://www.domain.com/index.html"); 131 GURL https_url = GURL("https://www.domain.com/index.html");
132 drop_data.url = https_url; 132 drop_data.url = https_url;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // the code actually expects it to have at least one int para, this this 177 // the code actually expects it to have at least one int para, this this
178 // bogus message will not fail at de-serialization but should fail in 178 // bogus message will not fail at de-serialization but should fail in
179 // OnMsgInputEventAck() processing. 179 // OnMsgInputEventAck() processing.
180 IPC::Message message(0, ViewHostMsg_HandleInputEvent_ACK::ID, 180 IPC::Message message(0, ViewHostMsg_HandleInputEvent_ACK::ID,
181 IPC::Message::PRIORITY_NORMAL); 181 IPC::Message::PRIORITY_NORMAL);
182 rvh()->TestOnMessageReceived(message); 182 rvh()->TestOnMessageReceived(message);
183 EXPECT_EQ(1, process()->bad_msg_count()); 183 EXPECT_EQ(1, process()->bad_msg_count());
184 } 184 }
185 185
186 #endif 186 #endif
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host.cc ('k') | content/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698