summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_managed_mode_apitest.cc
blob: 3085a4fe42559dd39f05547bfc54637c0b9553b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/managed_mode.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"

// Tests enabling and querying managed mode.
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ManagedModeGetAndEnable) {
  CommandLine::ForCurrentProcess()->AppendSwitch(
      switches::kEnableExperimentalExtensionApis);

  ASSERT_FALSE(ManagedMode::IsInManagedMode());

  ASSERT_TRUE(RunComponentExtensionTest("managedMode")) << message_;

  EXPECT_TRUE(ManagedMode::IsInManagedMode());
}