| OLD | NEW |
| 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 Loading... |
| 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(int, int)); |
| 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 Loading... |
| 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 |
| OLD | NEW |