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

Side by Side Diff: blimp/engine/feature/engine_render_widget_feature_unittest.cc

Issue 2370393002: Extracting placeholder information from Webkit to Blimp (Closed)
Patch Set: Observing InputMethod Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "blimp/engine/feature/engine_render_widget_feature.h" 5 #include "blimp/engine/feature/engine_render_widget_feature.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 EXPECT_CALL( 258 EXPECT_CALL(
259 *ime_message_sender_, 259 *ime_message_sender_,
260 MockableProcessMessage(BlimpImeMsgEquals(2, 1, ImeMessage::SHOW_IME, 260 MockableProcessMessage(BlimpImeMsgEquals(2, 1, ImeMessage::SHOW_IME,
261 std::string("green apple"), 1), 261 std::string("green apple"), 1),
262 _)); 262 _));
263 263
264 EXPECT_CALL( 264 EXPECT_CALL(
265 *ime_message_sender_, 265 *ime_message_sender_,
266 MockableProcessMessage(BlimpImeMsgEquals(2, ImeMessage::HIDE_IME), _)); 266 MockableProcessMessage(BlimpImeMsgEquals(2, ImeMessage::HIDE_IME), _));
267 267
268 std::string text = "green apple";
nyquist 2016/10/05 04:20:56 Should these be declared as anonymous constants? y
269 std::string placeholder = "fruit name";
nyquist 2016/10/05 04:20:56 Will we add support for passing along the placehol
270
268 feature_.OnRenderWidgetCreated(2, &render_widget_host1_); 271 feature_.OnRenderWidgetCreated(2, &render_widget_host1_);
269 feature_.SendShowImeRequest(2, &render_widget_host1_, &text_input_client_); 272 feature_.SendShowImeRequest(2, &render_widget_host1_,
273 ui::TEXT_INPUT_TYPE_TEXT, text, placeholder);
270 feature_.SendHideImeRequest(2, &render_widget_host1_); 274 feature_.SendHideImeRequest(2, &render_widget_host1_);
271 } 275 }
272 276
273 TEST_F(EngineRenderWidgetFeatureTest, DropsStaleMessages) { 277 TEST_F(EngineRenderWidgetFeatureTest, DropsStaleMessages) {
274 InSequence sequence; 278 InSequence sequence;
275 std::vector<uint8_t> payload = { 'f', 'u', 'n' }; 279 std::vector<uint8_t> payload = { 'f', 'u', 'n' };
276 std::vector<uint8_t> new_payload = {'n', 'o', ' ', 'f', 'u', 'n'}; 280 std::vector<uint8_t> new_payload = {'n', 'o', ' ', 'f', 'u', 'n'};
277 281
278 EXPECT_CALL(*render_widget_message_sender_, 282 EXPECT_CALL(*render_widget_message_sender_,
279 MockableProcessMessage( 283 MockableProcessMessage(
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 339
336 feature_.OnRenderWidgetCreated(1, &render_widget_host1_); 340 feature_.OnRenderWidgetCreated(1, &render_widget_host1_);
337 feature_.OnRenderWidgetCreated(2, &render_widget_host2_); 341 feature_.OnRenderWidgetCreated(2, &render_widget_host2_);
338 feature_.OnRenderWidgetInitialized(1, &render_widget_host1_); 342 feature_.OnRenderWidgetInitialized(1, &render_widget_host1_);
339 feature_.OnRenderWidgetDeleted(2, &render_widget_host2_); 343 feature_.OnRenderWidgetDeleted(2, &render_widget_host2_);
340 feature_.SendCompositorMessage(1, &render_widget_host1_, payload); 344 feature_.SendCompositorMessage(1, &render_widget_host1_, payload);
341 } 345 }
342 346
343 } // namespace engine 347 } // namespace engine
344 } // namespace blimp 348 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698