OLD | NEW |
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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 10 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 composition_text.underlines.push_back( | 224 composition_text.underlines.push_back( |
225 ui::CompositionUnderline(0, 3, 0xff000000, true)); | 225 ui::CompositionUnderline(0, 3, 0xff000000, true)); |
226 | 226 |
227 // Non-focused segment | 227 // Non-focused segment |
228 composition_text.underlines.push_back( | 228 composition_text.underlines.push_back( |
229 ui::CompositionUnderline(3, 4, 0xff000000, false)); | 229 ui::CompositionUnderline(3, 4, 0xff000000, false)); |
230 | 230 |
231 const ui::CompositionUnderlines& underlines = composition_text.underlines; | 231 const ui::CompositionUnderlines& underlines = composition_text.underlines; |
232 | 232 |
233 // Caret is at the end. (This emulates Japanese MSIME 2007 and later) | 233 // Caret is at the end. (This emulates Japanese MSIME 2007 and later) |
234 composition_text.selection = ui::Range(4); | 234 composition_text.selection = gfx::Range(4); |
235 | 235 |
236 sink_->ClearMessages(); | 236 sink_->ClearMessages(); |
237 view_->SetCompositionText(composition_text); | 237 view_->SetCompositionText(composition_text); |
238 EXPECT_TRUE(view_->has_composition_text_); | 238 EXPECT_TRUE(view_->has_composition_text_); |
239 { | 239 { |
240 const IPC::Message* msg = | 240 const IPC::Message* msg = |
241 sink_->GetFirstMessageMatching(ViewMsg_ImeSetComposition::ID); | 241 sink_->GetFirstMessageMatching(ViewMsg_ImeSetComposition::ID); |
242 ASSERT_TRUE(msg != NULL); | 242 ASSERT_TRUE(msg != NULL); |
243 | 243 |
244 ViewMsg_ImeSetComposition::Param params; | 244 ViewMsg_ImeSetComposition::Param params; |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 EXPECT_EQ(ViewMsg_Resize::ID, msg->type()); | 578 EXPECT_EQ(ViewMsg_Resize::ID, msg->type()); |
579 ViewMsg_Resize::Param params; | 579 ViewMsg_Resize::Param params; |
580 ViewMsg_Resize::Read(msg, ¶ms); | 580 ViewMsg_Resize::Read(msg, ¶ms); |
581 EXPECT_EQ("0,0 1600x1200", | 581 EXPECT_EQ("0,0 1600x1200", |
582 gfx::Rect(params.a.screen_info.availableRect).ToString()); | 582 gfx::Rect(params.a.screen_info.availableRect).ToString()); |
583 EXPECT_EQ("1600x1200", params.a.new_size.ToString()); | 583 EXPECT_EQ("1600x1200", params.a.new_size.ToString()); |
584 } | 584 } |
585 } | 585 } |
586 | 586 |
587 } // namespace content | 587 } // namespace content |
OLD | NEW |