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

Issue 2499303003: Views:: Use TestClipboard in ScopedViewsTestHelper. (Closed)

Created:
4 years, 1 month ago by karandeepb
Modified:
4 years, 1 month ago
Reviewers:
sky, dcheng
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Views:: Use TestClipboard in ScopedViewsTestHelper. Currently the behavior of any views_unittest which depends on clipboard is flaky. This is because the Clipboard is a global/shared resource. Hence when multiple tests are run in parallel, one test can modify the clipboard state, causing another test to flake. This CL sets up a TestClipboard instance in the ScopedViewsTestHelper. This should fix various flaky views_unittests, for example: - ViewTest.TextfieldCutCopyPaste - TextfieldTest.ReadOnlyTest - TextfieldTest.CutCopyPaste - TextfieldTest.PasswordTest etc. The following tests (disabled due to flaky selection clipboard behavior) are re- enabled: - LabelSelectionTest.SelectionClipboard - TextfieldTest.SelectionClipboard - TextfieldTest.SelectionClipboard_Password BUG=623442, 396477 Committed: https://crrev.com/80f0522d703aaf59ccbe0cb53f1eb8574187a265 Cr-Commit-Position: refs/heads/master@{#432659}

Patch Set 1 #

Patch Set 2 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -8 lines) Patch
M ui/views/controls/label_unittest.cc View 1 1 chunk +2 lines, -3 lines 0 comments Download
M ui/views/controls/textfield/textfield_unittest.cc View 1 3 chunks +4 lines, -5 lines 1 comment Download
M ui/views/test/scoped_views_test_helper.cc View 2 chunks +4 lines, -0 lines 1 comment Download

Dependent Patchsets:

Messages

Total messages: 17 (10 generated)
karandeepb
PTAL. dcheng@: TestClipboard doesn't seem to be used much in the codebase. Can you verify ...
4 years, 1 month ago (2016-11-16 04:16:15 UTC) #7
karandeepb
Also, dcheng@: Is https://bugs.chromium.org/p/chromium/issues/detail?id=629765 relevant here as well?
4 years, 1 month ago (2016-11-16 04:57:56 UTC) #9
sky
LGTM - where you put initialization is fine.
4 years, 1 month ago (2016-11-16 16:43:29 UTC) #10
dcheng
On 2016/11/16 04:16:15, karandeepb wrote: > PTAL. > > dcheng@: TestClipboard doesn't seem to be ...
4 years, 1 month ago (2016-11-16 18:44:41 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2499303003/20001
4 years, 1 month ago (2016-11-16 22:46:00 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-11-16 23:12:56 UTC) #15
commit-bot: I haz the power
4 years, 1 month ago (2016-11-16 23:15:20 UTC) #17
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/80f0522d703aaf59ccbe0cb53f1eb8574187a265
Cr-Commit-Position: refs/heads/master@{#432659}

Powered by Google App Engine
This is Rietveld 408576698