| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/managed_mode.h" | 5 #include "chrome/browser/managed_mode.h" |
| 6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
| 7 #include "chrome/common/chrome_switches.h" | 7 #include "chrome/common/chrome_switches.h" |
| 8 | 8 |
| 9 // Tests enabling and querying managed mode. | 9 // Tests enabling and querying managed mode. |
| 10 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ManagedModeGetAndEnable) { | 10 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ManagedModeGetAndEnable) { |
| 11 CommandLine::ForCurrentProcess()->AppendSwitch( | 11 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 12 switches::kEnableExperimentalExtensionApis); | 12 switches::kEnableExperimentalExtensionApis); |
| 13 | 13 |
| 14 ASSERT_FALSE(ManagedMode::IsInManagedMode()); | 14 ASSERT_FALSE(ManagedMode::IsInManagedMode()); |
| 15 | 15 |
| 16 ASSERT_TRUE(RunExtensionTest("managedMode")) << message_; | 16 ASSERT_TRUE(RunComponentExtensionTest("managedMode")) << message_; |
| 17 const Extension* extension = GetSingleLoadedExtension(); | |
| 18 ASSERT_TRUE(extension); | |
| 19 | 17 |
| 20 EXPECT_TRUE(ManagedMode::IsInManagedMode()); | 18 EXPECT_TRUE(ManagedMode::IsInManagedMode()); |
| 21 } | 19 } |
| OLD | NEW |