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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/api_test/managedMode/manifest.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/managedMode/test.js
===================================================================
--- chrome/test/data/extensions/api_test/managedMode/test.js (revision 0)
+++ chrome/test/data/extensions/api_test/managedMode/test.js (revision 0)
@@ -0,0 +1,38 @@
+// 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.
+
+// Managed Mode API test
+// Run with browser_tests --gtest_filter=ExtensionApiTest.ManagedModeApi
+
+var managedMode = chrome.experimental.managedMode;
+
+function expect(expected, message) {
+ return chrome.test.callbackPass(function(value) {
+ chrome.test.assertEq(expected, value, message);
+ });
+}
+
+chrome.test.runTests([
+ function disabledByDefault() {
+ managedMode.get(expect({value: false},
+ 'Managed mode should be disabled.'));
+ },
+
+ // This will need to be modified once entering managed mode requires user
+ // confirmation.
+ function enteringSucceeds() {
+ managedMode.enter(expect({success: true},
+ 'Should be able to enter managed mode.'));
+
+ managedMode.get(expect({value: true},
+ 'Managed mode should be on once it has been entered.'));
+ },
+
+ function enterTwice() {
+ managedMode.enter(expect({success: true},
+ 'Should be able to enter managed mode.'));
+ managedMode.enter(expect({success: true},
+ 'Should be able to enter managed mode twice.'));
+ }
+]);
Property changes on: chrome\test\data\extensions\api_test\managedMode\test.js
___________________________________________________________________
Added: svn:eol-style
+ LF
« 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