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

Unified Diff: net/websockets/websocket_deflate_predictor_impl_test.cc

Issue 39193005: Introduce WebSocketDeflatePredictor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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
Index: net/websockets/websocket_deflate_predictor_impl_test.cc
diff --git a/net/websockets/websocket_deflate_predictor_impl_test.cc b/net/websockets/websocket_deflate_predictor_impl_test.cc
new file mode 100644
index 0000000000000000000000000000000000000000..94a023f8450ce5097ed51c1afdd3565eacc68108
--- /dev/null
+++ b/net/websockets/websocket_deflate_predictor_impl_test.cc
@@ -0,0 +1,29 @@
+// 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 "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
+#include "net/websockets/websocket_deflate_predictor_impl.h"
+#include "net/websockets/websocket_frame.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace net {
+
+namespace {
+
+typedef WebSocketDeflatePredictor::Result Result;
+
+TEST(WebSocketDeflatePredictorImpl, Predict) {
+ WebSocketDeflatePredictorImpl predictor;
+ ScopedVector<WebSocketFrame> frames;
+ frames.push_back(new WebSocketFrame(WebSocketFrameHeader::kOpCodeText));
+ Result result = predictor.Predict(frames, 0);
+
+ ASSERT_EQ(WebSocketDeflatePredictor::DEFLATE, result);
+}
+
+} // namespace
+
+} // namespace net

Powered by Google App Engine
This is Rietveld 408576698