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

Side by Side Diff: content/renderer/render_view_browsertest.cc

Issue 1914603002: Replace ViewHostMsg_TextInputState_Params with content::TextInputState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Comments 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 unified diff | Download patch
« no previous file with comments | « content/content_common.gypi ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 render_thread_->sink().ClearMessages(); 1117 render_thread_->sink().ClearMessages();
1118 1118
1119 // Update the IME status and verify if our IME backend sends an IPC message 1119 // Update the IME status and verify if our IME backend sends an IPC message
1120 // to activate IMEs. 1120 // to activate IMEs.
1121 view()->UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME); 1121 view()->UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME);
1122 const IPC::Message* msg = render_thread_->sink().GetMessageAt(0); 1122 const IPC::Message* msg = render_thread_->sink().GetMessageAt(0);
1123 EXPECT_TRUE(msg != NULL); 1123 EXPECT_TRUE(msg != NULL);
1124 EXPECT_EQ(ViewHostMsg_TextInputStateChanged::ID, msg->type()); 1124 EXPECT_EQ(ViewHostMsg_TextInputStateChanged::ID, msg->type());
1125 ViewHostMsg_TextInputStateChanged::Param params; 1125 ViewHostMsg_TextInputStateChanged::Param params;
1126 ViewHostMsg_TextInputStateChanged::Read(msg, &params); 1126 ViewHostMsg_TextInputStateChanged::Read(msg, &params);
1127 ViewHostMsg_TextInputState_Params p = base::get<0>(params); 1127 TextInputState p = base::get<0>(params);
1128 ui::TextInputType type = p.type; 1128 ui::TextInputType type = p.type;
1129 ui::TextInputMode input_mode = p.mode; 1129 ui::TextInputMode input_mode = p.mode;
1130 bool can_compose_inline = p.can_compose_inline; 1130 bool can_compose_inline = p.can_compose_inline;
1131 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, type); 1131 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, type);
1132 EXPECT_EQ(true, can_compose_inline); 1132 EXPECT_EQ(true, can_compose_inline);
1133 1133
1134 // Move the input focus to the second <input> element, where we should 1134 // Move the input focus to the second <input> element, where we should
1135 // de-activate IMEs. 1135 // de-activate IMEs.
1136 ExecuteJavaScriptForTests("document.getElementById('test2').focus();"); 1136 ExecuteJavaScriptForTests("document.getElementById('test2').focus();");
1137 ProcessPendingMessages(); 1137 ProcessPendingMessages();
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
2393 2393
2394 TEST_F(DevToolsAgentTest, RuntimeEnableForcesContextsAfterNavigation) { 2394 TEST_F(DevToolsAgentTest, RuntimeEnableForcesContextsAfterNavigation) {
2395 Attach(); 2395 Attach();
2396 DispatchDevToolsMessage("{\"id\":1,\"method\":\"Runtime.enable\"}"); 2396 DispatchDevToolsMessage("{\"id\":1,\"method\":\"Runtime.enable\"}");
2397 EXPECT_EQ(0, CountNotifications("Runtime.executionContextCreated")); 2397 EXPECT_EQ(0, CountNotifications("Runtime.executionContextCreated"));
2398 LoadHTML("<body>page<iframe></iframe></body>"); 2398 LoadHTML("<body>page<iframe></iframe></body>");
2399 EXPECT_EQ(2, CountNotifications("Runtime.executionContextCreated")); 2399 EXPECT_EQ(2, CountNotifications("Runtime.executionContextCreated"));
2400 } 2400 }
2401 2401
2402 } // namespace content 2402 } // namespace content
OLDNEW
« no previous file with comments | « content/content_common.gypi ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698