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

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

Issue 10928199: Add ExtendSelectionAndDelete() method to ui::TextInputClient. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: change int to size_t Created 8 years, 3 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/views/controls/textfield/native_textfield_views.h » ('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/win/tsf_text_store.h" 5 #include "ui/base/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 22 matching lines...) Expand all
33 MOCK_METHOD0(HasCompositionText, bool()); 33 MOCK_METHOD0(HasCompositionText, bool());
34 MOCK_METHOD1(GetTextRange, bool(ui::Range*)); 34 MOCK_METHOD1(GetTextRange, bool(ui::Range*));
35 MOCK_METHOD1(GetCompositionTextRange, bool(ui::Range*)); 35 MOCK_METHOD1(GetCompositionTextRange, bool(ui::Range*));
36 MOCK_METHOD1(GetSelectionRange, bool(ui::Range*)); 36 MOCK_METHOD1(GetSelectionRange, bool(ui::Range*));
37 MOCK_METHOD1(SetSelectionRange, bool(const ui::Range&)); 37 MOCK_METHOD1(SetSelectionRange, bool(const ui::Range&));
38 MOCK_METHOD1(DeleteRange, bool(const ui::Range&)); 38 MOCK_METHOD1(DeleteRange, bool(const ui::Range&));
39 MOCK_METHOD2(GetTextFromRange, bool(const ui::Range&, string16*)); 39 MOCK_METHOD2(GetTextFromRange, bool(const ui::Range&, string16*));
40 MOCK_METHOD0(OnInputMethodChanged, void()); 40 MOCK_METHOD0(OnInputMethodChanged, void());
41 MOCK_METHOD1(ChangeTextDirectionAndLayoutAlignment, 41 MOCK_METHOD1(ChangeTextDirectionAndLayoutAlignment,
42 bool(base::i18n::TextDirection)); 42 bool(base::i18n::TextDirection));
43 MOCK_METHOD2(ExtendSelectionAndDelete, void(size_t, size_t));
43 }; 44 };
44 45
45 class MockStoreACPSink : public ITextStoreACPSink { 46 class MockStoreACPSink : public ITextStoreACPSink {
46 public: 47 public:
47 MockStoreACPSink() : ref_count_(0) { 48 MockStoreACPSink() : ref_count_(0) {
48 } 49 }
49 50
50 // IUnknown 51 // IUnknown
51 virtual ULONG STDMETHODCALLTYPE AddRef() OVERRIDE { 52 virtual ULONG STDMETHODCALLTYPE AddRef() OVERRIDE {
52 return InterlockedIncrement(&ref_count_); 53 return InterlockedIncrement(&ref_count_);
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 &GetTextExtTestCallback::GetCompositionCharacterBounds)); 1115 &GetTextExtTestCallback::GetCompositionCharacterBounds));
1115 1116
1116 EXPECT_CALL(*sink_, OnLockGranted(_)) 1117 EXPECT_CALL(*sink_, OnLockGranted(_))
1117 .WillOnce(Invoke(&callback, &GetTextExtTestCallback::LockGranted)); 1118 .WillOnce(Invoke(&callback, &GetTextExtTestCallback::LockGranted));
1118 1119
1119 HRESULT result; 1120 HRESULT result;
1120 EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ, &result)); 1121 EXPECT_EQ(S_OK, text_store_->RequestLock(TS_LF_READ, &result));
1121 } 1122 }
1122 1123
1123 } // namespace ui 1124 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/text_input_client.h ('k') | ui/views/controls/textfield/native_textfield_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698