| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
| 8 #include "base/stl_util-inl.h" | 8 #include "base/stl_util-inl.h" |
| 9 #include "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
| 10 #include "remoting/base/multiple_array_input_stream.h" | |
| 11 #include "remoting/proto/internal.pb.h" | 10 #include "remoting/proto/internal.pb.h" |
| 12 #include "remoting/protocol/message_decoder.h" | 11 #include "remoting/protocol/message_decoder.h" |
| 13 #include "remoting/protocol/util.h" | 12 #include "remoting/protocol/util.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 14 |
| 16 namespace remoting { | 15 namespace remoting { |
| 17 | 16 |
| 18 static const int kTestKey = 142; | 17 static const int kTestKey = 142; |
| 19 | 18 |
| 20 static void AppendMessage(const ChromotingClientMessage& msg, | 19 static void AppendMessage(const ChromotingClientMessage& msg, |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 const int kReads[] = {50, 50, 5}; | 100 const int kReads[] = {50, 50, 5}; |
| 102 SimulateReadSequence(kReads, arraysize(kReads)); | 101 SimulateReadSequence(kReads, arraysize(kReads)); |
| 103 } | 102 } |
| 104 | 103 |
| 105 TEST(MessageDecoderTest, EmptyReads) { | 104 TEST(MessageDecoderTest, EmptyReads) { |
| 106 const int kReads[] = {4, 0, 50, 0}; | 105 const int kReads[] = {4, 0, 50, 0}; |
| 107 SimulateReadSequence(kReads, arraysize(kReads)); | 106 SimulateReadSequence(kReads, arraysize(kReads)); |
| 108 } | 107 } |
| 109 | 108 |
| 110 } // namespace remoting | 109 } // namespace remoting |
| OLD | NEW |