Refactor sensor layout test helper code [chromium/src : master]

0 views
Skip to first unread message

Robbie McElrath (Gerrit)

unread,
May 25, 2018, 5:29:48 PM5/25/18
to Reilly Grant, blink-...@chromium.org, mlamouri+w...@chromium.org

Robbie McElrath would like Reilly Grant to review this change.

View Change

Refactor sensor layout test helper code

Now that we're using mojo mocks for device sensor data in tests, it's
possible that the first event fired after setting new fake data won't
contain the new data yet. This isn't a bug, it's just a result of the
fact that the actual sensor code path, which we're now exercising, isn't
synchronous like the old approach was. This updates the sensor test
helpers to be more robust and handle delays in the fake data getting
through the system.

Bug: 802815
Change-Id: I32ca80369225700c13ef37b7d23f59777ab69a38
---
M third_party/WebKit/LayoutTests/device_orientation/orientation/basic-operation.html
M third_party/WebKit/LayoutTests/device_orientation/resources/device-orientation-helpers.js
M third_party/WebKit/LayoutTests/http/tests/resources/sensor-helpers.js
3 files changed, 57 insertions(+), 7 deletions(-)


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

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-Change-Id: I32ca80369225700c13ef37b7d23f59777ab69a38
Gerrit-Change-Number: 1073918
Gerrit-PatchSet: 1
Gerrit-Owner: Robbie McElrath <rmce...@chromium.org>
Gerrit-Reviewer: Reilly Grant <rei...@chromium.org>
Gerrit-Reviewer: Robbie McElrath <rmce...@chromium.org>
Gerrit-CC: Tim Volodine <timvo...@chromium.org>
Gerrit-MessageType: newchange

Robbie McElrath (Gerrit)

unread,
May 25, 2018, 5:29:49 PM5/25/18
to blink-...@chromium.org, mlamouri+w...@chromium.org, Reilly Grant, chromium...@chromium.org, Tim Volodine

This change is ready for review.

