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

Unified Diff: blimp/engine/feature/engine_render_widget_feature_unittest.cc

Issue 2044593004: Make MockTextInputClient inherit from ui::DummyTextInputClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/engine/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/engine/feature/engine_render_widget_feature_unittest.cc
diff --git a/blimp/engine/feature/engine_render_widget_feature_unittest.cc b/blimp/engine/feature/engine_render_widget_feature_unittest.cc
index 417f54993cc22e0a73426cf536eb902545f5b122..f4a7ddd066f65592e34078f42a46cdaf9331fe53 100644
--- a/blimp/engine/feature/engine_render_widget_feature_unittest.cc
+++ b/blimp/engine/feature/engine_render_widget_feature_unittest.cc
@@ -22,7 +22,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
-#include "ui/base/ime/text_input_client.h"
+#include "ui/base/ime/dummy_text_input_client.h"
using testing::_;
using testing::InSequence;
@@ -106,48 +106,10 @@ class MockRenderWidgetHost
bool Send(IPC::Message* msg) override { return false; }
};
-class MockTextInputClient : public ui::TextInputClient {
- ui::TextInputType text_input_type_;
-
+class MockTextInputClient : public ui::DummyTextInputClient {
public:
- MockTextInputClient() : text_input_type_(ui::TEXT_INPUT_TYPE_TEXT) {}
- ~MockTextInputClient() override {}
-
- void SetCompositionText(const ui::CompositionText& composition) override {}
- void ConfirmCompositionText() override {}
- void ClearCompositionText() override {}
- void InsertText(const base::string16& text) override {}
- void InsertChar(const ui::KeyEvent& event) override {}
- ui::TextInputType GetTextInputType() const override {
- return text_input_type_;
- }
- ui::TextInputMode GetTextInputMode() const override {
- return ui::TEXT_INPUT_MODE_DEFAULT;
- }
- int GetTextInputFlags() const override { return 0; }
- bool CanComposeInline() const override { return false; }
- gfx::Rect GetCaretBounds() const override { return gfx::Rect(); }
- bool GetCompositionCharacterBounds(uint32_t index,
- gfx::Rect* rect) const override {
- return false;
- }
- bool HasCompositionText() const override { return false; }
- bool GetTextRange(gfx::Range* range) const override { return false; }
- bool GetCompositionTextRange(gfx::Range* range) const override {
- return false;
- }
- bool GetSelectionRange(gfx::Range* range) const override { return false; }
- bool SetSelectionRange(const gfx::Range& range) override { return false; }
- bool DeleteRange(const gfx::Range& range) override { return false; }
- void OnInputMethodChanged() override {}
- bool ChangeTextDirectionAndLayoutAlignment(
- base::i18n::TextDirection direction) override {
- return false;
- }
- void ExtendSelectionAndDelete(size_t before, size_t after) override {}
- void EnsureCaretInRect(const gfx::Rect& rect) override {}
- bool IsEditCommandEnabled(int command_id) override { return false; }
- void SetEditCommandForNextKeyEvent(int command_id) override {}
+ MockTextInputClient() : DummyTextInputClient(ui::TEXT_INPUT_TYPE_TEXT) {}
+
bool GetTextFromRange(const gfx::Range& range,
base::string16* text) const override {
*text = base::string16(base::ASCIIToUTF16("green apple"));
« no previous file with comments | « blimp/engine/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698