Converts editing/execCommand/list-wrapping-image-crash.html to utilize assert_selection(). [chromium/src : master]

0 views
Skip to first unread message

Akari Asai (Gerrit)

unread,
Aug 17, 2017, 9:32:28 PM8/17/17
to blink-...@chromium.org, Xiaocheng Hu, chromium...@chromium.org

This change is ready for review.

View Change

    To view, visit change 620329. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: I499a669165d61f8644bcf62fca3d71f9b4d9b027
    Gerrit-Change-Number: 620329
    Gerrit-PatchSet: 1
    Gerrit-Owner: Akari Asai <akar...@google.com>
    Gerrit-Reviewer: Akari Asai <akar...@google.com>
    Gerrit-Reviewer: Xiaocheng Hu <xiaoc...@chromium.org>
    Gerrit-Reviewer: Yoshifumi Inoue <yo...@chromium.org>
    Gerrit-Comment-Date: Fri, 18 Aug 2017 01:32:21 +0000
    Gerrit-HasComments: No
    Gerrit-HasLabels: No

    Yoshifumi Inoue (Gerrit)

    unread,
    Aug 18, 2017, 2:05:56 AM8/18/17
    to Akari Asai, blink-...@chromium.org, Xiaocheng Hu, chromium...@chromium.org

    View Change

    1 comment:

    To view, visit change 620329. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: I499a669165d61f8644bcf62fca3d71f9b4d9b027
    Gerrit-Change-Number: 620329
    Gerrit-PatchSet: 1
    Gerrit-Owner: Akari Asai <akar...@google.com>
    Gerrit-Reviewer: Akari Asai <akar...@google.com>
    Gerrit-Reviewer: Xiaocheng Hu <xiaoc...@chromium.org>
    Gerrit-Reviewer: Yoshifumi Inoue <yo...@chromium.org>
    Gerrit-Comment-Date: Fri, 18 Aug 2017 06:05:51 +0000
    Gerrit-HasComments: Yes
    Gerrit-HasLabels: No

    Akari Asai (Gerrit)

    unread,
    Aug 18, 2017, 8:11:42 AM8/18/17
    to blink-...@chromium.org, Xiaocheng Hu, chromium...@chromium.org

    View Change

    1 comment:

    To view, visit change 620329. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: I499a669165d61f8644bcf62fca3d71f9b4d9b027
    Gerrit-Change-Number: 620329
    Gerrit-PatchSet: 3
    Gerrit-Owner: Akari Asai <akar...@google.com>
    Gerrit-Reviewer: Akari Asai <akar...@google.com>
    Gerrit-Reviewer: Xiaocheng Hu <xiaoc...@chromium.org>
    Gerrit-Reviewer: Yoshifumi Inoue <yo...@chromium.org>
    Gerrit-Comment-Date: Fri, 18 Aug 2017 12:11:36 +0000
    Gerrit-HasComments: Yes
    Gerrit-HasLabels: No

    Xiaocheng Hu (Gerrit)

    unread,
    Aug 18, 2017, 2:20:37 PM8/18/17
    to Akari Asai, blink-...@chromium.org, chromium...@chromium.org

    LGTM with a nit.

    Patch set 3:Code-Review +1

    View Change

    1 comment:

    To view, visit change 620329. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: I499a669165d61f8644bcf62fca3d71f9b4d9b027
    Gerrit-Change-Number: 620329
    Gerrit-PatchSet: 3
    Gerrit-Owner: Akari Asai <akar...@google.com>
    Gerrit-Reviewer: Akari Asai <akar...@google.com>
    Gerrit-Reviewer: Xiaocheng Hu <xiaoc...@chromium.org>
    Gerrit-Reviewer: Yoshifumi Inoue <yo...@chromium.org>
    Gerrit-Comment-Date: Fri, 18 Aug 2017 18:20:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-HasLabels: Yes

    Akari Asai (Gerrit)

    unread,
    Aug 20, 2017, 9:31:00 PM8/20/17
    to blink-...@chromium.org, Xiaocheng Hu, chromium...@chromium.org

    Fixed the selection command to make it follow C++ naming style.

    View Change

    1 comment:

    To view, visit change 620329. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: I499a669165d61f8644bcf62fca3d71f9b4d9b027
    Gerrit-Change-Number: 620329
    Gerrit-PatchSet: 4
    Gerrit-Owner: Akari Asai <akar...@google.com>
    Gerrit-Reviewer: Akari Asai <akar...@google.com>
    Gerrit-Reviewer: Xiaocheng Hu <xiaoc...@chromium.org>
    Gerrit-Reviewer: Yoshifumi Inoue <yo...@chromium.org>
    Gerrit-Comment-Date: Mon, 21 Aug 2017 01:30:53 +0000
    Gerrit-HasComments: Yes
    Gerrit-HasLabels: No

    Akari Asai (Gerrit)

    unread,
    Aug 20, 2017, 9:31:05 PM8/20/17
    to blink-...@chromium.org, Xiaocheng Hu, chromium...@chromium.org

    Patch set 4:Commit-Queue +2

    View Change

      To view, visit change 620329. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-MessageType: comment
      Gerrit-Change-Id: I499a669165d61f8644bcf62fca3d71f9b4d9b027
      Gerrit-Change-Number: 620329
      Gerrit-PatchSet: 4
      Gerrit-Owner: Akari Asai <akar...@google.com>
      Gerrit-Reviewer: Akari Asai <akar...@google.com>
      Gerrit-Reviewer: Xiaocheng Hu <xiaoc...@chromium.org>
      Gerrit-Reviewer: Yoshifumi Inoue <yo...@chromium.org>
      Gerrit-Comment-Date: Mon, 21 Aug 2017 01:31:01 +0000
      Gerrit-HasComments: No
      Gerrit-HasLabels: Yes

      Commit Bot (Gerrit)

      unread,
      Aug 20, 2017, 9:31:09 PM8/20/17
      to Akari Asai, blink-...@chromium.org, Xiaocheng Hu, chromium...@chromium.org

      CQ is trying da patch.

      Note: The patchset sent to CQ was uploaded after this CL was approved.
      "Fixed the selection to follow JS naming style" https://chromium-review.googlesource.com/c/620329/4

      Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/chromium-review.googlesource.com/620329/4

      Bot data: {"action": "start", "triggered_at": "2017-08-21T01:31:01.0Z", "cq_cfg_revision": "81f1a3f0cb07446abeff7dd01ff1b8bae94ffe0d", "revision": "f9e62001d52953491019fa28a0a0d4ac315b5e0e"}

      View Change

        To view, visit change 620329. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: comment
        Gerrit-Change-Id: I499a669165d61f8644bcf62fca3d71f9b4d9b027
        Gerrit-Change-Number: 620329
        Gerrit-PatchSet: 4
        Gerrit-Owner: Akari Asai <akar...@google.com>
        Gerrit-Reviewer: Akari Asai <akar...@google.com>
        Gerrit-Reviewer: Xiaocheng Hu <xiaoc...@chromium.org>
        Gerrit-Reviewer: Yoshifumi Inoue <yo...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-Comment-Date: Mon, 21 Aug 2017 01:31:06 +0000
        Gerrit-HasComments: No
        Gerrit-HasLabels: No

        Commit Bot (Gerrit)

        unread,
        Aug 20, 2017, 10:43:06 PM8/20/17
        to Akari Asai, blink-...@chromium.org, Xiaocheng Hu, chromium...@chromium.org

        Commit Bot merged this change.

        View Change

        Approvals: Xiaocheng Hu: Looks good to me Akari Asai: Commit
        Converts editing/execCommand/list-wrapping-image-crash.html to utilize assert_selection().

        This patch converts "editing/execCommand/list-wrapping-image-crash.html"
        to utilize |assert_selection()| for ease of maintaining this test
        script to provide a hint of what this test script, for improving code health.

        Bug: 753289, 679977
        Change-Id: I499a669165d61f8644bcf62fca3d71f9b4d9b027
        Reviewed-on: https://chromium-review.googlesource.com/620329
        Commit-Queue: Akari Asai <akar...@google.com>
        Reviewed-by: Xiaocheng Hu <xiaoc...@chromium.org>
        Cr-Commit-Position: refs/heads/master@{#495862}
        ---
        D third_party/WebKit/LayoutTests/editing/execCommand/list-wrapping-image-crash-expected.txt
        M third_party/WebKit/LayoutTests/editing/execCommand/list-wrapping-image-crash.html
        2 files changed, 15 insertions(+), 9 deletions(-)

        diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/list-wrapping-image-crash-expected.txt b/third_party/WebKit/LayoutTests/editing/execCommand/list-wrapping-image-crash-expected.txt
        deleted file mode 100644
        index fb37d38..0000000
        --- a/third_party/WebKit/LayoutTests/editing/execCommand/list-wrapping-image-crash-expected.txt
        +++ /dev/null
        @@ -1 +0,0 @@
        -PASSED - this test case didn't ASSERT, bug 19066
        diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/list-wrapping-image-crash.html b/third_party/WebKit/LayoutTests/editing/execCommand/list-wrapping-image-crash.html
        index 2414d7e..2abcf40 100644
        --- a/third_party/WebKit/LayoutTests/editing/execCommand/list-wrapping-image-crash.html
        +++ b/third_party/WebKit/LayoutTests/editing/execCommand/list-wrapping-image-crash.html
        @@ -1,10 +1,17 @@
        -<body>
        +<!doctype html>
        +<script src="../../resources/testharness.js"></script>
        +<script src="../../resources/testharnessreport.js"></script>
        +<script src="../assert_selection.js"></script>
        <script>
        -if (window.testRunner)
        - testRunner.dumpAsText();
        -document.designMode = "on";
        -document.execCommand('selectall');
        -document.execCommand('insertimage');
        -document.execCommand('insertorderedlist');
        -document.body.innerHTML = "PASSED - this test case didn't ASSERT, bug 19066";
        +test(()=> assert_selection(
        + '<div contenteditable><img>|</div>',
        + 'insertOrderedList',
        + [
        + "<div contenteditable>",
        + "<ol>",
        + "<li><img>|</li>",
        + "</ol>",
        + "</div>"]),
        + 'This insertOrderedList on an image in an editable region without selection change.');
        </script>
        +

        To view, visit change 620329. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: merged
        Gerrit-Change-Id: I499a669165d61f8644bcf62fca3d71f9b4d9b027
        Gerrit-Change-Number: 620329
        Gerrit-PatchSet: 5
        Gerrit-Owner: Akari Asai <akar...@google.com>
        Gerrit-Reviewer: Akari Asai <akar...@google.com>
        Gerrit-Reviewer: Commit Bot <commi...@chromium.org>
        Gerrit-Reviewer: Xiaocheng Hu <xiaoc...@chromium.org>
        Gerrit-Reviewer: Yoshifumi Inoue <yo...@chromium.org>

        Akari Asai (Gerrit)

        unread,
        Aug 28, 2017, 7:37:15 AM8/28/17
        to blink-...@chromium.org, Xiaocheng Hu, chromium...@chromium.org

        This change is ready for review.

        View Change

          To view, visit change 632197. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: master
          Gerrit-MessageType: comment
          Gerrit-Change-Id: I5d5af3e1fbed930b35ce8d0b9f8c8a7b97271364
          Gerrit-Change-Number: 632197
          Gerrit-PatchSet: 5
          Gerrit-Owner: Akari Asai <akar...@google.com>
          Gerrit-Reviewer: Akari Asai <akar...@google.com>
          Gerrit-Reviewer: Xiaocheng Hu <xiaoc...@chromium.org>
          Gerrit-Reviewer: Yoichi Osato <yoi...@chromium.org>
          Gerrit-Reviewer: Yoshifumi Inoue <yo...@chromium.org>
          Gerrit-Comment-Date: Mon, 28 Aug 2017 11:37:08 +0000
          Gerrit-HasComments: No
          Gerrit-HasLabels: No

          Xiaocheng Hu (Gerrit)

          unread,
          Aug 28, 2017, 2:03:45 PM8/28/17
          to Akari Asai, blink-...@chromium.org, chromium...@chromium.org

          Patch set 5:Code-Review +1

          View Change

          3 comments:

          To view, visit change 632197. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: master
          Gerrit-MessageType: comment
          Gerrit-Change-Id: I5d5af3e1fbed930b35ce8d0b9f8c8a7b97271364
          Gerrit-Change-Number: 632197
          Gerrit-PatchSet: 5
          Gerrit-Owner: Akari Asai <akar...@google.com>
          Gerrit-Reviewer: Akari Asai <akar...@google.com>
          Gerrit-Reviewer: Xiaocheng Hu <xiaoc...@chromium.org>
          Gerrit-Reviewer: Yoichi Osato <yoi...@chromium.org>
          Gerrit-Reviewer: Yoshifumi Inoue <yo...@chromium.org>
          Gerrit-Comment-Date: Mon, 28 Aug 2017 18:03:42 +0000
          Gerrit-HasComments: Yes
          Gerrit-HasLabels: Yes

          Akari Asai (Gerrit)

          unread,
          Aug 28, 2017, 9:04:00 PM8/28/17
          to blink-...@chromium.org, Xiaocheng Hu, chromium...@chromium.org

          View Change

          3 comments:

            • Patch Set #5, Line 9:

                '<div contenteditable>',
              '<table>',
              '<tbody>',
              '<td style="display:inline-block">',
              '<ruby><rt>a|</rt></ruby>',
              '</td>',
              '</tbody>',
              '</table>^',
              '</div>'

              Use single quote for the outer quotes, and double quote as the inner ones.

            • Done

            • Patch Set #5, Line 20:

                '<div contenteditable>',
              '<table>',
              '<tbody>',
              '<tr><td style="display:inline-block">',
              '<ruby><rt>a</rt></ruby>',
              '</td></tr>',
              '<tr><span style="font-size: 8px;">|<br></span></tr>',
              '</tbody>',
              '</table>',
              '</div>'

            • Use single quote for the outer quotes, and double quote as the inner ones. […]

              Done

          To view, visit change 632197. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: master
          Gerrit-MessageType: comment
          Gerrit-Change-Id: I5d5af3e1fbed930b35ce8d0b9f8c8a7b97271364
          Gerrit-Change-Number: 632197
          Gerrit-PatchSet: 6
          Gerrit-Owner: Akari Asai <akar...@google.com>
          Gerrit-Reviewer: Akari Asai <akar...@google.com>
          Gerrit-Reviewer: Xiaocheng Hu <xiaoc...@chromium.org>
          Gerrit-Reviewer: Yoichi Osato <yoi...@chromium.org>
          Gerrit-Reviewer: Yoshifumi Inoue <yo...@chromium.org>
          Gerrit-Comment-Date: Tue, 29 Aug 2017 01:03:55 +0000
          Gerrit-HasComments: Yes
          Gerrit-HasLabels: No

          Yoshifumi Inoue (Gerrit)

          unread,
          Aug 30, 2017, 5:52:17 AM8/30/17
          to Akari Asai, blink-...@chromium.org, Commit Bot, Xiaocheng Hu, chromium...@chromium.org

          lgtm

          Patch set 7:Code-Review +1Commit-Queue +2

          View Change

            To view, visit change 632197. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: chromium/src
            Gerrit-Branch: master
            Gerrit-MessageType: comment
            Gerrit-Change-Id: I5d5af3e1fbed930b35ce8d0b9f8c8a7b97271364
            Gerrit-Change-Number: 632197
            Gerrit-PatchSet: 7
            Gerrit-Owner: Akari Asai <akar...@google.com>
            Gerrit-Reviewer: Akari Asai <akar...@google.com>
            Gerrit-Reviewer: Xiaocheng Hu <xiaoc...@chromium.org>
            Gerrit-Reviewer: Yoichi Osato <yoi...@chromium.org>
            Gerrit-Reviewer: Yoshifumi Inoue <yo...@chromium.org>
            Gerrit-CC: Commit Bot <commi...@chromium.org>
            Gerrit-Comment-Date: Wed, 30 Aug 2017 09:52:11 +0000
            Gerrit-HasComments: No
            Gerrit-HasLabels: Yes

            Commit Bot (Gerrit)

            unread,
            Aug 30, 2017, 8:05:53 AM8/30/17
            to Akari Asai, blink-...@chromium.org, Xiaocheng Hu, chromium...@chromium.org

            Commit Bot merged this change.

            View Change

            Approvals: Yoshifumi Inoue: Looks good to me; Commit Xiaocheng Hu: Looks good to me
            Converts editing/execCommand/list-wrapping-image-crash.html to utilize assert_selection().

            This patch converts "editing/execCommand/insert-paragraph-into-table.html"

            to utilize |assert_selection()| for ease of maintaining this test
            script to provide a hint of what this test script, for improving code health.

            Bug: 753289, 679977
            Change-Id: I5d5af3e1fbed930b35ce8d0b9f8c8a7b97271364
            Reviewed-on: https://chromium-review.googlesource.com/632197
            Commit-Queue: Yoshifumi Inoue <yo...@chromium.org>
            Reviewed-by: Yoshifumi Inoue <yo...@chromium.org>
            Reviewed-by: Xiaocheng Hu <xiaoc...@chromium.org>
            Cr-Commit-Position: refs/heads/master@{#498428}
            ---
            M third_party/WebKit/LayoutTests/editing/execCommand/insert-paragraph-into-table.html
            1 file changed, 28 insertions(+), 13 deletions(-)

            diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/insert-paragraph-into-table.html b/third_party/WebKit/LayoutTests/editing/execCommand/insert-paragraph-into-table.html
            index 8727d5e..6f1a147 100644
            --- a/third_party/WebKit/LayoutTests/editing/execCommand/insert-paragraph-into-table.html
            +++ b/third_party/WebKit/LayoutTests/editing/execCommand/insert-paragraph-into-table.html
            @@ -1,17 +1,32 @@
            -<!DOCTYPE html>
            +<!doctype html>
            <script src="../../resources/testharness.js"></script>
            <script src="../../resources/testharnessreport.js"></script>
            -<div id="sample" contenteditable>
            -<table><td style="display:inline-block"><ruby><rt>a</rt></ruby></td></table>
            -</div>
            -<div id="log"></div>

            +<script src="../assert_selection.js"></script>
            <script>
            -test(function() {
            - var selection = window.getSelection();
            - var sample = document.getElementById('sample');
            - selection.collapse(sample, 2);
            - selection.extend(document.querySelector('rt').firstChild, 1);
            - document.execCommand('InsertParagraph');
            - assert_equals(sample.innerHTML.replace(/\n/g, ''), '<table><tbody><tr><td style="display:inline-block"><ruby><rt>a</rt></ruby></td></tr><tr><font size="1"><br></font></tr></tbody></table>');
            -});
            +//This is a test case for crbug.com/535510
            +test(()=> assert_selection(

            + [
            + '<div contenteditable>',
            +    '<table>',
            + '<tbody>',
            + '<td style="display:inline-block">',
            + '<ruby><rt>a|</rt></ruby>',
            + '</td>',
            + '</tbody>',
            + '</table>^',
            + '</div>'],
            + 'InsertParagraph',

            + [
            + '<div contenteditable>',
            +    '<table>',
            + '<tbody>',
            + '<tr><td style="display:inline-block">',
            + '<ruby><rt>a</rt></ruby>',
            + '</td></tr>',
            + '<tr><font size="1">|<br></font></tr>',
            + '</tbody>',
            + '</table>',
            + '</div>'
            + ]),
            + "This InsertParagraph non-table layout item into table layout.");
            </script>

            To view, visit change 632197. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: chromium/src
            Gerrit-Branch: master
            Gerrit-MessageType: merged
            Gerrit-Change-Id: I5d5af3e1fbed930b35ce8d0b9f8c8a7b97271364
            Gerrit-Change-Number: 632197
            Gerrit-PatchSet: 8
            Gerrit-Owner: Akari Asai <akar...@google.com>
            Gerrit-Reviewer: Akari Asai <akar...@google.com>
            Gerrit-Reviewer: Commit Bot <commi...@chromium.org>
            Gerrit-Reviewer: Xiaocheng Hu <xiaoc...@chromium.org>
            Gerrit-Reviewer: Yoichi Osato <yoi...@chromium.org>
            Gerrit-Reviewer: Yoshifumi Inoue <yo...@chromium.org>
            Reply all
            Reply to author
            Forward
            0 new messages