https://github.com/web-platform-tests/wpt
Revision 6e5bb4a67960776ca6514452283eed77e09edc62 authored by Makoto Shimazu on 10 April 2018, 01:23:59 UTC, committed by Philip Jägenstedt on 10 April 2018, 13:56:53 UTC
This reverts commit 2ca250d409adfa73a666daabd3ba19b94d6443a7.

Reason for revert: A leak bot complains navigation-consumes-user-activation.tentative.sub.html is leaking.
Sample build:
https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Linux%20Trusty%20Leak/builds/17509

Original change's description:
> Enable ConsumeGestureOnNavigation by default
>
> See blink-dev thread:
> https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/kPli8ZCUeok
>
> A browser test is moved to be a tentative WPT due to this change.
>
> Bug: 772515
> Change-Id: Icf99c8c303c5055dcbcdace6ae94e3fcd1a01921
> Reviewed-on: https://chromium-review.googlesource.com/980599
> Reviewed-by: Nasko Oskov <nasko@chromium.org>
> Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
> Reviewed-by: Jonathon Kereliuk <kereliuk@chromium.org>
> Commit-Queue: Charlie Harrison <csharrison@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#549293}

TBR=nasko@chromium.org,mustaq@chromium.org,csharrison@chromium.org,kereliuk@chromium.org

Change-Id: I0c998798d1367be61c633db76429c18ac554e4ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 772515
Reviewed-on: https://chromium-review.googlesource.com/1003437
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549363}
1 parent 0dcc6f1
Raw File
Tip revision: 6e5bb4a67960776ca6514452283eed77e09edc62 authored by Makoto Shimazu on 10 April 2018, 01:23:59 UTC
Revert "Enable ConsumeGestureOnNavigation by default"
Tip revision: 6e5bb4a
selectAllChildren.html
<!doctype html>
<title>Selection.selectAllChildren tests</title>
<meta name="timeout" content="long">
<div id=log></div>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=common.js></script>
<script>
"use strict";

testRanges.unshift("[]");

for (var i = 0; i < testRanges.length; i++) {
    var endpoints = eval(testRanges[i]);

    for (var j = 0; j < testNodes.length; j++) {
        var node = eval(testNodes[j]);

        test(function() {
            setSelectionForwards(endpoints);
            var originalRange = getSelection().rangeCount
                ? getSelection().getRangeAt(0)
                : null;

            if (node.nodeType == Node.DOCUMENT_TYPE_NODE) {
                assert_throws("INVALID_NODE_TYPE_ERR", function() {
                    selection.selectAllChildren(node);
                }, "selectAllChildren() on a DocumentType must throw InvalidNodeTypeError");
                return;
            }

            selection.selectAllChildren(node);
            if (!document.contains(node)) {
                if (originalRange) {
                    assert_equals(getSelection().getRangeAt(0), originalRange,
                        "selectAllChildren must do nothing");
                } else {
                    assert_equals(getSelection().rangeCount, 0,
                        "selectAllChildren must do nothing");
                }
                return;
            }
            // This implicitly tests that the selection is forwards, by using
            // anchorOffset/focusOffset instead of getRangeAt.
            assert_equals(selection.rangeCount, 1,
                "After selectAllChildren, rangeCount must be 1");
            assert_equals(selection.anchorNode, node,
                "After selectAllChildren, anchorNode must be the given node");
            assert_equals(selection.anchorOffset, 0,
                "After selectAllChildren, anchorOffset must be 0");
            assert_equals(selection.focusNode, node,
                "After selectAllChildren, focusNode must be the given node");
            assert_equals(selection.focusOffset, node.childNodes.length,
                "After selectAllChildren, focusOffset must be the given node's number of children");
            if (originalRange) {
                assert_not_equals(getSelection().getRangeAt(0), originalRange,
                    "selectAllChildren must replace any existing range, not mutate it");
            }
        }, "Range " + i + " " + testRanges[i] + ", node " + j + " " + testNodes[j]);
    }
}

testDiv.style.display = "none";
</script>
back to top