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

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/image-before-linebreak.html

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 | « components/test_runner/text_input_controller.cc ('k') | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « components/test_runner/text_input_controller.cc ('k') | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698