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

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

Issue 5025001: Removed Labs section from Chrome OS settings page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed RegisterPref call Created 10 years, 1 month 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 | « chrome/browser/about_flags.cc ('k') | chrome/browser/chromeos/dom_ui/labs_handler.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/about_flags.h" 5 #include "chrome/browser/about_flags.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
10 #include "chrome/test/testing_pref_service.h" 10 #include "chrome/test/testing_pref_service.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 IDS_PRODUCT_NAME, 45 IDS_PRODUCT_NAME,
46 0, // This ends up enabling for an OS other than the current. 46 0, // This ends up enabling for an OS other than the current.
47 kSwitch3 47 kSwitch3
48 }, 48 },
49 }; 49 };
50 50
51 class AboutFlagsTest : public ::testing::Test { 51 class AboutFlagsTest : public ::testing::Test {
52 protected: 52 protected:
53 AboutFlagsTest() { 53 AboutFlagsTest() {
54 prefs_.RegisterListPref(prefs::kEnabledLabsExperiments); 54 prefs_.RegisterListPref(prefs::kEnabledLabsExperiments);
55 #if defined(OS_CHROMEOS)
56 prefs_.RegisterBooleanPref(prefs::kLabsMediaplayerEnabled, false);
57 prefs_.RegisterBooleanPref(prefs::kLabsAdvancedFilesystemEnabled, false);
58 prefs_.RegisterBooleanPref(prefs::kUseVerticalTabs, false);
59 #endif
55 testing::ClearState(); 60 testing::ClearState();
56 } 61 }
57 62
58 virtual void SetUp() { 63 virtual void SetUp() {
59 for (size_t i = 0; i < arraysize(kExperiments); ++i) 64 for (size_t i = 0; i < arraysize(kExperiments); ++i)
60 kExperiments[i].supported_platforms = GetCurrentPlatform(); 65 kExperiments[i].supported_platforms = GetCurrentPlatform();
61 66
62 int os_other_than_current = 1; 67 int os_other_than_current = 1;
63 while (os_other_than_current == GetCurrentPlatform()) 68 while (os_other_than_current == GetCurrentPlatform())
64 os_other_than_current <<= 1; 69 os_other_than_current <<= 1;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 EXPECT_TRUE(command_line.HasSwitch(kSwitch1)); 189 EXPECT_TRUE(command_line.HasSwitch(kSwitch1));
185 EXPECT_FALSE(command_line.HasSwitch(kSwitch3)); 190 EXPECT_FALSE(command_line.HasSwitch(kSwitch3));
186 191
187 // Experiment 3 should show still be persisted in preferences though. 192 // Experiment 3 should show still be persisted in preferences though.
188 scoped_ptr<ListValue> switch_prefs(GetFlagsExperimentsData(&prefs_)); 193 scoped_ptr<ListValue> switch_prefs(GetFlagsExperimentsData(&prefs_));
189 ASSERT_TRUE(switch_prefs.get()); 194 ASSERT_TRUE(switch_prefs.get());
190 EXPECT_EQ(2u, switch_prefs->GetSize()); 195 EXPECT_EQ(2u, switch_prefs->GetSize());
191 } 196 }
192 197
193 } // namespace about_flags 198 } // namespace about_flags
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/chromeos/dom_ui/labs_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698