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

Unified Diff: net/websockets/websocket_net_log_params_test.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/websockets/websocket_net_log_params.cc ('k') | net/websockets/websocket_throttle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_net_log_params_test.cc
diff --git a/net/websockets/websocket_net_log_params_test.cc b/net/websockets/websocket_net_log_params_test.cc
deleted file mode 100644
index d6d2a0d3ff536c11bd07f777c163658ac9583def..0000000000000000000000000000000000000000
--- a/net/websockets/websocket_net_log_params_test.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/websockets/websocket_net_log_params.h"
-
-#include <string>
-
-#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/values.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-TEST(NetLogWebSocketHandshakeParameterTest, ToValue) {
- base::ListValue* list = new base::ListValue();
- list->Append(new base::StringValue("GET /demo HTTP/1.1"));
- list->Append(new base::StringValue("Host: example.com"));
- list->Append(new base::StringValue("Connection: Upgrade"));
- list->Append(new base::StringValue("Sec-WebSocket-Key2: 12998 5 Y3 1 .P00"));
- list->Append(new base::StringValue("Sec-WebSocket-Protocol: sample"));
- list->Append(new base::StringValue("Upgrade: WebSocket"));
- list->Append(new base::StringValue(
- "Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5"));
- list->Append(new base::StringValue("Origin: http://example.com"));
- list->Append(new base::StringValue(std::string()));
- list->Append(new base::StringValue(
- "\\x00\\x01\\x0a\\x0d\\xff\\xfe\\x0d\\x0a"));
-
- base::DictionaryValue expected;
- expected.Set("headers", list);
-
- const std::string key("\x00\x01\x0a\x0d\xff\xfe\x0d\x0a", 8);
- const std::string testInput =
- "GET /demo HTTP/1.1\r\n"
- "Host: example.com\r\n"
- "Connection: Upgrade\r\n"
- "Sec-WebSocket-Key2: 12998 5 Y3 1 .P00\r\n"
- "Sec-WebSocket-Protocol: sample\r\n"
- "Upgrade: WebSocket\r\n"
- "Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5\r\n"
- "Origin: http://example.com\r\n"
- "\r\n" +
- key;
-
- scoped_ptr<base::Value> actual(
- net::NetLogWebSocketHandshakeCallback(&testInput,
- net::NetLog::LOG_ALL));
-
- EXPECT_TRUE(expected.Equals(actual.get()));
-}
« no previous file with comments | « net/websockets/websocket_net_log_params.cc ('k') | net/websockets/websocket_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698