| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/api/cast_channel/cast_framer.h" | 5 #include "extensions/browser/api/cast_channel/cast_framer.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include <algorithm> | 9 #include <algorithm> |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 10 #include "extensions/common/api/cast_channel/cast_channel.pb.h" | 12 #include "extensions/common/api/cast_channel/cast_channel.pb.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 14 |
| 13 namespace extensions { | 15 namespace extensions { |
| 14 namespace api { | 16 namespace api { |
| 15 namespace cast_channel { | 17 namespace cast_channel { |
| 16 class CastFramerTest : public testing::Test { | 18 class CastFramerTest : public testing::Test { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 131 |
| 130 // Send body, expect an error. | 132 // Send body, expect an error. |
| 131 scoped_ptr<CastMessage> message; | 133 scoped_ptr<CastMessage> message; |
| 132 EXPECT_EQ(nullptr, framer_->Ingest(framer_->BytesRequested(), &message_length, | 134 EXPECT_EQ(nullptr, framer_->Ingest(framer_->BytesRequested(), &message_length, |
| 133 &error).get()); | 135 &error).get()); |
| 134 EXPECT_EQ(cast_channel::CHANNEL_ERROR_INVALID_MESSAGE, error); | 136 EXPECT_EQ(cast_channel::CHANNEL_ERROR_INVALID_MESSAGE, error); |
| 135 } | 137 } |
| 136 } // namespace cast_channel | 138 } // namespace cast_channel |
| 137 } // namespace api | 139 } // namespace api |
| 138 } // namespace extensions | 140 } // namespace extensions |
| OLD | NEW |