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

Unified Diff: components/cast_channel/cast_framer_unittest.cc

Issue 2913033003: [cast_channel] Move cast_channel related files from //extensions to //components (Closed)
Patch Set: fix buildbot compile errors Created 3 years, 6 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
« no previous file with comments | « components/cast_channel/cast_framer.cc ('k') | components/cast_channel/cast_message_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cast_channel/cast_framer_unittest.cc
diff --git a/extensions/browser/api/cast_channel/cast_framer_unittest.cc b/components/cast_channel/cast_framer_unittest.cc
similarity index 90%
rename from extensions/browser/api/cast_channel/cast_framer_unittest.cc
rename to components/cast_channel/cast_framer_unittest.cc
index 87c76e4eeec11e185bb459530b4286c07758bc88..660e074b5fdc855092f231d282649d50933581d2 100644
--- a/extensions/browser/api/cast_channel/cast_framer_unittest.cc
+++ b/components/cast_channel/cast_framer_unittest.cc
@@ -2,18 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "extensions/browser/api/cast_channel/cast_framer.h"
+#include "components/cast_channel/cast_framer.h"
#include <stddef.h>
#include <algorithm>
#include <string>
-#include "extensions/common/api/cast_channel/cast_channel.pb.h"
+#include "components/cast_channel/proto/cast_channel.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace extensions {
-namespace api {
namespace cast_channel {
using ::cast_channel::ChannelError;
@@ -115,12 +113,10 @@ TEST_F(CastFramerTest, TestUnparsableBodyProto) {
// Message header is OK, but the body is replaced with "x"en.
std::string mangled_cast_message = cast_message_str_;
for (size_t i = MessageFramer::MessageHeader::header_size();
- i < mangled_cast_message.size();
- ++i) {
+ i < mangled_cast_message.size(); ++i) {
std::fill(mangled_cast_message.begin() +
MessageFramer::MessageHeader::header_size(),
- mangled_cast_message.end(),
- 'x');
+ mangled_cast_message.end(), 'x');
}
WriteToBuffer(mangled_cast_message);
@@ -134,10 +130,9 @@ TEST_F(CastFramerTest, TestUnparsableBodyProto) {
// Send body, expect an error.
std::unique_ptr<CastMessage> message;
- EXPECT_EQ(nullptr, framer_->Ingest(framer_->BytesRequested(), &message_length,
- &error).get());
+ EXPECT_EQ(nullptr,
+ framer_->Ingest(framer_->BytesRequested(), &message_length, &error)
+ .get());
EXPECT_EQ(ChannelError::INVALID_MESSAGE, error);
}
} // namespace cast_channel
-} // namespace api
-} // namespace extensions
« no previous file with comments | « components/cast_channel/cast_framer.cc ('k') | components/cast_channel/cast_message_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698