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

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/collapse/collapse_document_in_design_mode.html

Issue 2697313005: Selection API: collapse() should recreate an internal Range. (Closed)
Patch Set: Add NeedsRebaseline for platform-dependent tests 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/selection/collapse/collapse_document_in_design_mode.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/collapse/collapse_document_in_design_mode.html b/third_party/WebKit/LayoutTests/editing/selection/collapse/collapse_document_in_design_mode.html
index ebfb95da25de0fa221804a4b3ae56c1f5c7ec625..fb3e009ea9d73221c2e210b68b5548e8c9750a92 100644
--- a/third_party/WebKit/LayoutTests/editing/selection/collapse/collapse_document_in_design_mode.html
+++ b/third_party/WebKit/LayoutTests/editing/selection/collapse/collapse_document_in_design_mode.html
@@ -13,10 +13,16 @@ test(function() {
selection.collapse(document, 0);
var anchor = document.getElementById('anchor').firstChild;
- assert_equals(selection.anchorNode, anchor, 'anchorNode');
- assert_equals(selection.anchorOffset, 0, 'anchorOffset');
- assert_equals(selection.focusNode, anchor, 'focusNode');
- assert_equals(selection.focusOffset, 0, 'focusOffset');
+ assert_equals(selection.anchorNode, document, 'DOM anchorNode');
+ assert_equals(selection.anchorOffset, 0, 'DOM anchorOffset');
+ assert_equals(selection.focusNode, document, 'DOM focusNode');
+ assert_equals(selection.focusOffset, 0, 'DOM focusOffset');
+
+ assert_exists(window, 'internals');
+ assert_equals(internals.visibleSelectionAnchorNode, anchor, 'Canonicalized anchorNode');
+ assert_equals(internals.visibleSelectionAnchorOffset, 0, 'Canonicalized anchorOffset');
+ assert_equals(internals.visibleSelectionFocusNode, anchor, 'Canonicalized focusNode');
+ assert_equals(internals.visibleSelectionFocusOffset, 0, 'Canonicalized focusOffset');
});
</script>
</html>

Powered by Google App Engine
This is Rietveld 408576698