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

Unified Diff: content/browser/renderer_host/websocket_dispatcher_host_unittest.cc

Issue 2003253002: [Devtools] Allow User-Agent header override for Websockets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/bad_message.h ('k') | content/browser/renderer_host/websocket_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/websocket_dispatcher_host_unittest.cc
diff --git a/content/browser/renderer_host/websocket_dispatcher_host_unittest.cc b/content/browser/renderer_host/websocket_dispatcher_host_unittest.cc
index d00d43f36f4392614a195da6af1a867de50d1c70..4544838b1b9b7e87014289e19d84fd61dccfc0d0 100644
--- a/content/browser/renderer_host/websocket_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/websocket_dispatcher_host_unittest.cc
@@ -129,6 +129,7 @@ class WebSocketDispatcherHostTest : public ::testing::Test {
socket_url,
requested_protocols,
origin,
+ "",
render_frame_id);
if (!dispatcher_host_->OnMessageReceived(message))
return false;
@@ -151,6 +152,7 @@ class WebSocketDispatcherHostTest : public ::testing::Test {
socket_url,
requested_protocols,
origin,
+ "",
render_frame_id);
if (!dispatcher_host_->OnMessageReceived(messageAddChannelRequest))
return false;
@@ -226,7 +228,7 @@ TEST_F(WebSocketDispatcherHostTest, AddChannelRequest) {
url::Origin origin(GURL("http://example.com"));
int render_frame_id = -2;
WebSocketHostMsg_AddChannelRequest message(
- routing_id, socket_url, requested_protocols, origin, render_frame_id);
+ routing_id, socket_url, requested_protocols, origin, "", render_frame_id);
ASSERT_TRUE(dispatcher_host_->OnMessageReceived(message));
@@ -260,7 +262,7 @@ TEST_F(WebSocketDispatcherHostTest, SendFrame) {
url::Origin origin(GURL("http://example.com"));
int render_frame_id = -2;
WebSocketHostMsg_AddChannelRequest add_channel_message(
- routing_id, socket_url, requested_protocols, origin, render_frame_id);
+ routing_id, socket_url, requested_protocols, origin, "", render_frame_id);
ASSERT_TRUE(dispatcher_host_->OnMessageReceived(add_channel_message));
@@ -289,10 +291,10 @@ TEST_F(WebSocketDispatcherHostTest, SendFrame) {
TEST_F(WebSocketDispatcherHostTest, Destruct) {
WebSocketHostMsg_AddChannelRequest message1(
123, GURL("ws://example.com/test"), std::vector<std::string>(),
- url::Origin(GURL("http://example.com")), -1);
+ url::Origin(GURL("http://example.com")), "", -1);
WebSocketHostMsg_AddChannelRequest message2(
456, GURL("ws://example.com/test2"), std::vector<std::string>(),
- url::Origin(GURL("http://example.com")), -1);
+ url::Origin(GURL("http://example.com")), "", -1);
ASSERT_TRUE(dispatcher_host_->OnMessageReceived(message1));
ASSERT_TRUE(dispatcher_host_->OnMessageReceived(message2));
@@ -419,7 +421,7 @@ TEST_F(WebSocketDispatcherHostTest, InvalidScheme) {
url::Origin origin(GURL("http://example.com"));
int render_frame_id = -2;
WebSocketHostMsg_AddChannelRequest message(
- routing_id, socket_url, requested_protocols, origin, render_frame_id);
+ routing_id, socket_url, requested_protocols, origin, "", render_frame_id);
ASSERT_TRUE(dispatcher_host_->OnMessageReceived(message));
« no previous file with comments | « content/browser/bad_message.h ('k') | content/browser/renderer_host/websocket_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698