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

Unified Diff: content/public/test/text_input_test_utils.h

Issue 2903833002: Reland: Update TextSelection for non-user initiated events
Patch Set: Add test for JS cursor movement Created 3 years, 5 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 | « content/public/renderer/render_frame.h ('k') | content/public/test/text_input_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c8d9775c3e4c3ef842ba77f6dda70cd436c03018..5ec4783273dac18acf1e999d93ce349d5a4b8d76 100644
--- a/content/public/test/text_input_test_utils.h
+++ b/content/public/test/text_input_test_utils.h
@@ -123,6 +123,10 @@ class TextInputManagerTester {
// |TextInputState.value| of the TextInputManager.
bool GetTextInputValue(std::string* value);
+ // Returns true if there is a focused <input> and populates |position| with
+ // |TextInputState.selection_start| of the TextInputManager.
+ bool GetTextInputCursorPosition(int* position);
+
// 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);
@@ -147,6 +151,12 @@ class TextInputManagerTester {
// created).
bool IsTextInputStateChanged();
+ // Returns true if there is a focused <input> and populates |user_initiated|
+ // with the information whether it was triggered by user interaction in the
+ // given view.
+ bool GetTextSelectionUserInitiatedForView(RenderWidgetHostView* view,
+ bool* user_initiated);
+
private:
// The actual internal observer of the TextInputManager.
class InternalObserver;
« no previous file with comments | « content/public/renderer/render_frame.h ('k') | content/public/test/text_input_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698