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

Side by Side Diff: chrome/test/data/extensions/api_test/system/test.html

Issue 8662008: Implement chrome.systemPrivate.getIncognitoModeAvailability extension API function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made destructor virtual Created 9 years 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
OLDNEW
(Empty)
1 <script>
2 // System API test
3 // Run with browser_tests --gtest_filter=ExtensionApiTest.SystemApi
4
5 function expect(expected, message) {
6 return chrome.test.callbackPass(function(value) {
7 chrome.test.assertEq(expected, value, message);
8 });
9 }
10
11 chrome.test.runTests([
12 function readOnlyGetTest() {
13 chrome.systemPrivate.incognitoModeAvailability.get({}, expect(
14 {value: 'disabled', levelOfControl: 'not_controllable'},
15 "Pref `chrome.windows.incognitoModeAvailability` is expected to be " +
16 "'disabled'"));
17 },
18 function readOnlySetTest() {
19 chrome.systemPrivate.incognitoModeAvailability.set(
20 {value: 'enabled'},
21 chrome.test.callbackFail("You cannot modify the read-only preference " +
22 "'incognitoModeAvailability'."));
23 }
24 ]);
25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698