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

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: Added oneof to protocol_control.proto 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
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..cc4715583c6f04c8acd40d0115373658b0bd8c8d 100644
--- a/blimp/net/browser_connection_handler_unittest.cc
+++ b/blimp/net/browser_connection_handler_unittest.cc
@@ -48,7 +48,7 @@ MATCHER_P(EqualsMessageIgnoringId, message, "") {
class FakeFeature {
public:
- FakeFeature(BlimpMessage::Type type,
+ FakeFeature(BlimpMessage::FeatureCase type,
Kevin M 2016/05/20 18:28:16 update param name
shaktisahu 2016/05/20 22:29:42 Done.
BrowserConnectionHandler* connection_handler) {
outgoing_message_processor_ =
connection_handler->RegisterFeature(type, &incoming_message_processor_);
@@ -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 {}

Powered by Google App Engine
This is Rietveld 408576698