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

Side by Side Diff: components/arc/arc_util_unittest.cc

Issue 2642783003: Move more utility functions to arc_util. (Closed)
Patch Set: address 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 unified diff | Download patch
« no previous file with comments | « components/arc/arc_util.cc ('k') | components/arc/intent_helper/arc_intent_helper_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/arc/arc_util.cc ('k') | components/arc/intent_helper/arc_intent_helper_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698