Chromium Code Reviews| Index: components/arc/arc_util_unittest.cc |
| diff --git a/components/arc/arc_util_unittest.cc b/components/arc/arc_util_unittest.cc |
| index ff3f6113ea3934aec56167e133f45aba62c499d0..3a89362ac20dd4ae35b5d4919869928fcb41e291 100644 |
| --- a/components/arc/arc_util_unittest.cc |
| +++ b/components/arc/arc_util_unittest.cc |
| @@ -71,6 +71,22 @@ TEST_F(ArcUtilTest, IsArcAvailable_Installed) { |
| ScopedArcFeature feature(false); |
| EXPECT_FALSE(IsArcAvailable()); |
| } |
| + |
|
Yusuke Sato
2017/02/02 18:14:06
can you test "none"?
hidehiko
2017/02/03 15:37:42
Done.
|
| + // If ARC is installed, IsArcAvailable() should return true when EnableARC |
| + // feature is set. |
| + command_line->InitFromArgv({"", "--arc-availability=installed"}); |
| + |
| + // Not available, by-default, too. |
| + EXPECT_FALSE(IsArcAvailable()); |
| + |
| + { |
| + ScopedArcFeature feature(true); |
| + EXPECT_TRUE(IsArcAvailable()); |
| + } |
| + { |
| + ScopedArcFeature feature(false); |
| + EXPECT_FALSE(IsArcAvailable()); |
| + } |
| } |
| TEST_F(ArcUtilTest, IsArcAvailable_OfficialSupport) { |
| @@ -78,6 +94,9 @@ TEST_F(ArcUtilTest, IsArcAvailable_OfficialSupport) { |
| auto* command_line = base::CommandLine::ForCurrentProcess(); |
| command_line->InitFromArgv({"", "--enable-arc"}); |
| EXPECT_TRUE(IsArcAvailable()); |
| + |
| + command_line->InitFromArgv({"", "--arc-availability=official-support"}); |
| + EXPECT_TRUE(IsArcAvailable()); |
| } |
| // TODO(hidehiko): Add test for IsArcKioskMode(). |