Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in

Issue 2893803005: Fail tests fast if Windows registry key override fails (Closed)

9 months ago by pmarko
9 months ago
Target Ref:


Fail tests fast if Windows registry key override fails policy_loader_win_unittest uses RegOverridePredefKey to remap registry keys to a temporary key for the duration of the test. If this remapping fails, the test should fail fast to avoid accidentally creating persistent changes in the machine's registry. This is done by moving the remap step into the test's SetUp() method. gtest documentation says that the test will not continue if an ASSERT fails in SetUp()[1][2]. Also, we now delete the temporary registry keys if they already exist. These are keyed by the process id, so a subsequent test could reuse an existing temporary key if the previous test (with the same process id) crashed and failed to clean up. [1] [2] BUG=721691 Review-Url: Cr-Commit-Position: refs/heads/master@{#473174} Committed:

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -17 lines) Patch
M components/policy/core/common/ View 1 chunk +1 line, -1 line 0 comments Download
M components/policy/core/common/ View 1 6 chunks +45 lines, -16 lines 0 comments Download


Total messages: 12 (5 generated)
Julian, PTAL.
9 months ago (2017-05-19 10:56:47 UTC) #3
pastarmovj File components/policy/core/common/ (right): components/policy/core/common/ ScopedGroupPolicyRegistrySandbox::ScopedGroupPolicyRegistrySandbox() { move constructor code over and auto result1 ...
9 months ago (2017-05-19 11:14:17 UTC) #4
Thank you, PTAL! File components/policy/core/common/ (right): components/policy/core/common/ ScopedGroupPolicyRegistrySandbox::ScopedGroupPolicyRegistrySandbox() { On 2017/05/19 11:14:17, pastarmovj ...
9 months ago (2017-05-19 11:27:27 UTC) #5
lgtm ps. I built and ran the tests and they pass and does not leave ...
9 months ago (2017-05-19 11:48:33 UTC) #6
On 2017/05/19 11:48:33, pastarmovj wrote: > lgtm > > ps. I built and ran the ...
9 months ago (2017-05-19 11:49:31 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at:
9 months ago (2017-05-19 11:49:51 UTC) #9
commit-bot: I haz the power
9 months ago (2017-05-19 13:23:19 UTC) #12
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as

Powered by Google App Engine
This is Rietveld 408576698