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

Unified Diff: components/arc/arc_util_unittest.cc

Issue 2655873002: Get enrollment token from DMServer when an Active Directory user uses ARC (Closed)
Patch Set: Fix Luis's comments Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/arc/arc_util.cc ('k') | components/arc/common/auth.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/arc_util_unittest.cc
diff --git a/components/arc/arc_util_unittest.cc b/components/arc/arc_util_unittest.cc
index c7ad19fc971c96fcabf411927ad69d6aae74d8da..4f91d4893576e9a493015dbf642f6a4b354d89ed 100644
--- a/components/arc/arc_util_unittest.cc
+++ b/components/arc/arc_util_unittest.cc
@@ -113,6 +113,27 @@ TEST_F(ArcUtilTest, IsArcAvailable_OfficiallySupported) {
EXPECT_TRUE(IsArcAvailable());
}
+TEST_F(ArcUtilTest, IsArcAvailable_OfficiallySupportedWithActiveDirectory) {
+ // Regardless of FeatureList, IsArcAvailable() should return true.
+ auto* command_line = base::CommandLine::ForCurrentProcess();
+ command_line->InitFromArgv(
+ {"", "--arc-availability=officially-supported-with-active-directory"});
+ EXPECT_TRUE(IsArcAvailable());
+}
+
+TEST_F(ArcUtilTest, IsArcAllowedForActiveDirectoryUsers_Allowed) {
+ auto* command_line = base::CommandLine::ForCurrentProcess();
+ command_line->InitFromArgv(
+ {"", "--arc-availability=officially-supported-with-active-directory"});
+ EXPECT_TRUE(IsArcAllowedForActiveDirectoryUsers());
+}
+
+TEST_F(ArcUtilTest, IsArcAllowedForActiveDirectoryUsers_NotAllowed) {
+ auto* command_line = base::CommandLine::ForCurrentProcess();
+ command_line->InitFromArgv({"", "--arc-availability=officially-supported"});
+ EXPECT_FALSE(IsArcAllowedForActiveDirectoryUsers());
+}
+
// TODO(hidehiko): Add test for IsArcKioskMode().
// It depends on UserManager, but a utility to inject fake instance is
// available only in chrome/. To use it in components/, refactoring is needed.
« no previous file with comments | « components/arc/arc_util.cc ('k') | components/arc/common/auth.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698