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

Side by Side Diff: chrome/browser/extensions/extension_managed_mode_apitest.cc

Issue 9566007: Initial Managed Mode extension API, supporting querying the setting and a stub for enabling the mod… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Addressing Bernhard's comments Created 8 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/browser_process.h"
6 #include "chrome/browser/extensions/extension_apitest.h"
7 #include "chrome/browser/prefs/pref_service.h"
8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/common/pref_names.h"
10
11 // Tests enabling and querying managed mode.
12 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ManagedModeGetAndEnable) {
13 CommandLine::ForCurrentProcess()->AppendSwitch(
14 switches::kEnableExperimentalExtensionApis);
15
16 PrefService* local_state = g_browser_process->local_state();
17 ASSERT_FALSE(local_state->GetBoolean(prefs::kInManagedMode));
18
19 ASSERT_TRUE(RunExtensionTest("managedMode")) << message_;
20 const Extension* extension = GetSingleLoadedExtension();
21 ASSERT_TRUE(extension);
22
23 EXPECT_TRUE(local_state->GetBoolean(prefs::kInManagedMode));
24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698