| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "components/arc/arc_util.h" | 5 #include "components/arc/arc_util.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 | 75 |
| 76 TEST_F(ArcUtilTest, IsArcAvailable_OfficialSupport) { | 76 TEST_F(ArcUtilTest, IsArcAvailable_OfficialSupport) { |
| 77 // Regardless of FeatureList, IsArcAvailable() should return true. | 77 // Regardless of FeatureList, IsArcAvailable() should return true. |
| 78 auto* command_line = base::CommandLine::ForCurrentProcess(); | 78 auto* command_line = base::CommandLine::ForCurrentProcess(); |
| 79 command_line->InitFromArgv({"", "--enable-arc"}); | 79 command_line->InitFromArgv({"", "--enable-arc"}); |
| 80 EXPECT_TRUE(IsArcAvailable()); | 80 EXPECT_TRUE(IsArcAvailable()); |
| 81 } | 81 } |
| 82 | 82 |
| 83 // TODO(hidehiko): Add test for IsArcKioskMode(). |
| 84 // It depends on UserManager, but a utility to inject fake instance is |
| 85 // available only in chrome/. To use it in components/, refactoring is needed. |
| 86 |
| 87 TEST_F(ArcUtilTest, IsArcOptInVerificationDisabled) { |
| 88 auto* command_line = base::CommandLine::ForCurrentProcess(); |
| 89 command_line->InitFromArgv({""}); |
| 90 EXPECT_FALSE(IsArcOptInVerificationDisabled()); |
| 91 |
| 92 command_line->InitFromArgv({"", "--disable-arc-opt-in-verification"}); |
| 93 EXPECT_TRUE(IsArcOptInVerificationDisabled()); |
| 94 } |
| 95 |
| 83 } // namespace | 96 } // namespace |
| 84 } // namespace arc | 97 } // namespace arc |
| OLD | NEW |