OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** | 7 /** |
8 * Runs all of the test cases, one by one. | 8 * Runs all of the test cases, one by one. |
9 */ | 9 */ |
10 chrome.test.runTests([ | 10 chrome.test.runTests([ |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 openedFilesLimit: -1 | 58 openedFilesLimit: -1 |
59 }, chrome.test.callbackFail('INVALID_OPERATION')); | 59 }, chrome.test.callbackFail('INVALID_OPERATION')); |
60 }, | 60 }, |
61 | 61 |
62 // End to end test. Mounts a volume using fileSystemProvider.mount(), then | 62 // End to end test. Mounts a volume using fileSystemProvider.mount(), then |
63 // checks if the mounted volume is added to VolumeManager, by querying | 63 // checks if the mounted volume is added to VolumeManager, by querying |
64 // fileManagerPrivate.getVolumeMetadataList(). | 64 // fileManagerPrivate.getVolumeMetadataList(). |
65 function successfulMount() { | 65 function successfulMount() { |
66 var fileSystemId = 'caramel-candy'; | 66 var fileSystemId = 'caramel-candy'; |
67 chrome.fileSystemProvider.mount( | 67 chrome.fileSystemProvider.mount( |
68 {fileSystemId: fileSystemId, displayName: 'caramel-candy.zip'}, | 68 { |
69 fileSystemId: fileSystemId, | |
70 displayName: 'caramel-candy.zip', | |
71 source: 'NETWORK' | |
hirono
2015/04/06 08:36:34
Should it be FILE?
mtomasz
2015/04/06 09:13:48
Done.
| |
72 }, | |
69 chrome.test.callbackPass(function() { | 73 chrome.test.callbackPass(function() { |
70 chrome.fileManagerPrivate.getVolumeMetadataList(function(volumeList) { | 74 chrome.fileManagerPrivate.getVolumeMetadataList(function(volumeList) { |
71 var volumeInfo; | 75 var volumeInfo; |
72 volumeList.forEach(function(inVolumeInfo) { | 76 volumeList.forEach(function(inVolumeInfo) { |
73 if (inVolumeInfo.extensionId == chrome.runtime.id && | 77 if (inVolumeInfo.extensionId == chrome.runtime.id && |
74 inVolumeInfo.fileSystemId == fileSystemId) { | 78 inVolumeInfo.fileSystemId == fileSystemId) { |
75 volumeInfo = inVolumeInfo; | 79 volumeInfo = inVolumeInfo; |
76 } | 80 } |
77 }); | 81 }); |
78 chrome.test.assertTrue(!!volumeInfo); | 82 chrome.test.assertTrue(!!volumeInfo); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 { | 130 { |
127 fileSystemId: 'over-the-limit-fs-id', | 131 fileSystemId: 'over-the-limit-fs-id', |
128 displayName: 'Over The Limit File System' | 132 displayName: 'Over The Limit File System' |
129 }, | 133 }, |
130 chrome.test.callbackFail('TOO_MANY_OPENED')); | 134 chrome.test.callbackFail('TOO_MANY_OPENED')); |
131 } | 135 } |
132 }; | 136 }; |
133 tryNextOne(); | 137 tryNextOne(); |
134 } | 138 } |
135 ]); | 139 ]); |
OLD | NEW |