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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/selection/extend.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/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 6a2307e5e5396f5b67e5a5b2a6d6685a903ed257..a3be628d6c8d37ce5f646656b3fc6ba7b3808cb9 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/selection/extend.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/selection/extend.js
@@ -23,6 +23,9 @@ function testExtendSubSet(startIndex, optionalEndIndex) {
// selections only once.
for (var i = startIndex; i < endIndex; i++) {
var endpoints = eval(testRanges[i]);
+ // We can't test extend() with unselectable endpoints.
+ if (!isSelectableNode(endpoints[0]) || !isSelectableNode(endpoints[2]))
+ continue;
for (var j = 0; j < testPoints.length; j++) {
if (endpoints[0] == endpoints[2]
&& endpoints[1] == endpoints[3]) {

Powered by Google App Engine
This is Rietveld 408576698