View Change

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-Change-Id: I32ca80369225700c13ef37b7d23f59777ab69a38
    Gerrit-Change-Number: 1073918
    Gerrit-PatchSet: 1
    Gerrit-Owner: Robbie McElrath <rmce...@chromium.org>
    Gerrit-Reviewer: Reilly Grant <rei...@chromium.org>
    Gerrit-Reviewer: Robbie McElrath <rmce...@chromium.org>
    Gerrit-CC: Tim Volodine <timvo...@chromium.org>
    Gerrit-Comment-Date: Fri, 25 May 2018 21:29:47 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Reilly Grant (Gerrit)

    unread,
    May 25, 2018, 6:04:05 PM5/25/18
    to Robbie McElrath, blink-...@chromium.org, mlamouri+w...@chromium.org, Reilly Grant, chromium...@chromium.org, Tim Volodine

    View Change

    1 comment:

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-Change-Id: I32ca80369225700c13ef37b7d23f59777ab69a38
    Gerrit-Change-Number: 1073918
    Gerrit-PatchSet: 1
    Gerrit-Owner: Robbie McElrath <rmce...@chromium.org>
    Gerrit-Reviewer: Reilly Grant <rei...@chromium.org>
    Gerrit-Reviewer: Robbie McElrath <rmce...@chromium.org>
    Gerrit-CC: Tim Volodine <timvo...@chromium.org>
    Gerrit-Comment-Date: Fri, 25 May 2018 22:04:01 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Robbie McElrath (Gerrit)

    unread,
    May 25, 2018, 7:34:15 PM5/25/18
    to blink-...@chromium.org, mlamouri+w...@chromium.org, Reilly Grant, chromium...@chromium.org, Tim Volodine

    View Change

    1 comment:

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-Change-Id: I32ca80369225700c13ef37b7d23f59777ab69a38
    Gerrit-Change-Number: 1073918
    Gerrit-PatchSet: 2
    Gerrit-Owner: Robbie McElrath <rmce...@chromium.org>
    Gerrit-Reviewer: Reilly Grant <rei...@chromium.org>
    Gerrit-Reviewer: Robbie McElrath <rmce...@chromium.org>
    Gerrit-CC: Tim Volodine <timvo...@chromium.org>
    Gerrit-Comment-Date: Fri, 25 May 2018 23:34:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Reilly Grant <rei...@chromium.org>
    Gerrit-MessageType: comment

    Reilly Grant (Gerrit)

    unread,
    May 25, 2018, 8:09:53 PM5/25/18
    to Robbie McElrath, blink-...@chromium.org, mlamouri+w...@chromium.org, Reilly Grant, chromium...@chromium.org, Tim Volodine

    LGTM

    Patch set 2:Code-Review +1

    View Change

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

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-Change-Id: I32ca80369225700c13ef37b7d23f59777ab69a38
      Gerrit-Change-Number: 1073918
      Gerrit-PatchSet: 2
      Gerrit-Owner: Robbie McElrath <rmce...@chromium.org>
      Gerrit-Reviewer: Reilly Grant <rei...@chromium.org>
      Gerrit-Reviewer: Robbie McElrath <rmce...@chromium.org>
      Gerrit-CC: Tim Volodine <timvo...@chromium.org>
      Gerrit-Comment-Date: Sat, 26 May 2018 00:09:41 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      Gerrit-MessageType: comment

      Robbie McElrath (Gerrit)

      unread,
      May 25, 2018, 8:12:45 PM5/25/18
      to blink-...@chromium.org, mlamouri+w...@chromium.org, Reilly Grant, chromium...@chromium.org, Tim Volodine

      Patch set 2:Commit-Queue +2

      View Change

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

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-Change-Id: I32ca80369225700c13ef37b7d23f59777ab69a38
        Gerrit-Change-Number: 1073918
        Gerrit-PatchSet: 2
        Gerrit-Owner: Robbie McElrath <rmce...@chromium.org>
        Gerrit-Reviewer: Reilly Grant <rei...@chromium.org>
        Gerrit-Reviewer: Robbie McElrath <rmce...@chromium.org>
        Gerrit-CC: Tim Volodine <timvo...@chromium.org>
        Gerrit-Comment-Date: Sat, 26 May 2018 00:12:43 +0000

        Commit Bot (Gerrit)

        unread,
        May 25, 2018, 8:57:02 PM5/25/18
        to Robbie McElrath, blink-...@chromium.org, mlamouri+w...@chromium.org, Reilly Grant, chromium...@chromium.org, Tim Volodine

        Commit Bot merged this change.

        View Change

        Approvals: Reilly Grant: Looks good to me Robbie McElrath: Commit
        Refactor sensor layout test helper code

        Now that we're using mojo mocks for device sensor data in tests, it's
        possible that the first event fired after setting new fake data won't
        contain the new data yet. This isn't a bug, it's just a result of the
        fact that the actual sensor code path, which we're now exercising, isn't
        synchronous like the old approach was. This updates the sensor test
        helpers to be more robust and handle delays in the fake data getting
        through the system.

        Bug: 802815
        Change-Id: I32ca80369225700c13ef37b7d23f59777ab69a38
        Reviewed-on: https://chromium-review.googlesource.com/1073918
        Reviewed-by: Reilly Grant <rei...@chromium.org>
        Commit-Queue: Robbie McElrath <rmce...@chromium.org>
        Cr-Commit-Position: refs/heads/master@{#562089}

        ---
        M third_party/WebKit/LayoutTests/device_orientation/orientation/basic-operation.html
        M third_party/WebKit/LayoutTests/device_orientation/resources/device-orientation-helpers.js
        M third_party/WebKit/LayoutTests/http/tests/resources/sensor-helpers.js
        3 files changed, 60 insertions(+), 7 deletions(-)


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

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-Change-Id: I32ca80369225700c13ef37b7d23f59777ab69a38
        Gerrit-Change-Number: 1073918
        Gerrit-PatchSet: 3
        Gerrit-Owner: Robbie McElrath <rmce...@chromium.org>
        Gerrit-Reviewer: Commit Bot <commi...@chromium.org>
        Gerrit-Reviewer: Reilly Grant <rei...@chromium.org>
        Gerrit-Reviewer: Robbie McElrath <rmce...@chromium.org>
        Gerrit-CC: Tim Volodine <timvo...@chromium.org>
        Gerrit-MessageType: merged
        Reply all
        Reply to author
        Forward
        0 new messages