| Index: chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
|
| diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
|
| index fce9d5f670cc27c0914f70f9a302891c8e2e658b..745551f621b99d687dfaddc1b0f3853885373481 100644
|
| --- a/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
|
| +++ b/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
|
| @@ -5,7 +5,9 @@
|
| #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h"
|
|
|
| #include <stddef.h>
|
| +
|
| #include <algorithm>
|
| +#include <memory>
|
| #include <utility>
|
|
|
| #include "base/bind.h"
|
| @@ -13,7 +15,6 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/logging.h"
|
| #include "base/macros.h"
|
| -#include "base/memory/scoped_ptr.h"
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/run_loop.h"
|
| #include "chrome/browser/chromeos/input_method/mock_candidate_window_controller.h"
|
| @@ -134,7 +135,7 @@ class InputMethodManagerImplTest : public BrowserWithTestWindowTest {
|
|
|
| delegate_ = new FakeInputMethodDelegate();
|
| manager_.reset(new InputMethodManagerImpl(
|
| - scoped_ptr<InputMethodDelegate>(delegate_), false));
|
| + std::unique_ptr<InputMethodDelegate>(delegate_), false));
|
| manager_->GetInputMethodUtil()->UpdateHardwareLayoutCache();
|
| candidate_window_controller_ = new MockCandidateWindowController;
|
| manager_->SetCandidateWindowControllerForTesting(
|
| @@ -170,7 +171,8 @@ class InputMethodManagerImplTest : public BrowserWithTestWindowTest {
|
| void InitComponentExtension() {
|
| mock_delegate_ = new MockComponentExtIMEManagerDelegate();
|
| mock_delegate_->set_ime_list(ime_list_);
|
| - scoped_ptr<ComponentExtensionIMEManagerDelegate> delegate(mock_delegate_);
|
| + std::unique_ptr<ComponentExtensionIMEManagerDelegate> delegate(
|
| + mock_delegate_);
|
|
|
| // CreateNewState(NULL) returns state with non-empty current_input_method.
|
| // So SetState() triggers ChangeInputMethod().
|
| @@ -345,11 +347,11 @@ class InputMethodManagerImplTest : public BrowserWithTestWindowTest {
|
| return TestingBrowserProcess::GetGlobal();
|
| }
|
|
|
| - scoped_ptr<TestingProfileManager> profile_manager_;
|
| - scoped_ptr<InputMethodManagerImpl> manager_;
|
| + std::unique_ptr<TestingProfileManager> profile_manager_;
|
| + std::unique_ptr<InputMethodManagerImpl> manager_;
|
| FakeInputMethodDelegate* delegate_;
|
| MockCandidateWindowController* candidate_window_controller_;
|
| - scoped_ptr<MockInputMethodEngine> mock_engine_handler_;
|
| + std::unique_ptr<MockInputMethodEngine> mock_engine_handler_;
|
| FakeImeKeyboard* keyboard_;
|
| MockComponentExtIMEManagerDelegate* mock_delegate_;
|
| std::vector<ComponentExtensionIME> ime_list_;
|
| @@ -527,7 +529,7 @@ TEST_F(InputMethodManagerImplTest, TestActiveInputMethods) {
|
| manager_->GetActiveIMEState()->EnableLoginLayouts(
|
| "ja", keyboard_layouts); // Japanese
|
| EXPECT_EQ(2U, manager_->GetActiveIMEState()->GetNumActiveInputMethods());
|
| - scoped_ptr<InputMethodDescriptors> methods(
|
| + std::unique_ptr<InputMethodDescriptors> methods(
|
| manager_->GetActiveIMEState()->GetActiveInputMethods());
|
| ASSERT_TRUE(methods.get());
|
| EXPECT_EQ(2U, methods->size());
|
| @@ -1223,7 +1225,7 @@ TEST_F(InputMethodManagerImplTest, TestAddRemoveExtensionInputMethods) {
|
| EXPECT_EQ(2U, manager_->GetActiveIMEState()->GetNumActiveInputMethods());
|
|
|
| {
|
| - scoped_ptr<InputMethodDescriptors> methods(
|
| + std::unique_ptr<InputMethodDescriptors> methods(
|
| manager_->GetActiveIMEState()->GetActiveInputMethods());
|
| ASSERT_EQ(2U, methods->size());
|
| // Ext IMEs should be at the end of the list.
|
| @@ -1251,7 +1253,7 @@ TEST_F(InputMethodManagerImplTest, TestAddRemoveExtensionInputMethods) {
|
| manager_->GetActiveIMEState()->SetEnabledExtensionImes(&extension_ime_ids);
|
| EXPECT_EQ(3U, manager_->GetActiveIMEState()->GetNumActiveInputMethods());
|
| {
|
| - scoped_ptr<InputMethodDescriptors> methods(
|
| + std::unique_ptr<InputMethodDescriptors> methods(
|
| manager_->GetActiveIMEState()->GetActiveInputMethods());
|
| ASSERT_EQ(3U, methods->size());
|
| // Ext IMEs should be at the end of the list.
|
| @@ -1340,7 +1342,7 @@ TEST_F(InputMethodManagerImplTest, TestAddExtensionInputThenLockScreen) {
|
| EXPECT_EQ("us(dvorak)", keyboard_->last_layout_);
|
| {
|
| // This is for crosbug.com/27052.
|
| - scoped_ptr<InputMethodDescriptors> methods(
|
| + std::unique_ptr<InputMethodDescriptors> methods(
|
| manager_->GetActiveIMEState()->GetActiveInputMethods());
|
| ASSERT_EQ(2U, methods->size());
|
| // Ext. IMEs should be at the end of the list.
|
|
|