New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 672831 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Android MediaRouter only (left Chro...
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

AutoplayUmaHelperTest.VisibilityChangeWhenUnload is flaky

Project Member Reported by primiano@chromium.org, Dec 9 2016

Issue description

Got a CQ failure on https://codereview.chromium.org/2549103003/ which seems totally unrelated with my change.

Failure from [1]

../../third_party/WebKit/Source/core/html/AutoplayUmaHelperTest.cpp:23: ERROR: this mock object (used in test AutoplayUmaHelperTest.VisibilityChangeWhenUnload) should be deleted but never is. Its address is @0x7ee35a5674f8.
ERROR: 1 leaked mock object found at program exit.

AutoplayUmaHelperTest.VisibilityChangeWhenUnload (run #4):

Possibly related with:
https://codereview.chromium.org/2463113002
"Let AutoplayUmaHelper listen to visibilitychange instead of unload"


[1] https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Ftryserver.chromium.linux%2Flinux_chromium_asan_rel_ng%2F276698%2F%2B%2Frecipes%2Fsteps%2Fwebkit_unit_tests__with_patch_%2F0%2Flogs%2FAutoplayUmaHelperTest.VisibilityChangeWhenUnload%2F0
 
Components: -Infra>CQ Blink>Media
Status: Assigned (was: Unconfirmed)
Thanks for the report. Working on this :)
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8906ce8b964bf3431b891bc9eaaca54ad8981f7d

commit 8906ce8b964bf3431b891bc9eaaca54ad8981f7d
Author: zqzhang <zqzhang@chromium.org>
Date: Mon Dec 12 22:44:35 2016

Fix gmock leak issue in AutoplayUmaHelperTest

AutoplayUmaHelperTest currently uses GMock for mock
AutoplayUmaHelper in order to check if events are correctly
received. However this will make the test flaky since
MockAutoplyUmaHelper is garbage-collected but GMock expect it to
be destroyed when the test finishes.

This CL marks MockAutoplayUmaHelper as AllowLeak which fixes the
issue.

BUG= 672831 

Review-Url: https://codereview.chromium.org/2562683004
Cr-Commit-Position: refs/heads/master@{#437939}

[modify] https://crrev.com/8906ce8b964bf3431b891bc9eaaca54ad8981f7d/third_party/WebKit/Source/core/html/AutoplayUmaHelperTest.cpp

I see the flakiness is gone (even before I landed the fix...)
Let's keep it open for a couple of days and check again.

Flakiness dashboard:
https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webkit_unit_tests&showAllRuns=true&tests=autoplay
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/99ac6d968116db3f8257044d3215fd222f9d7b81

commit 99ac6d968116db3f8257044d3215fd222f9d7b81
Author: zqzhang <zqzhang@chromium.org>
Date: Fri Dec 16 21:58:06 2016

Follow-up fix for leaking mock object in AutoplayUmaHelperTest

A previous attempt for fixing AutoplayUmaHelperTest uses
::testing::Mock::VerifyAndClear to clean up the expectations on the
mock. However it does not ignore the mock object to be leaked. This CL
solves the issue by calling ::testing::Mock::AllowLeak in SetUp().

BUG= 672831 

Review-Url: https://codereview.chromium.org/2580003002
Cr-Commit-Position: refs/heads/master@{#439205}

[modify] https://crrev.com/99ac6d968116db3f8257044d3215fd222f9d7b81/third_party/WebKit/Source/core/html/AutoplayUmaHelperTest.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment