| 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 51579e42444e3c723ed9c80283887d163bfd150d..3bdc509462bd3713fbdb5110c8739b911151f4e8 100644
|
| --- a/third_party/WebKit/LayoutTests/external/wpt/selection/common.js
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/selection/common.js
|
| @@ -964,13 +964,25 @@ function setSelectionBackwards(endpoints) {
|
| * This function should be used in testharness tests.
|
| */
|
| function assertSelectionNoChange(func) {
|
| - var originalCount = getSelection().rangeCount;
|
| + var originalCount = selection.rangeCount;
|
| var originalRange = originalCount == 0 ? null : selection.getRangeAt(0);
|
| + var originalAnchorNode = selection.anchorNode;
|
| + var originalAnchorOffset = selection.anchorOffset;
|
| + var originalFocusNode = selection.focusNode;
|
| + var originalFocusOffset = selection.focusOffset;
|
|
|
| func();
|
|
|
| assert_equals(selection.rangeCount, originalCount,
|
| "The operation should not add Range");
|
| + assert_equals(selection.anchorNode, originalAnchorNode,
|
| + "The operation should not update anchorNode");
|
| + assert_equals(selection.anchorOffset, originalAnchorOffset,
|
| + "The operation should not update anchorOffset");
|
| + assert_equals(selection.focusNode, originalFocusNode,
|
| + "The operation should not update focusNode");
|
| + assert_equals(selection.focusOffset, originalFocusOffset,
|
| + "The operation should not update focusOffset");
|
| if (originalCount < 1)
|
| return;
|
| assert_equals(selection.getRangeAt(0), originalRange,
|
|
|