summaryrefslogtreecommitdiff
path: root/chromium/ui/base/ime/win/tsf_text_store_unittest.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-09-29 16:16:15 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-11-09 10:04:06 +0000
commita95a7417ad456115a1ef2da4bb8320531c0821f1 (patch)
treeedcd59279e486d2fd4a8f88a7ed025bcf925c6e6 /chromium/ui/base/ime/win/tsf_text_store_unittest.cc
parent33fc33aa94d4add0878ec30dc818e34e1dd3cc2a (diff)
downloadqtwebengine-chromium-a95a7417ad456115a1ef2da4bb8320531c0821f1.tar.gz
BASELINE: Update Chromium to 106.0.5249.126
Change-Id: Ib0bb21c437a7d1686e21c33f2d329f2ac425b7ab Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/438936 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/base/ime/win/tsf_text_store_unittest.cc')
-rw-r--r--chromium/ui/base/ime/win/tsf_text_store_unittest.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/chromium/ui/base/ime/win/tsf_text_store_unittest.cc b/chromium/ui/base/ime/win/tsf_text_store_unittest.cc
index 7481c3f7f5b..d09d1ae726e 100644
--- a/chromium/ui/base/ime/win/tsf_text_store_unittest.cc
+++ b/chromium/ui/base/ime/win/tsf_text_store_unittest.cc
@@ -35,7 +35,7 @@ class MockTextInputClient : public TextInputClient {
public:
~MockTextInputClient() {}
MOCK_METHOD1(SetCompositionText, void(const ui::CompositionText&));
- MOCK_METHOD1(ConfirmCompositionText, uint32_t(bool));
+ MOCK_METHOD1(ConfirmCompositionText, size_t(bool));
MOCK_METHOD0(ClearCompositionText, void());
MOCK_METHOD2(
InsertText,
@@ -49,7 +49,7 @@ class MockTextInputClient : public TextInputClient {
MOCK_CONST_METHOD0(CanComposeInline, bool());
MOCK_CONST_METHOD0(GetCaretBounds, gfx::Rect());
MOCK_CONST_METHOD0(GetSelectionBoundingBox, gfx::Rect());
- MOCK_CONST_METHOD2(GetCompositionCharacterBounds, bool(uint32_t, gfx::Rect*));
+ MOCK_CONST_METHOD2(GetCompositionCharacterBounds, bool(size_t, gfx::Rect*));
MOCK_CONST_METHOD0(HasCompositionText, bool());
MOCK_CONST_METHOD0(GetFocusReason, ui::TextInputClient::FocusReason());
MOCK_METHOD0(ShouldDoLearning, bool());
@@ -78,9 +78,9 @@ class MockTextInputClient : public TextInputClient {
MOCK_METHOD0(GetTextEditingContext, ui::TextInputClient::EditingContext());
};
-class MockInputMethodDelegate : public internal::InputMethodDelegate {
+class MockImeKeyEventDispatcher : public ImeKeyEventDispatcher {
public:
- ~MockInputMethodDelegate() {}
+ ~MockImeKeyEventDispatcher() {}
MOCK_METHOD1(DispatchKeyEventPostIME, EventDispatchDetails(KeyEvent*));
};
@@ -150,7 +150,7 @@ class TSFTextStoreTest : public testing::Test {
EXPECT_EQ(S_OK, text_store_->AdviseSink(IID_ITextStoreACPSink, sink_.get(),
TS_AS_ALL_SINKS));
text_store_->SetFocusedTextInputClient(kWindowHandle, &text_input_client_);
- text_store_->SetInputMethodDelegate(&input_method_delegate_);
+ text_store_->SetImeKeyEventDispatcher(&ime_key_event_dispatcher_);
}
void TearDown() override {
@@ -167,7 +167,7 @@ class TSFTextStoreTest : public testing::Test {
base::win::ScopedCOMInitializer com_initializer_;
MockTextInputClient text_input_client_;
- MockInputMethodDelegate input_method_delegate_;
+ MockImeKeyEventDispatcher ime_key_event_dispatcher_;
scoped_refptr<TSFTextStore> text_store_;
scoped_refptr<MockStoreACPSink> sink_;
};
@@ -1757,7 +1757,7 @@ TEST_F(TSFTextStoreTest, KeyEventTest) {
.WillOnce(Invoke(&callback, &KeyEventTestCallback::InsertText2))
.WillOnce(Invoke(&callback, &KeyEventTestCallback::InsertText3));
- EXPECT_CALL(input_method_delegate_, DispatchKeyEventPostIME(_))
+ EXPECT_CALL(ime_key_event_dispatcher_, DispatchKeyEventPostIME(_))
.WillOnce(
Invoke(&callback, &KeyEventTestCallback::DispatchKeyEventPostIME1))
.WillOnce(
@@ -2813,7 +2813,7 @@ TEST_F(TSFTextStoreTest, RegressionTest) {
.WillOnce(
Invoke(&callback, &RegressionTestCallback::SetCompositionText5));
- EXPECT_CALL(input_method_delegate_, DispatchKeyEventPostIME(_))
+ EXPECT_CALL(ime_key_event_dispatcher_, DispatchKeyEventPostIME(_))
.WillOnce(
Invoke(&callback, &RegressionTestCallback::DispatchKeyEventPostIME1))
.WillOnce(