| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_manager.h" | 5 #include "ui/chromeos/ime/input_method_menu_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 namespace ash { | 11 namespace ui { |
| 12 namespace ime { | 12 namespace ime { |
| 13 | 13 |
| 14 TEST(InputMethodMenuManagerTest, TestGetSingleton) { | 14 TEST(InputMethodMenuManagerTest, TestGetSingleton) { |
| 15 EXPECT_TRUE(InputMethodMenuManager::GetInstance()); | 15 EXPECT_TRUE(InputMethodMenuManager::GetInstance()); |
| 16 } | 16 } |
| 17 | 17 |
| 18 class MockObserver : public InputMethodMenuManager::Observer { | 18 class MockObserver : public InputMethodMenuManager::Observer { |
| 19 public: | 19 public: |
| 20 MockObserver() : input_method_menu_item_changed_count_(0) {} | 20 MockObserver() : input_method_menu_item_changed_count_(0) {} |
| 21 ~MockObserver() override {} | 21 ~MockObserver() override {} |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 menu_manager_->GetCurrentInputMethodMenuItemList().at(1).ToString(), | 63 menu_manager_->GetCurrentInputMethodMenuItemList().at(1).ToString(), |
| 64 "key=key2, label=label2, " | 64 "key=key2, label=label2, " |
| 65 "is_selection_item=0, is_selection_item_checked=0"); | 65 "is_selection_item=0, is_selection_item_checked=0"); |
| 66 | 66 |
| 67 EXPECT_TRUE(menu_manager_->HasInputMethodMenuItemForKey("key1")); | 67 EXPECT_TRUE(menu_manager_->HasInputMethodMenuItemForKey("key1")); |
| 68 EXPECT_TRUE(menu_manager_->HasInputMethodMenuItemForKey("key2")); | 68 EXPECT_TRUE(menu_manager_->HasInputMethodMenuItemForKey("key2")); |
| 69 EXPECT_FALSE(menu_manager_->HasInputMethodMenuItemForKey("key-not-exist")); | 69 EXPECT_FALSE(menu_manager_->HasInputMethodMenuItemForKey("key-not-exist")); |
| 70 } | 70 } |
| 71 | 71 |
| 72 } // namespace ime | 72 } // namespace ime |
| 73 } // namespace ash | 73 } // namespace ui |
| OLD | NEW |