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

Issue 5564009: Temporary workaround to get tests that reference singletons either directly o... (Closed)

Created:
10 years ago by tommi (sloooow) - chröme
Modified:
9 years, 7 months ago
Reviewers:
amit, Satish
CC:
chromium-reviews, amit, Paweł Hajdan Jr.
Visibility:
Public.

Description

Temporary workaround to get tests that reference singletons either directly or indirectly to pass. With the recent Singleton refactoring, these tests started exposing some inherent problems with singletons, namely that one test can reference a state set by a different test, which can cause all sorts of flakiness. Furthermore, some of these tests could reference the registry which may have some user specific settings that could cause the tests to fail To work around these issues, I'm adding a few utility classes for tests (registry virtualization) and exposing a method to reset singletons before a test is run. TEST=Fixes flakiness and a few tests that could fail on the waterfall. BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=68701

Patch Set 1 #

Total comments: 1

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -89 lines) Patch
M chrome/installer/setup/uninstall.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome_frame/chrome_frame_unittest_main.cc View 1 2 chunks +14 lines, -28 lines 0 comments Download
M chrome_frame/test/chrome_frame_test_utils.h View 1 2 chunks +37 lines, -0 lines 0 comments Download
M chrome_frame/test/chrome_frame_test_utils.cc View 1 3 chunks +40 lines, -0 lines 0 comments Download
M chrome_frame/test/policy_settings_unittest.cc View 1 3 chunks +8 lines, -48 lines 0 comments Download
M chrome_frame/test/urlmon_moniker_unittest.cc View 1 3 chunks +4 lines, -0 lines 0 comments Download
M chrome_frame/test/util_unittests.cc View 1 9 chunks +34 lines, -10 lines 0 comments Download
M chrome_frame/urlmon_bind_status_callback.cc View 1 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
tommi (sloooow) - chröme
10 years ago (2010-12-08 23:04:15 UTC) #1
amit
lgtm, thanks for fixing the tests! http://codereview.chromium.org/5564009/diff/1/chrome_frame/test/urlmon_moniker_unittest.cc File chrome_frame/test/urlmon_moniker_unittest.cc (right): http://codereview.chromium.org/5564009/diff/1/chrome_frame/test/urlmon_moniker_unittest.cc#newcode25 chrome_frame/test/urlmon_moniker_unittest.cc:25: DeleteAllSingletons(); It safe ...
10 years ago (2010-12-08 23:40:34 UTC) #2
tommi (sloooow) - chröme
thanks. Do you mind if I remove the moniker patching code on a separate change? ...
10 years ago (2010-12-08 23:47:36 UTC) #3
amit
yeah separate CL is the way to go. If we are on it then I ...
10 years ago (2010-12-09 00:11:22 UTC) #4
tommi (sloooow) - chröme
10 years ago (2010-12-09 02:54:47 UTC) #5

          

Powered by Google App Engine
This is Rietveld 408576698