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

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

Issue 2700673005: selection: Do not run invalid sub-tests with unselectable Range. (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/common.js
diff --git a/third_party/WebKit/LayoutTests/external/wpt/selection/common.js b/third_party/WebKit/LayoutTests/external/wpt/selection/common.js
index 4b37c2632c2cc19d8b47eb0486cf78e2fb641cd9..51579e42444e3c723ed9c80283887d163bfd150d 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/selection/common.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/selection/common.js
@@ -977,3 +977,14 @@ function assertSelectionNoChange(func) {
"The operation should not replace a registered Range");
}
+/**
+ * Check if the specified node can be selectable with window.getSelection()
+ * methods.
+ */
+function isSelectableNode(node) {
+ if (!node)
+ return false;
+ if (node.nodeType == Node.DOCUMENT_TYPE_NODE)
+ return false;
+ return document.contains(node);
+}

Powered by Google App Engine
This is Rietveld 408576698