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

Unified Diff: blimp/net/browser_connection_handler_unittest.cc

Issue 1933053003: Used oneof in blimp_message.proto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 4 years, 7 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 | « blimp/net/browser_connection_handler.cc ('k') | blimp/net/engine_authentication_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/browser_connection_handler_unittest.cc
diff --git a/blimp/net/browser_connection_handler_unittest.cc b/blimp/net/browser_connection_handler_unittest.cc
index 2c539492ba8b3f0127321e7925721c2f8a0aff1f..2f0c809162c99348e47f1a0f5c86cf64a773d668 100644
--- a/blimp/net/browser_connection_handler_unittest.cc
+++ b/blimp/net/browser_connection_handler_unittest.cc
@@ -48,10 +48,10 @@ MATCHER_P(EqualsMessageIgnoringId, message, "") {
class FakeFeature {
public:
- FakeFeature(BlimpMessage::Type type,
+ FakeFeature(BlimpMessage::FeatureCase feature_case,
BrowserConnectionHandler* connection_handler) {
- outgoing_message_processor_ =
- connection_handler->RegisterFeature(type, &incoming_message_processor_);
+ outgoing_message_processor_ = connection_handler->RegisterFeature(
+ feature_case, &incoming_message_processor_);
}
~FakeFeature() {}
@@ -113,14 +113,14 @@ class FakeBlimpConnection : public BlimpConnection,
std::unique_ptr<BlimpMessage> CreateInputMessage(int tab_id) {
std::unique_ptr<BlimpMessage> output(new BlimpMessage);
- output->set_type(BlimpMessage::INPUT);
+ output->mutable_input();
output->set_target_tab_id(tab_id);
return output;
}
std::unique_ptr<BlimpMessage> CreateControlMessage(int tab_id) {
std::unique_ptr<BlimpMessage> output(new BlimpMessage);
- output->set_type(BlimpMessage::TAB_CONTROL);
+ output->mutable_tab_control();
output->set_target_tab_id(tab_id);
return output;
}
@@ -132,14 +132,14 @@ class BrowserConnectionHandlerTest : public testing::Test {
engine_connection_handler_(new BrowserConnectionHandler) {
SetupConnections();
- client_input_feature_.reset(
- new FakeFeature(BlimpMessage::INPUT, client_connection_handler_.get()));
- engine_input_feature_.reset(
- new FakeFeature(BlimpMessage::INPUT, engine_connection_handler_.get()));
+ client_input_feature_.reset(new FakeFeature(
+ BlimpMessage::kInput, client_connection_handler_.get()));
+ engine_input_feature_.reset(new FakeFeature(
+ BlimpMessage::kInput, engine_connection_handler_.get()));
client_control_feature_.reset(new FakeFeature(
- BlimpMessage::TAB_CONTROL, client_connection_handler_.get()));
+ BlimpMessage::kTabControl, client_connection_handler_.get()));
engine_control_feature_.reset(new FakeFeature(
- BlimpMessage::TAB_CONTROL, engine_connection_handler_.get()));
+ BlimpMessage::kTabControl, engine_connection_handler_.get()));
}
~BrowserConnectionHandlerTest() override {}
« no previous file with comments | « blimp/net/browser_connection_handler.cc ('k') | blimp/net/engine_authentication_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698