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

Unified Diff: third_party/WebKit/LayoutTests/editing/style/justify-left-crash.html

Issue 2680943004: Make FrameSelection to hold non-canonicalized positions (Closed)
Patch Set: 2014-02-14T23:34:22 Update TestExpectation to include extend-{0,2,4}0.html and selectAllChildren.html Created 3 years, 10 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
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>

Powered by Google App Engine
This is Rietveld 408576698