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 f87e9fed0fd7b7fe0c04d4c44d51e78487515e38..8cdf0d7ae16146c48bf74e7a68dfda50772e5f4b 100644 |
--- a/content/public/test/text_input_test_utils.h |
+++ b/content/public/test/text_input_test_utils.h |
@@ -53,6 +53,10 @@ class TextInputManagerTester { |
// on the TextInputManager which is being observed. |
void SetOnSelectionBoundsChangedCallback(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); |
@@ -61,6 +65,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); |
+ |
// Returns the RenderWidgetHostView with a focused <input> element or nullptr |
// if none exists. |
const RenderWidgetHostView* GetActiveView(); |