| Index: third_party/WebKit/LayoutTests/editing/selection/image-before-linebreak.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/selection/image-before-linebreak.html b/third_party/WebKit/LayoutTests/editing/selection/image-before-linebreak.html
|
| index 370ab74f9f663fe3ee06b822db1449ccfbd2d0e6..0e51aeeb996bf7109acd188e241c96302626689c 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/selection/image-before-linebreak.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/selection/image-before-linebreak.html
|
| @@ -9,9 +9,13 @@ if (window.testRunner)
|
| <script>
|
| if (window.testRunner)
|
| window.testRunner.dumpSelectionRect();
|
| -
|
| -var e = document.getElementById("div");
|
| -var s = window.getSelection();
|
| -// Select the line break
|
| -s.setBaseAndExtent(e, 1, e, 2);
|
| +
|
| +// We should wait for loading IMG otherwise we can't place a caret since,
|
| +// IMG dimension is zero.
|
| +window.onload = function() {
|
| + var e = document.getElementById("div");
|
| + var s = window.getSelection();
|
| + // Select the line break
|
| + s.setBaseAndExtent(e, 1, e, 2);
|
| +};
|
| </script>
|
|
|