OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/extensions/feature_switch.h" | 5 #include "extensions/common/feature_switch.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
11 using extensions::FeatureSwitch; | 11 using extensions::FeatureSwitch; |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 const char kSwitchName[] = "test-switch"; | 15 const char kSwitchName[] = "test-switch"; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 FeatureSwitch::ScopedOverride override(&feature_, false); | 125 FeatureSwitch::ScopedOverride override(&feature_, false); |
126 EXPECT_FALSE(feature_.IsEnabled()); | 126 EXPECT_FALSE(feature_.IsEnabled()); |
127 } | 127 } |
128 EXPECT_FALSE(feature_.IsEnabled()); | 128 EXPECT_FALSE(feature_.IsEnabled()); |
129 } | 129 } |
130 | 130 |
131 TEST_F(FeatureSwitchEnabledTest, TrimSwitchValue) { | 131 TEST_F(FeatureSwitchEnabledTest, TrimSwitchValue) { |
132 command_line_.AppendSwitchASCII(kSwitchName, "\t\t 0 \n"); | 132 command_line_.AppendSwitchASCII(kSwitchName, "\t\t 0 \n"); |
133 EXPECT_FALSE(feature_.IsEnabled()); | 133 EXPECT_FALSE(feature_.IsEnabled()); |
134 } | 134 } |
OLD | NEW |