| OLD | NEW |
| 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 Loading... |
| 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_.registrar()->RegisterListPref(prefs::kEnabledLabsExperiments); |
| 90 testing::ClearState(); | 90 testing::ClearState(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 virtual void SetUp() { | 93 virtual void SetUp() { |
| 94 for (size_t i = 0; i < arraysize(kExperiments); ++i) | 94 for (size_t i = 0; i < arraysize(kExperiments); ++i) |
| 95 kExperiments[i].supported_platforms = GetCurrentPlatform(); | 95 kExperiments[i].supported_platforms = GetCurrentPlatform(); |
| 96 | 96 |
| 97 int os_other_than_current = 1; | 97 int os_other_than_current = 1; |
| 98 while (os_other_than_current == GetCurrentPlatform()) | 98 while (os_other_than_current == GetCurrentPlatform()) |
| 99 os_other_than_current <<= 1; | 99 os_other_than_current <<= 1; |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 testing::SetExperiments(NULL, 0); | 316 testing::SetExperiments(NULL, 0); |
| 317 size_t count; | 317 size_t count; |
| 318 const Experiment* experiments = testing::GetExperiments(&count); | 318 const Experiment* experiments = testing::GetExperiments(&count); |
| 319 for (size_t i = 0; i < count; ++i) { | 319 for (size_t i = 0; i < count; ++i) { |
| 320 std::string name = experiments->internal_name; | 320 std::string name = experiments->internal_name; |
| 321 EXPECT_EQ(std::string::npos, name.find(testing::kMultiSeparator)) << i; | 321 EXPECT_EQ(std::string::npos, name.find(testing::kMultiSeparator)) << i; |
| 322 } | 322 } |
| 323 } | 323 } |
| 324 | 324 |
| 325 } // namespace about_flags | 325 } // namespace about_flags |
| OLD | NEW |