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

Side by Side Diff: chrome/test/data/extensions/api_test/managedMode/test.js

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: Updated checkout again 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
« no previous file with comments | « chrome/test/data/extensions/api_test/managedMode/manifest.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Managed Mode API test
6 // Run with browser_tests --gtest_filter=ExtensionApiTest.ManagedModeApi
7
8 var managedMode = chrome.experimental.managedMode;
9
10 function expect(expected, message) {
11 return chrome.test.callbackPass(function(value) {
12 chrome.test.assertEq(expected, value, message);
13 });
14 }
15
16 chrome.test.runTests([
17 function disabledByDefault() {
18 managedMode.get(expect({value: false},
19 'Managed mode should be disabled.'));
20 },
21
22 // This will need to be modified once entering managed mode requires user
23 // confirmation.
24 function enteringSucceeds() {
25 managedMode.enter(expect({success: true},
26 'Should be able to enter managed mode.'));
27
28 managedMode.get(expect({value: true},
29 'Managed mode should be on once it has been entered.'));
30 },
31
32 function enterTwice() {
33 managedMode.enter(expect({success: true},
34 'Should be able to enter managed mode.'));
35 managedMode.enter(expect({success: true},
36 'Should be able to enter managed mode twice.'));
37 }
38 ]);
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/managedMode/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698