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

Unified Diff: blimp/net/engine_auth_handler_unittest.cc

Issue 1492643003: [Blimp Net] Add EngineAuthHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« blimp/net/engine_auth_handler.cc ('K') | « blimp/net/engine_auth_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/engine_auth_handler_unittest.cc
diff --git a/blimp/net/engine_auth_handler_unittest.cc b/blimp/net/engine_auth_handler_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bf7a4ee83b8ca3871fa23309b941e985d66e35ab
--- /dev/null
+++ b/blimp/net/engine_auth_handler_unittest.cc
@@ -0,0 +1,53 @@
+// Copyright 2015 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 <stddef.h>
+#include <string>
+
+#include "base/callback_helpers.h"
+#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
+#include "blimp/net/blimp_connection.h"
+#include "blimp/net/blimp_transport.h"
+#include "blimp/net/common.h"
+#include "blimp/net/connection_error_observer.h"
+#include "blimp/net/engine_auth_handler.h"
+#include "blimp/net/test_common.h"
+#include "net/base/completion_callback.h"
+#include "net/base/net_errors.h"
+#include "net/base/test_completion_callback.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+using testing::_;
+using testing::Eq;
+using testing::Return;
+using testing::SaveArg;
+
+namespace blimp {
+
+class EngineAuthHandlerTest : public testing::Test {
+ public:
+ EngineAuthHandlerTest()
+ : handler_(new EngineAuthHandler(&connection_handler_)) {}
+
+ ~EngineAuthHandlerTest() override {}
+
+ scoped_ptr<BlimpConnection> CreateConnection() {
+ return make_scoped_ptr(
+ new BlimpConnection(make_scoped_ptr(new MockPacketReader),
+ make_scoped_ptr(new MockPacketWriter)));
+ }
+
+ protected:
+ base::MessageLoop message_loop_;
+ testing::StrictMock<MockConnectionHandler> connection_handler_;
+ scoped_ptr<EngineAuthHandler> handler_;
+};
+
+TEST_F(EngineAuthHandlerTest, AuthenticationSucceeds) {
+ ASSERT_FALSE(false);
Wez 2015/12/04 01:35:38 Can haz test?
haibinlu 2015/12/04 02:50:41 I'll finish the test once Kevin lands the CL to ma
+}
+
+} // namespace blimp
« blimp/net/engine_auth_handler.cc ('K') | « blimp/net/engine_auth_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698