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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/selection/extend.js

Issue 2698413002: selection: Align collapse-NN.html and extend-NN.html to the latest draft. (Closed)
Patch Set: 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/external/wpt/selection/extend.js
diff --git a/third_party/WebKit/LayoutTests/external/wpt/selection/extend.js b/third_party/WebKit/LayoutTests/external/wpt/selection/extend.js
index 6c4c2cacf8fbd3def27d33d00586636f8d139730..6a2307e5e5396f5b67e5a5b2a6d6685a903ed257 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/selection/extend.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/selection/extend.js
@@ -56,6 +56,15 @@ function testExtend(endpoints, target) {
var node = target[0];
var offset = target[1];
+ // "If node's root is not the document associated with the context object,
+ // abort these steps."
+ if (!document.contains(node)) {
+ assertSelectionNoChange(function() {
+ selection.extend(node, offset);
+ });
+ return;
+ }
+
// "If the context object's range is null, throw an InvalidStateError
// exception and abort these steps."
if (getSelection().rangeCount == 0) {

Powered by Google App Engine
This is Rietveld 408576698