Index: third_party/WebKit/LayoutTests/editing/style/justify-left-crash.html |
diff --git a/third_party/WebKit/LayoutTests/editing/style/justify-left-crash.html b/third_party/WebKit/LayoutTests/editing/style/justify-left-crash.html |
index 18054a22032dee0a84033df3d975da66dee694ef..036af6712064d85427944c771506d774f917a1e9 100644 |
--- a/third_party/WebKit/LayoutTests/editing/style/justify-left-crash.html |
+++ b/third_party/WebKit/LayoutTests/editing/style/justify-left-crash.html |
@@ -21,9 +21,11 @@ html, head, style { |
test(() => { |
var sample = document.getElementById('sample'); |
assert_equals(sample.innerHTML, '<i>foo</i>'); |
- // TODO(yosin): Once we do lazy visible position canonicalization, |
- // we should have a caret. |
- assert_equals(getSelection().rangeCount, 0); |
+ const selection = window.getSelection(); |
+ assert_equals(selection.anchorNode, sample.firstChild.firstChild, 'anchorNode'); |
+ assert_equals(selection.anchorOffset, 0, 'anchorOffset'); |
+ assert_equals(selection.focusNode, sample.firstChild.firstChild, 'focusNode'); |
+ assert_equals(selection.focusOffset, 3, 'focusOffset'); |
}, 'This is a crash test.'); |
</script> |
</body> |