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

Unified Diff: components/test_runner/text_input_controller.cc

Issue 1756763002: 2016-03-02T18:53:01 LayoutPosition Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-04-25T19:02:18 Created 4 years, 8 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 | « no previous file | third_party/WebKit/LayoutTests/editing/selection/image-before-linebreak.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/text_input_controller.cc
diff --git a/components/test_runner/text_input_controller.cc b/components/test_runner/text_input_controller.cc
index 4a7b4522fdd724541619861ad96986baf63b44b5..5aeecda853efd3c544700ddfe45dc5089ae92fd2 100644
--- a/components/test_runner/text_input_controller.cc
+++ b/components/test_runner/text_input_controller.cc
@@ -220,9 +220,11 @@ std::vector<int> TextInputController::SelectedRange() {
blink::WebRange range = view()->mainFrame()->selectionRange();
std::vector<int> int_array(2);
- int_array[0] = range.startOffset();
- int_array[1] = range.endOffset();
-
+ if (!range.isNull()) {
+ // editing/selection/5825350-1.html
+ int_array[0] = range.startOffset();
+ int_array[1] = range.endOffset();
+ }
return int_array;
}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/selection/image-before-linebreak.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698