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

Side by Side Diff: chrome/browser/about_flags_unittest.cc

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix. And rebase Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/string_number_conversions.h" 5 #include "base/string_number_conversions.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/about_flags.h" 8 #include "chrome/browser/about_flags.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 "", 79 "",
80 "", 80 "",
81 kMultiChoices, 81 kMultiChoices,
82 arraysize(kMultiChoices) 82 arraysize(kMultiChoices)
83 }, 83 },
84 }; 84 };
85 85
86 class AboutFlagsTest : public ::testing::Test { 86 class AboutFlagsTest : public ::testing::Test {
87 protected: 87 protected:
88 AboutFlagsTest() { 88 AboutFlagsTest() {
89 prefs_.RegisterListPref(prefs::kEnabledLabsExperiments); 89 prefs_.RegisterListPref(prefs::kEnabledLabsExperiments,
90 PrefService::UNSYNCABLE_PREF);
90 #if defined(OS_CHROMEOS) 91 #if defined(OS_CHROMEOS)
91 prefs_.RegisterBooleanPref(prefs::kLabsMediaplayerEnabled, false); 92 prefs_.RegisterBooleanPref(prefs::kLabsMediaplayerEnabled,
92 prefs_.RegisterBooleanPref(prefs::kLabsAdvancedFilesystemEnabled, false); 93 false,
93 prefs_.RegisterBooleanPref(prefs::kUseVerticalTabs, false); 94 PrefService::UNSYNCABLE_PREF);
95 prefs_.RegisterBooleanPref(prefs::kLabsAdvancedFilesystemEnabled,
96 false,
97 PrefService::UNSYNCABLE_PREF);
98 prefs_.RegisterBooleanPref(prefs::kUseVerticalTabs,
99 false,
100 PrefService::UNSYNCABLE_PREF);
94 #endif 101 #endif
95 testing::ClearState(); 102 testing::ClearState();
96 } 103 }
97 104
98 virtual void SetUp() { 105 virtual void SetUp() {
99 for (size_t i = 0; i < arraysize(kExperiments); ++i) 106 for (size_t i = 0; i < arraysize(kExperiments); ++i)
100 kExperiments[i].supported_platforms = GetCurrentPlatform(); 107 kExperiments[i].supported_platforms = GetCurrentPlatform();
101 108
102 int os_other_than_current = 1; 109 int os_other_than_current = 1;
103 while (os_other_than_current == GetCurrentPlatform()) 110 while (os_other_than_current == GetCurrentPlatform())
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 testing::SetExperiments(NULL, 0); 329 testing::SetExperiments(NULL, 0);
323 size_t count; 330 size_t count;
324 const Experiment* experiments = testing::GetExperiments(&count); 331 const Experiment* experiments = testing::GetExperiments(&count);
325 for (size_t i = 0; i < count; ++i) { 332 for (size_t i = 0; i < count; ++i) {
326 std::string name = experiments->internal_name; 333 std::string name = experiments->internal_name;
327 EXPECT_EQ(std::string::npos, name.find(testing::kMultiSeparator)) << i; 334 EXPECT_EQ(std::string::npos, name.find(testing::kMultiSeparator)) << i;
328 } 335 }
329 } 336 }
330 337
331 } // namespace about_flags 338 } // namespace about_flags
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698