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 // Managed Mode API test | 5 // Managed Mode API test |
6 // Run with browser_tests --gtest_filter=ExtensionApiTest.ManagedModeApi | 6 // Run with browser_tests --gtest_filter=ExtensionApiTest.ManagedModeApi |
7 | 7 |
8 var managedMode = chrome.experimental.managedMode; | 8 var managedMode = chrome.managedModePrivate; |
9 | 9 |
10 function expect(expected, message) { | 10 function expect(expected, message) { |
11 return chrome.test.callbackPass(function(value) { | 11 return chrome.test.callbackPass(function(value) { |
12 chrome.test.assertEq(expected, value, message); | 12 chrome.test.assertEq(expected, value, message); |
13 }); | 13 }); |
14 } | 14 } |
15 | 15 |
16 chrome.test.runTests([ | 16 chrome.test.runTests([ |
17 function disabledByDefault() { | 17 function disabledByDefault() { |
18 managedMode.get(expect({value: false}, | 18 managedMode.get(expect({value: false}, |
(...skipping 10 matching lines...) Expand all Loading... |
29 'Managed mode should be on once it has been entered.')); | 29 'Managed mode should be on once it has been entered.')); |
30 }, | 30 }, |
31 | 31 |
32 function enterTwice() { | 32 function enterTwice() { |
33 managedMode.enter(expect({success: true}, | 33 managedMode.enter(expect({success: true}, |
34 'Should be able to enter managed mode.')); | 34 'Should be able to enter managed mode.')); |
35 managedMode.enter(expect({success: true}, | 35 managedMode.enter(expect({success: true}, |
36 'Should be able to enter managed mode twice.')); | 36 'Should be able to enter managed mode twice.')); |
37 } | 37 } |
38 ]); | 38 ]); |
OLD | NEW |