Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include <stddef.h> | |
| 6 #include <string> | |
| 7 | |
| 8 #include "base/callback_helpers.h" | |
| 9 #include "base/message_loop/message_loop.h" | |
| 10 #include "base/run_loop.h" | |
| 11 #include "blimp/net/blimp_connection.h" | |
| 12 #include "blimp/net/blimp_transport.h" | |
| 13 #include "blimp/net/common.h" | |
| 14 #include "blimp/net/connection_error_observer.h" | |
| 15 #include "blimp/net/engine_auth_handler.h" | |
| 16 #include "blimp/net/test_common.h" | |
| 17 #include "net/base/completion_callback.h" | |
| 18 #include "net/base/net_errors.h" | |
| 19 #include "net/base/test_completion_callback.h" | |
| 20 #include "testing/gmock/include/gmock/gmock.h" | |
| 21 #include "testing/gtest/include/gtest/gtest.h" | |
| 22 | |
| 23 using testing::_; | |
| 24 using testing::Eq; | |
| 25 using testing::Return; | |
| 26 using testing::SaveArg; | |
| 27 | |
| 28 namespace blimp { | |
| 29 | |
| 30 class EngineAuthHandlerTest : public testing::Test { | |
| 31 public: | |
| 32 EngineAuthHandlerTest() | |
| 33 : handler_(new EngineAuthHandler(&connection_handler_)) {} | |
| 34 | |
| 35 ~EngineAuthHandlerTest() override {} | |
| 36 | |
| 37 scoped_ptr<BlimpConnection> CreateConnection() { | |
| 38 return make_scoped_ptr( | |
| 39 new BlimpConnection(make_scoped_ptr(new MockPacketReader), | |
| 40 make_scoped_ptr(new MockPacketWriter))); | |
| 41 } | |
| 42 | |
| 43 protected: | |
| 44 base::MessageLoop message_loop_; | |
| 45 testing::StrictMock<MockConnectionHandler> connection_handler_; | |
| 46 scoped_ptr<EngineAuthHandler> handler_; | |
| 47 }; | |
| 48 | |
| 49 TEST_F(EngineAuthHandlerTest, AuthenticationSucceeds) { | |
| 50 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
| |
| 51 } | |
| 52 | |
| 53 } // namespace blimp | |
| OLD | NEW |