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

Unified Diff: third_party/WebKit/LayoutTests/editing/pasteboard/smart-paste-008.html

Issue 2695193002: Selection API: setBaseAndExtent() and selectAllChildren() should create new Range based on the spec… (Closed)
Patch Set: rebase 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/pasteboard/smart-paste-008.html
diff --git a/third_party/WebKit/LayoutTests/editing/pasteboard/smart-paste-008.html b/third_party/WebKit/LayoutTests/editing/pasteboard/smart-paste-008.html
index 119553d2673b71470bc79225d874ac691c82edc4..0623e04046f2fa4bdd7fc996061b1e2dde79b7c7 100644
--- a/third_party/WebKit/LayoutTests/editing/pasteboard/smart-paste-008.html
+++ b/third_party/WebKit/LayoutTests/editing/pasteboard/smart-paste-008.html
@@ -19,7 +19,8 @@ test(function() {
internals.settings.setEditingBehavior('win');
- selection.setBaseAndExtent(sample, 0, sample, 0);
+ var foo = document.getElementById('foo');
+ selection.selectAllChildren(foo);
var rects = window.getSelection().getRangeAt(0).getClientRects();
var x = rects[0].left;
var y = rects[0].top;
@@ -30,13 +31,13 @@ test(function() {
eventSender.mouseUp();
document.execCommand('copy');
- selection.collapse(document.getElementById('foo').firstChild, 1);
+ selection.collapse(foo.firstChild, 1);
selection.extend(document.getElementById('bar').firstChild, 1);
document.execCommand('paste');
assert_equals(sample.innerHTML, '<div id="foo">f foo bar</div>', 'innerHTML');
assert_true(selection.isCollapsed, 'isCollapsed');
- assert_equals(selection.anchorNode, document.getElementById('foo').firstChild, 'anchorNode');
+ assert_equals(selection.anchorNode, foo.firstChild, 'anchorNode');
assert_equals(selection.anchorOffset, 5, 'anchorOffset');
});
</script>

Powered by Google App Engine
This is Rietveld 408576698