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

Issue 431973002: Add integration browser tests for settings hardening. (Closed)

Created:
6 years, 4 months ago by gab
Modified:
6 years, 4 months ago
CC:
chromium-reviews, Bernhard Bauer, grt (UTC plus 2)
Project:
chromium
Visibility:
Public.

Description

Add integration browser tests for settings hardening. This CL introduces the PrefHashBrowserTestBase fixture which these tests are based on. This fixture (in conjunction with the new PREF_HASH_BROWSER_TEST macro) provides an easy way to override 3 methods in order to: 1) Setup Chrome as desired in a PRE_ test. 2) Attack Preferences while Chrome isn't running. 3) Relaunch Chrome and verify reaction to attacks. The fixture+macro also parametrizes every test such that they are ran in every SettingsEnforcement trial group. A few pieces were resurrected from the old PrefHashBrowserTest used to test unloaded profile seeding prior to http://crrev.com/277209 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287689 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287805

Patch Set 1 : #

Total comments: 3

Patch Set 2 : Augment AttackPreferencesOnDisk() #

Patch Set 3 : add more tests and solidify framework #

Patch Set 4 : merge up to r286900 #

Patch Set 5 : tweak for OFFICIAL_BUILDs #

Total comments: 4

Patch Set 6 : Introduce GetProtectionLevelFromTrialGroup() to cleanup constructor #

Total comments: 8

Patch Set 7 : nits #

Patch Set 8 : special early return for Chrome OS to temporarily workaround unknown issue #

Patch Set 9 : no domain check in browser tests #

Patch Set 10 : more chrome os fixes and tweaks #

Patch Set 11 : fix unreachable code error in official builds #

Unified diffs Side-by-side diffs Delta from patch set Stats (+783 lines, -1 line) Patch
M chrome/browser/prefs/chrome_pref_service_factory.cc View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
A chrome/browser/prefs/tracked/pref_hash_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +778 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
gab
Erik PTAL, I'm still going to add at least one more test, but I'd like ...
6 years, 4 months ago (2014-07-31 13:19:14 UTC) #1
erikwright (departed)
structure looks good. https://codereview.chromium.org/431973002/diff/20001/chrome/browser/prefs/tracked/pref_hash_browsertest.cc File chrome/browser/prefs/tracked/pref_hash_browsertest.cc (right): https://codereview.chromium.org/431973002/diff/20001/chrome/browser/prefs/tracked/pref_hash_browsertest.cc#newcode337 chrome/browser/prefs/tracked/pref_hash_browsertest.cc:337: JSONFileValueSerializer serializer( Presumably this stanza will ...
6 years, 4 months ago (2014-07-31 14:38:27 UTC) #2
gab
Thanks, done. Adding another test now, but PTAL at the existing ones. https://codereview.chromium.org/431973002/diff/20001/chrome/browser/prefs/tracked/pref_hash_browsertest.cc File chrome/browser/prefs/tracked/pref_hash_browsertest.cc ...
6 years, 4 months ago (2014-07-31 19:14:16 UTC) #3
gab
All tests added, ready for full review!! Thanks! Gab
6 years, 4 months ago (2014-07-31 22:09:17 UTC) #4
gab
CC Bernhard, FYI I intend to land this on Erik's sole review, let me know ...
6 years, 4 months ago (2014-08-01 13:53:50 UTC) #5
Bernhard Bauer
This is very nice! I just found some nits below: https://codereview.chromium.org/431973002/diff/120001/chrome/browser/prefs/tracked/pref_hash_browsertest.cc File chrome/browser/prefs/tracked/pref_hash_browsertest.cc (right): https://codereview.chromium.org/431973002/diff/120001/chrome/browser/prefs/tracked/pref_hash_browsertest.cc#newcode161 ...
6 years, 4 months ago (2014-08-01 14:57:47 UTC) #6
Bernhard Bauer
This is very nice! I just found some nits below:
6 years, 4 months ago (2014-08-01 15:04:19 UTC) #7
gab
https://codereview.chromium.org/431973002/diff/120001/chrome/browser/prefs/tracked/pref_hash_browsertest.cc File chrome/browser/prefs/tracked/pref_hash_browsertest.cc (right): https://codereview.chromium.org/431973002/diff/120001/chrome/browser/prefs/tracked/pref_hash_browsertest.cc#newcode161 chrome/browser/prefs/tracked/pref_hash_browsertest.cc:161: kSettingsEnforcementGroupEnforceAlwaysWithExtensionsAndDSE) { On 2014/08/01 14:57:46, Bernhard Bauer wrote: > ...
6 years, 4 months ago (2014-08-01 17:52:21 UTC) #8
gab
CC grt who is interested in looking into how this test fixture works :-)!
6 years, 4 months ago (2014-08-01 18:25:28 UTC) #9
erikwright (departed)
LGTM with some suggestions. https://codereview.chromium.org/431973002/diff/140001/chrome/browser/prefs/tracked/pref_hash_browsertest.cc File chrome/browser/prefs/tracked/pref_hash_browsertest.cc (right): https://codereview.chromium.org/431973002/diff/140001/chrome/browser/prefs/tracked/pref_hash_browsertest.cc#newcode57 chrome/browser/prefs/tracked/pref_hash_browsertest.cc:57: ALLOW_MANY MANY -> ANY? https://codereview.chromium.org/431973002/diff/140001/chrome/browser/prefs/tracked/pref_hash_browsertest.cc#newcode285 ...
6 years, 4 months ago (2014-08-02 07:16:52 UTC) #10
gab
Done, thanks, Bernhard feel free to add post-commits comments if you care. Cheers! Gab https://codereview.chromium.org/431973002/diff/140001/chrome/browser/prefs/tracked/pref_hash_browsertest.cc ...
6 years, 4 months ago (2014-08-04 18:53:10 UTC) #11
gab
The CQ bit was checked by gab@chromium.org
6 years, 4 months ago (2014-08-04 18:53:20 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/431973002/160001
6 years, 4 months ago (2014-08-04 18:55:44 UTC) #13
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-04 22:07:21 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-04 22:15:05 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel/builds/3079)
6 years, 4 months ago (2014-08-04 22:15:06 UTC) #16
gab
The CQ bit was checked by gab@chromium.org
6 years, 4 months ago (2014-08-05 19:27:13 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/431973002/220001
6 years, 4 months ago (2014-08-05 19:28:45 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-05 23:31:43 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-06 00:00:22 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu/builds/42933)
6 years, 4 months ago (2014-08-06 00:00:23 UTC) #21
gab
The CQ bit was checked by gab@chromium.org
6 years, 4 months ago (2014-08-06 02:56:10 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/431973002/220001
6 years, 4 months ago (2014-08-06 02:57:10 UTC) #23
commit-bot: I haz the power
Change committed as 287689
6 years, 4 months ago (2014-08-06 05:48:28 UTC) #24
Adam Rice
On 2014/08/06 05:48:28, I haz the power (commit-bot) wrote: > Change committed as 287689 Reverted ...
6 years, 4 months ago (2014-08-06 07:05:01 UTC) #25
gab
Fixed unreachable code error in official builds. Re-landing.
6 years, 4 months ago (2014-08-06 15:01:08 UTC) #26
gab
The CQ bit was checked by gab@chromium.org
6 years, 4 months ago (2014-08-06 15:01:13 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/431973002/240001
6 years, 4 months ago (2014-08-06 15:01:48 UTC) #28
commit-bot: I haz the power
6 years, 4 months ago (2014-08-06 18:03:50 UTC) #29
Message was sent while issue was closed.
Change committed as 287805

Powered by Google App Engine
This is Rietveld 408576698