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

Side by Side Diff: chrome/browser/chromeos/extensions/info_private_apitest.cc

Issue 2711033002: Fix Arc integration test. (Closed)
Patch Set: Address hidehiko's comments. Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/values.h" 5 #include "base/values.h"
6 #include "chrome/browser/chromeos/arc/arc_util.h" 6 #include "chrome/browser/chromeos/arc/arc_util.h"
7 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 7 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
8 #include "chrome/browser/chromeos/settings/cros_settings.h" 8 #include "chrome/browser/chromeos/settings/cros_settings.h"
9 #include "chrome/browser/chromeos/settings/stub_install_attributes.h" 9 #include "chrome/browser/chromeos/settings/stub_install_attributes.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 10 #include "chrome/browser/extensions/extension_apitest.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 "arc enabled")) 102 "arc enabled"))
103 << message_; 103 << message_;
104 } 104 }
105 105
106 IN_PROC_BROWSER_TEST_F(ChromeOSArcInfoPrivateTest, ArcAvailable) { 106 IN_PROC_BROWSER_TEST_F(ChromeOSArcInfoPrivateTest, ArcAvailable) {
107 // Even if ARC is available, ARC may not be able to be enabled. (Please 107 // Even if ARC is available, ARC may not be able to be enabled. (Please
108 // see arc::IsArcAllowedForProfile() for details). 108 // see arc::IsArcAllowedForProfile() for details).
109 // In such cases, we expect "available". However, current testing framework 109 // In such cases, we expect "available". However, current testing framework
110 // does not seem to run with such cases, unfortunately. So, here directly 110 // does not seem to run with such cases, unfortunately. So, here directly
111 // control the function. 111 // control the function.
112 arc::DisallowArcForTesting(); 112 arc::SetArcAllowedForTesting(ArcAllowedForTestType::DISALLOWEDFORTEST);
113 ASSERT_TRUE(RunPlatformAppTestWithArg("chromeos_info_private/extended", 113 ASSERT_TRUE(RunPlatformAppTestWithArg("chromeos_info_private/extended",
114 "arc available")) 114 "arc available"))
115 << message_; 115 << message_;
116 } 116 }
117 117
118 class ChromeOSManagedDeviceInfoPrivateTest : public ChromeOSInfoPrivateTest { 118 class ChromeOSManagedDeviceInfoPrivateTest : public ChromeOSInfoPrivateTest {
119 public: 119 public:
120 ChromeOSManagedDeviceInfoPrivateTest() = default; 120 ChromeOSManagedDeviceInfoPrivateTest() = default;
121 ~ChromeOSManagedDeviceInfoPrivateTest() override = default; 121 ~ChromeOSManagedDeviceInfoPrivateTest() override = default;
122 122
(...skipping 10 matching lines...) Expand all
133 133
134 private: 134 private:
135 DISALLOW_COPY_AND_ASSIGN(ChromeOSManagedDeviceInfoPrivateTest); 135 DISALLOW_COPY_AND_ASSIGN(ChromeOSManagedDeviceInfoPrivateTest);
136 }; 136 };
137 137
138 IN_PROC_BROWSER_TEST_F(ChromeOSManagedDeviceInfoPrivateTest, Managed) { 138 IN_PROC_BROWSER_TEST_F(ChromeOSManagedDeviceInfoPrivateTest, Managed) {
139 ASSERT_TRUE( 139 ASSERT_TRUE(
140 RunPlatformAppTestWithArg("chromeos_info_private/extended", "managed")) 140 RunPlatformAppTestWithArg("chromeos_info_private/extended", "managed"))
141 << message_; 141 << message_;
142 } 142 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698