| Index: chrome/test/data/extensions/api_test/file_system_provider/mount/test.js
|
| diff --git a/chrome/test/data/extensions/api_test/file_system_provider/mount/test.js b/chrome/test/data/extensions/api_test/file_system_provider/mount/test.js
|
| index 81b6ae7207aa51ac2c50f01b8e62096c6b634c9b..83e2c374536d6009bde79eee3cd6757bb6b8622f 100644
|
| --- a/chrome/test/data/extensions/api_test/file_system_provider/mount/test.js
|
| +++ b/chrome/test/data/extensions/api_test/file_system_provider/mount/test.js
|
| @@ -18,7 +18,7 @@ chrome.test.runTests([
|
| // Verifies that mounting fails, when an empty string is provided as a name.
|
| function emptyDisplayName() {
|
| chrome.fileSystemProvider.mount(
|
| - {fileSystemId: 'file-system-id', displayName: ''},
|
| + {fileSystemId: 'file-system-id-2', displayName: ''},
|
| chrome.test.callbackFail('INVALID_OPERATION'));
|
| },
|
|
|
| @@ -29,6 +29,36 @@ chrome.test.runTests([
|
| chrome.test.callbackFail('INVALID_OPERATION'));
|
| },
|
|
|
| + // Verifies that mounting succeeds, when a positive limit for opened files is
|
| + // provided.
|
| + function goodOpenedFilesLimit() {
|
| + chrome.fileSystemProvider.mount({
|
| + fileSystemId: 'file-system-id-3',
|
| + displayName: 'File System Name',
|
| + openedFilesLimit: 10
|
| + }, chrome.test.callbackPass());
|
| + },
|
| +
|
| + // Verifies that mounting succeeds, when limit for number of opened files is
|
| + // set to 0. It means no limit.
|
| + function goodOpenedFilesLimit() {
|
| + chrome.fileSystemProvider.mount({
|
| + fileSystemId: 'file-system-id-4',
|
| + displayName: 'File System Name',
|
| + openedFilesLimit: 0
|
| + }, chrome.test.callbackPass());
|
| + },
|
| +
|
| + // Verifies that mounting fails, when a negative limit for opened files is
|
| + // provided.
|
| + function illegalOpenedFilesLimit() {
|
| + chrome.fileSystemProvider.mount({
|
| + fileSystemId: 'file-system-id-5',
|
| + displayName: 'File System Name',
|
| + openedFilesLimit: -1
|
| + }, chrome.test.callbackFail('INVALID_OPERATION'));
|
| + },
|
| +
|
| // End to end test. Mounts a volume using fileSystemProvider.mount(), then
|
| // checks if the mounted volume is added to VolumeManager, by querying
|
| // fileManagerPrivate.getVolumeMetadataList().
|
| @@ -81,7 +111,7 @@ chrome.test.runTests([
|
| // requests should succeed, except the last one which should fail with a
|
| // security error.
|
| function stressMountTest() {
|
| - var ALREADY_MOUNTED_FILE_SYSTEMS = 3; // By previous tests.
|
| + var ALREADY_MOUNTED_FILE_SYSTEMS = 5; // By previous tests.
|
| var MAX_FILE_SYSTEMS = 16;
|
| var index = 0;
|
| var tryNextOne = function() {
|
|
|