New issue
Advanced search Search tips

Issue 762405 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Sep 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

Flaky test: DownloadItemControllerTest

Project Member Reported by tyoshino@chromium.org, Sep 6 2017

Issue description

They are flaky (crashing) on:
- Mac10.10 Tests
- Mac10.11 Tests

 
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 6 2017

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

commit c34513757e8d5d85cdfe2f3bf7a4b972129e9d24
Author: Takeshi Yoshino <tyoshino@chromium.org>
Date: Wed Sep 06 09:09:42 2017

Disable flaky (crashing) test cases on DownloadItemControllerTest

- DownloadItemControllerTest.ShelfNotifiedOfOpenedDownload
- DownloadItemControllerTest.NormalDownload
- DownloadItemControllerTest.NormalDownloadBecomesDangerous

Tbr: asanka@chromium.org
Bug:  762405 
Change-Id: I0bd83fd723dd09d0226c45036950c0004880e7dc
Reviewed-on: https://chromium-review.googlesource.com/651990
Commit-Queue: Takeshi Yoshino <tyoshino@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499911}
[modify] https://crrev.com/c34513757e8d5d85cdfe2f3bf7a4b972129e9d24/chrome/browser/ui/cocoa/download/download_item_controller_unittest.mm

Summary: Flaky test: DownloadItemControllerTest (was: Flaky test: DownloadItemControllerTest.ShelfNotifiedOfOpenedDownload and DownloadItemControllerTest.NormalDownload)
Owner: ----
Putting this back in the triage queue.

Comment 6 by sdy@chromium.org, Sep 7 2017

Cc: sdy@chromium.org
 Issue 762078  has been merged into this issue.

Comment 7 by sdy@chromium.org, Sep 7 2017

Cc: -sdy@chromium.org
Owner: sdy@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 11 2017

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

commit 1f0ea42106a4de6263a67939bf2d6a9843135ab4
Author: Sidney San Martín <sdy@chromium.org>
Date: Mon Sep 11 17:31:45 2017

De-flake some download shelf tests.

The test crashes had two causes:

1. The DownloadItemController was sometimes deallocated after the
   DownloadShelfController, and how AppKit retains view controllers can
   change between macOS versions. DownloadItemController was left with a
   dangling pointer to the shelf.

2. DismissesContextMenuWhenRemovedFromWindow found the
   DownloadItemButton in the view hierarchy and removed it. However, the
   view hierarchy had the only strong reference to the button and this
   created a dangling pointer in DownloadItemController.

Fix (1) by giving DownloadItemController a `shelf` property that can be
cleared when the shelf controller disowns an item (which is good for
correctness in general). Fix (2) by removing `[DownloadItemController
view]` from the hierarchy instead, since it's strongly referenced by
DownloadItemController. Also, test that the context menu was shown with
a different method that doesn't require digging around in the view
hierarchy.

Bug:  762405 
Change-Id: I06164aae8dc03f16a48427ae0613bba74974b6d6
Reviewed-on: https://chromium-review.googlesource.com/660517
Commit-Queue: Sidney San Martín <sdy@chromium.org>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500959}
[modify] https://crrev.com/1f0ea42106a4de6263a67939bf2d6a9843135ab4/chrome/browser/ui/cocoa/download/download_item_button.mm
[modify] https://crrev.com/1f0ea42106a4de6263a67939bf2d6a9843135ab4/chrome/browser/ui/cocoa/download/download_item_controller.h
[modify] https://crrev.com/1f0ea42106a4de6263a67939bf2d6a9843135ab4/chrome/browser/ui/cocoa/download/download_item_controller.mm
[modify] https://crrev.com/1f0ea42106a4de6263a67939bf2d6a9843135ab4/chrome/browser/ui/cocoa/download/download_item_controller_unittest.mm
[modify] https://crrev.com/1f0ea42106a4de6263a67939bf2d6a9843135ab4/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
[modify] https://crrev.com/1f0ea42106a4de6263a67939bf2d6a9843135ab4/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm

Comment 9 by sdy@chromium.org, Sep 11 2017

Status: Fixed (was: Started)
tyoshino@: The above commit should resolve the flakiness. Is there a process for confirming that?

Comment 10 by sdy@chromium.org, Sep 11 2017

NextAction: 2017-09-18
The NextAction date has arrived: 2017-09-18

Comment 12 by sdy@chromium.org, Sep 18 2017

NextAction: ----
Status: Verified (was: Fixed)
As far as I can tell, these tests are no longer flaky.

Sign in to add a comment