| Index: chrome/test/data/extensions/api_test/system/test.html
|
| diff --git a/chrome/test/data/extensions/api_test/system/test.html b/chrome/test/data/extensions/api_test/system/test.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0d226c4d36ba80519a590e8265ee1d636b16da3d
|
| --- /dev/null
|
| +++ b/chrome/test/data/extensions/api_test/system/test.html
|
| @@ -0,0 +1,25 @@
|
| +<script>
|
| +// System API test
|
| +// Run with browser_tests --gtest_filter=ExtensionApiTest.SystemApi
|
| +
|
| +function expect(expected, message) {
|
| + return chrome.test.callbackPass(function(value) {
|
| + chrome.test.assertEq(expected, value, message);
|
| + });
|
| +}
|
| +
|
| +chrome.test.runTests([
|
| + function readOnlyGetTest() {
|
| + chrome.systemPrivate.incognitoModeAvailability.get({}, expect(
|
| + {value: 'disabled', levelOfControl: 'not_controllable'},
|
| + "Pref `chrome.windows.incognitoModeAvailability` is expected to be " +
|
| + "'disabled'"));
|
| + },
|
| + function readOnlySetTest() {
|
| + chrome.systemPrivate.incognitoModeAvailability.set(
|
| + {value: 'enabled'},
|
| + chrome.test.callbackFail("You cannot modify the read-only preference " +
|
| + "'incognitoModeAvailability'."));
|
| + }
|
| +]);
|
| +</script>
|
|
|