Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Issue 16472006: Add unit tests for screen capture and share notification UI. (Closed)

Created:
7 years, 6 months ago by Tim Song
Modified:
7 years, 6 months ago
Reviewers:
James Cook
CC:
chromium-reviews, stevenjb+watch_chromium.org, sadrul, oshima+watch_chromium.org, ben+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add unit tests for screen capture and share notification UI. BUG=246277 TEST=unit tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=204974

Patch Set 1 #

Total comments: 20

Patch Set 2 : #

Total comments: 1

Patch Set 3 : Escape unicode characters #

Patch Set 4 : Fix memory leak #

Patch Set 5 : Added test for system tray interaction #

Unified diffs Side-by-side diffs Delta from patch set Stats (+222 lines, -5 lines) Patch
M ash/ash.gyp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ash/system/chromeos/screen_security/screen_capture_tray_item.h View 1 chunk +2 lines, -2 lines 0 comments Download
M ash/system/chromeos/screen_security/screen_share_tray_item.h View 1 chunk +2 lines, -2 lines 0 comments Download
M ash/system/chromeos/screen_security/screen_tray_item.h View 1 chunk +1 line, -1 line 0 comments Download
A ash/system/chromeos/screen_security/screen_tray_item_unittest.cc View 1 2 3 4 1 chunk +216 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Tim Song
Hi James. These are the unit tests for the screen capture UI patch that just ...
7 years, 6 months ago (2013-06-07 02:08:23 UTC) #1
James Cook
Overall approach looks fine, and coverage looks good. Some comments. https://codereview.chromium.org/16472006/diff/1/ash/system/chromeos/screen_security/screen_tray_item_unittest.cc File ash/system/chromeos/screen_security/screen_tray_item_unittest.cc (right): https://codereview.chromium.org/16472006/diff/1/ash/system/chromeos/screen_security/screen_tray_item_unittest.cc#newcode8 ...
7 years, 6 months ago (2013-06-07 14:16:37 UTC) #2
Tim Song
Thanks for taking a look, James. https://codereview.chromium.org/16472006/diff/1/ash/system/chromeos/screen_security/screen_tray_item_unittest.cc File ash/system/chromeos/screen_security/screen_tray_item_unittest.cc (right): https://codereview.chromium.org/16472006/diff/1/ash/system/chromeos/screen_security/screen_tray_item_unittest.cc#newcode8 ash/system/chromeos/screen_security/screen_tray_item_unittest.cc:8: On 2013/06/07 14:16:37, ...
7 years, 6 months ago (2013-06-07 18:14:34 UTC) #3
James Cook
LGTM assuming last comment addressed https://codereview.chromium.org/16472006/diff/5001/ash/system/chromeos/screen_security/screen_tray_item_unittest.cc File ash/system/chromeos/screen_security/screen_tray_item_unittest.cc (right): https://codereview.chromium.org/16472006/diff/5001/ash/system/chromeos/screen_security/screen_tray_item_unittest.cc#newcode20 ash/system/chromeos/screen_security/screen_tray_item_unittest.cc:20: const char kTestScreenCaptureAppName[] = ...
7 years, 6 months ago (2013-06-07 18:45:55 UTC) #4
Tim Song
I escaped the unicode characters to use the raw UTF-8 bytes of the characters.
7 years, 6 months ago (2013-06-07 19:42:47 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tengs@chromium.org/16472006/6007
7 years, 6 months ago (2013-06-07 19:44:12 UTC) #6
commit-bot: I haz the power
Change committed as 204974
7 years, 6 months ago (2013-06-07 23:26:53 UTC) #7
James Cook
On 2013/06/07 23:26:53, I haz the power (commit-bot) wrote: > Change committed as 204974 The ...
7 years, 6 months ago (2013-06-10 23:28:18 UTC) #8
Tim Song
It turns out the memory leak was because I forgot to add the TrayItems created ...
7 years, 6 months ago (2013-06-21 18:13:41 UTC) #9
Tim Song
I also added another test that will fail if the tray items were not added ...
7 years, 6 months ago (2013-06-21 19:44:20 UTC) #10
James Cook
7 years, 6 months ago (2013-06-21 20:48:19 UTC) #11
On 2013/06/21 19:44:20, Tim Song wrote:
> I also added another test that will fail if the tray items were not added to
the
> system tray. I had some difficulties with testability, in that we can't
> explicitly check what tray items have been added, and animations introduce
time
> dependent states. Would it be a good idea to do some refactoring for
> testability?

This patch was reverted, right?  You might want to upload to a new patch to make
that more clear.

There are usually ways to disable animations for test, look for
DisableAnimationsForTest() in other tests or
ScopedAnimationDurationScaleMode::ZERO_DURATION.

Powered by Google App Engine
This is Rietveld 408576698