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

Side by Side Diff: ui/base/ime/win/tsf_text_store_unittest.cc

Issue 22401002: Add GetTextInputMode function to TextInputClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorder declaration Created 7 years, 4 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 | « ui/base/ime/text_input_client.h ('k') | ui/keyboard/keyboard_controller_unittest.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 "ui/base/ime/win/tsf_text_store.h" 5 #include "ui/base/ime/win/tsf_text_store.h"
6 6
7 #include "base/win/scoped_com_initializer.h" 7 #include "base/win/scoped_com_initializer.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "ui/base/ime/text_input_client.h" 10 #include "ui/base/ime/text_input_client.h"
(...skipping 10 matching lines...) Expand all
21 class MockTextInputClient : public TextInputClient { 21 class MockTextInputClient : public TextInputClient {
22 public: 22 public:
23 ~MockTextInputClient() {} 23 ~MockTextInputClient() {}
24 MOCK_METHOD1(SetCompositionText, void(const ui::CompositionText&)); 24 MOCK_METHOD1(SetCompositionText, void(const ui::CompositionText&));
25 MOCK_METHOD0(ConfirmCompositionText, void()); 25 MOCK_METHOD0(ConfirmCompositionText, void());
26 MOCK_METHOD0(ClearCompositionText, void()); 26 MOCK_METHOD0(ClearCompositionText, void());
27 MOCK_METHOD1(InsertText, void(const string16&)); 27 MOCK_METHOD1(InsertText, void(const string16&));
28 MOCK_METHOD2(InsertChar, void(char16, int)); 28 MOCK_METHOD2(InsertChar, void(char16, int));
29 MOCK_CONST_METHOD0(GetAttachedWindow, gfx::NativeWindow()); 29 MOCK_CONST_METHOD0(GetAttachedWindow, gfx::NativeWindow());
30 MOCK_CONST_METHOD0(GetTextInputType, ui::TextInputType()); 30 MOCK_CONST_METHOD0(GetTextInputType, ui::TextInputType());
31 MOCK_CONST_METHOD0(GetTextInputMode, ui::TextInputMode());
31 MOCK_CONST_METHOD0(CanComposeInline, bool()); 32 MOCK_CONST_METHOD0(CanComposeInline, bool());
32 MOCK_METHOD0(GetCaretBounds, gfx::Rect()); 33 MOCK_METHOD0(GetCaretBounds, gfx::Rect());
33 MOCK_METHOD2(GetCompositionCharacterBounds, bool(uint32, gfx::Rect*)); 34 MOCK_METHOD2(GetCompositionCharacterBounds, bool(uint32, gfx::Rect*));
34 MOCK_METHOD0(HasCompositionText, bool()); 35 MOCK_METHOD0(HasCompositionText, bool());
35 MOCK_METHOD1(GetTextRange, bool(ui::Range*)); 36 MOCK_METHOD1(GetTextRange, bool(ui::Range*));
36 MOCK_METHOD1(GetCompositionTextRange, bool(ui::Range*)); 37 MOCK_METHOD1(GetCompositionTextRange, bool(ui::Range*));
37 MOCK_METHOD1(GetSelectionRange, bool(ui::Range*)); 38 MOCK_METHOD1(GetSelectionRange, bool(ui::Range*));
38 MOCK_METHOD1(SetSelectionRange, bool(const ui::Range&)); 39 MOCK_METHOD1(SetSelectionRange, bool(const ui::Range&));
39 MOCK_METHOD1(DeleteRange, bool(const ui::Range&)); 40 MOCK_METHOD1(DeleteRange, bool(const ui::Range&));
40 MOCK_METHOD2(GetTextFromRange, bool(const ui::Range&, string16*)); 41 MOCK_METHOD2(GetTextFromRange, bool(const ui::Range&, string16*));
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 &GetTextExtTestCallback::GetCompositionCharacterBounds)); 1139 &GetTextExtTestCallback::GetCompositionCharacterBounds));
1139 1140
1140 EXPECT_CALL(*sink_, OnLockGranted(_)) 1141 EXPECT_CALL(*sink_, OnLockGranted(_))
1141 .WillOnce(Invoke(&callback, &GetTextExtTestCallback::LockGranted)); 1142 .WillOnce(Invoke(&callback, &GetTextExtTestCallback::LockGranted));
1142 1143
1143 HRESULT result; 1144 HRESULT result;
1144 EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ, &result)); 1145 EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ, &result));
1145 } 1146 }
1146 1147
1147 } // namespace ui 1148 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/text_input_client.h ('k') | ui/keyboard/keyboard_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698