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

Unified Diff: chrome/browser/chromeos/extensions/info_private_apitest.cc

Issue 2648213004: Migrate --enable-arc and --arc-available part 1. (Closed)
Patch Set: Address comments. Created 3 years, 11 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
Index: chrome/browser/chromeos/extensions/info_private_apitest.cc
diff --git a/chrome/browser/chromeos/extensions/info_private_apitest.cc b/chrome/browser/chromeos/extensions/info_private_apitest.cc
index 7f7e35e84a91472abb44410d53deed7f3ae829dc..903e045409d1aa5d1cc6f24fca1a79ecfd3ebb76 100644
--- a/chrome/browser/chromeos/extensions/info_private_apitest.cc
+++ b/chrome/browser/chromeos/extensions/info_private_apitest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/values.h"
+#include "chrome/browser/chromeos/arc/arc_session_manager.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
@@ -31,11 +32,8 @@ class ChromeOSInfoPrivateTest : public ExtensionApiTest {
}
void MakeArcAvailable() {
- base::CommandLine::ForCurrentProcess()->AppendSwitch(
- chromeos::switches::kArcAvailable);
- }
-
- void EnableArc() {
+ // TODO(hidehiko): Introduce a utility to let IsArcAvailable() return true
Yusuke Sato 2017/01/24 19:02:44 Is this difficult to implement now?
Rahul Chaturvedi 2017/01/24 20:33:04 Please implement this as part of this CL.
hidehiko 2017/01/25 17:54:46 Not technically difficult, but there are more file
+ // for testing.
base::CommandLine::ForCurrentProcess()->AppendSwitch(
chromeos::switches::kEnableArc);
}
@@ -83,16 +81,10 @@ IN_PROC_BROWSER_TEST_F(ChromeOSInfoPrivateTest, Kiosk) {
<< message_;
}
-IN_PROC_BROWSER_TEST_F(ChromeOSInfoPrivateTest, ArcAvailable) {
+IN_PROC_BROWSER_TEST_F(ChromeOSInfoPrivateTest, ArcAvailableDisallowed) {
MakeArcAvailable();
+ arc::ArcSessionManager::DisallowForTesting();
ASSERT_TRUE(RunPlatformAppTestWithArg("chromeos_info_private/extended",
"arc available"))
<< message_;
}
-
-IN_PROC_BROWSER_TEST_F(ChromeOSInfoPrivateTest, ArcEnabled) {
Rahul Chaturvedi 2017/01/24 20:33:04 If we're removing this test, how are we testing th
hidehiko 2017/01/25 17:54:46 Oops. I misunderstood the code. Good catch. Restor
- EnableArc();
- ASSERT_TRUE(RunPlatformAppTestWithArg("chromeos_info_private/extended",
- "arc enabled"))
- << message_;
-}

Powered by Google App Engine
This is Rietveld 408576698