| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/ime/input_method_menu_item.h" | 5 #include "ash/ime/input_method_menu_item.h" |
| 6 #include "ash/ime/input_method_menu_manager.h" | 6 #include "ash/ime/input_method_menu_manager.h" |
| 7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/extensions/extension_browsertest.h" | 9 #include "chrome/browser/extensions/extension_browsertest.h" |
| 10 #include "chrome/browser/extensions/extension_test_message_listener.h" | 10 #include "chrome/browser/extensions/extension_test_message_listener.h" |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 ASSERT_TRUE(content::ExecuteScript(host->host_contents(), | 463 ASSERT_TRUE(content::ExecuteScript(host->host_contents(), |
| 464 set_composition_test_script)); | 464 set_composition_test_script)); |
| 465 EXPECT_EQ(1, mock_input_context->update_preedit_text_call_count()); | 465 EXPECT_EQ(1, mock_input_context->update_preedit_text_call_count()); |
| 466 | 466 |
| 467 EXPECT_EQ(4U, | 467 EXPECT_EQ(4U, |
| 468 mock_input_context->last_update_composition_arg().cursor_pos); | 468 mock_input_context->last_update_composition_arg().cursor_pos); |
| 469 EXPECT_TRUE(mock_input_context->last_update_composition_arg().is_visible); | 469 EXPECT_TRUE(mock_input_context->last_update_composition_arg().is_visible); |
| 470 | 470 |
| 471 const CompositionText& composition_text = | 471 const CompositionText& composition_text = |
| 472 mock_input_context->last_update_composition_arg().composition_text; | 472 mock_input_context->last_update_composition_arg().composition_text; |
| 473 EXPECT_EQ("COMPOSITION_TEXT", composition_text.text()); | 473 EXPECT_EQ(base::UTF8ToUTF16("COMPOSITION_TEXT"), composition_text.text()); |
| 474 const std::vector<CompositionText::UnderlineAttribute>& underlines = | 474 const std::vector<CompositionText::UnderlineAttribute>& underlines = |
| 475 composition_text.underline_attributes(); | 475 composition_text.underline_attributes(); |
| 476 | 476 |
| 477 ASSERT_EQ(2U, underlines.size()); | 477 ASSERT_EQ(2U, underlines.size()); |
| 478 EXPECT_EQ(CompositionText::COMPOSITION_TEXT_UNDERLINE_SINGLE, | 478 EXPECT_EQ(CompositionText::COMPOSITION_TEXT_UNDERLINE_SINGLE, |
| 479 underlines[0].type); | 479 underlines[0].type); |
| 480 EXPECT_EQ(0U, underlines[0].start_index); | 480 EXPECT_EQ(0U, underlines[0].start_index); |
| 481 EXPECT_EQ(5U, underlines[0].end_index); | 481 EXPECT_EQ(5U, underlines[0].end_index); |
| 482 | 482 |
| 483 EXPECT_EQ(CompositionText::COMPOSITION_TEXT_UNDERLINE_DOUBLE, | 483 EXPECT_EQ(CompositionText::COMPOSITION_TEXT_UNDERLINE_DOUBLE, |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 } | 894 } |
| 895 } | 895 } |
| 896 | 896 |
| 897 IMEBridge::Get()->SetInputContextHandler(NULL); | 897 IMEBridge::Get()->SetInputContextHandler(NULL); |
| 898 IMEBridge::Get()->SetCandidateWindowHandler(NULL); | 898 IMEBridge::Get()->SetCandidateWindowHandler(NULL); |
| 899 } | 899 } |
| 900 | 900 |
| 901 } // namespace | 901 } // namespace |
| 902 } // namespace input_method | 902 } // namespace input_method |
| 903 } // namespace chromeos | 903 } // namespace chromeos |
| OLD | NEW |