Index: content/public/test/text_input_test_utils.h |
diff --git a/content/public/test/text_input_test_utils.h b/content/public/test/text_input_test_utils.h |
index 97b1da1a76da600d20012d722a49a0c3db3c35b0..1f36862e9bfb36087b9e15f5243f1a3365529f06 100644 |
--- a/content/public/test/text_input_test_utils.h |
+++ b/content/public/test/text_input_test_utils.h |
@@ -78,6 +78,10 @@ class TextInputManagerTester { |
// ImeCompositionRangeChanged on the TextInputManager that is being observed. |
void SetOnImeCompositionRangeChangedCallback(const base::Closure& callback); |
+ // Sets a callback which is invoked when a RWHV calls SelectionChanged on the |
+ // TextInputManager which is being observed. |
+ void SetOnTextSelectionChangedCallback(const base::Closure& callback); |
+ |
// Returns true if there is a focused <input> and populates |type| with |
// |TextInputState.type| of the TextInputManager. |
bool GetTextInputType(ui::TextInputType* type); |
@@ -86,6 +90,10 @@ class TextInputManagerTester { |
// |TextInputState.value| of the TextInputManager. |
bool GetTextInputValue(std::string* value); |
+ // Returns true if there is a focused <input> and populates |length| with the |
+ // length of the selected text range in the focused view. |
+ bool GetCurrentTextSelectionLength(size_t* length); |
+ |
EhsanK
2016/07/18 15:21:29
TextSelection could be for non-<input> but as far
|
// Returns the RenderWidgetHostView with a focused <input> element or nullptr |
// if none exists. |
const RenderWidgetHostView* GetActiveView(); |