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 // These have to be sync'd with file_browser_private_apitest.cc | 5 // These have to be sync'd with file_browser_private_apitest.cc |
6 var expectedVolume1 = { | 6 var expectedVolume1 = { |
7 volumeId: 'removable:mount_path1', | 7 volumeId: 'removable:mount_path1', |
8 mountPath: '/removable/mount_path1', | 8 mountPath: '/removable/mount_path1', |
9 sourcePath: 'device_path1', | 9 sourcePath: 'device_path1', |
10 volumeType: 'removable', | 10 volumeType: 'removable', |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 mountPath: /^\/drive[^\/]*$/, | 55 mountPath: /^\/drive[^\/]*$/, |
56 sourcePath: /^\/special\/drive[^\/]*$/, | 56 sourcePath: /^\/special\/drive[^\/]*$/, |
57 volumeType: 'drive', | 57 volumeType: 'drive', |
58 isReadOnly: false, | 58 isReadOnly: false, |
59 profile: {profileId: "", displayName: "", isCurrentProfile: true} | 59 profile: {profileId: "", displayName: "", isCurrentProfile: true} |
60 }; | 60 }; |
61 | 61 |
62 var expectedArchiveVolume = { | 62 var expectedArchiveVolume = { |
63 volumeId: 'archive:archive_mount_path', | 63 volumeId: 'archive:archive_mount_path', |
64 mountPath: '/archive/archive_mount_path', | 64 mountPath: '/archive/archive_mount_path', |
65 sourcePath: 'archive_path', | 65 sourcePath: /removable\/mount_path3\/archive.zip$/, |
66 volumeType: 'archive', | 66 volumeType: 'archive', |
67 isReadOnly: true, | 67 isReadOnly: true, |
68 profile: {profileId: "", displayName: "", isCurrentProfile: true} | 68 profile: {profileId: "", displayName: "", isCurrentProfile: true} |
69 }; | 69 }; |
70 | 70 |
71 // List of expected mount points. | 71 // List of expected mount points. |
72 // NOTE: this has to be synced with values in file_browser_private_apitest.cc | 72 // NOTE: this has to be synced with values in file_browser_private_apitest.cc |
73 // and values sorted by volumeId. | 73 // and values sorted by volumeId. |
74 var expectedVolumeList = [ | 74 var expectedVolumeList = [ |
75 expectedArchiveVolume, | 75 expectedArchiveVolume, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 'getMountPoints returned wrong number of mount points.'); | 130 'getMountPoints returned wrong number of mount points.'); |
131 for (var i = 0; i < expectedVolumeList.length; i++) { | 131 for (var i = 0; i < expectedVolumeList.length; i++) { |
132 chrome.test.assertTrue( | 132 chrome.test.assertTrue( |
133 validateObject( | 133 validateObject( |
134 result[i], expectedVolumeList[i], 'volumeMetadata'), | 134 result[i], expectedVolumeList[i], 'volumeMetadata'), |
135 'getMountPoints result[' + i + '] not as expected'); | 135 'getMountPoints result[' + i + '] not as expected'); |
136 } | 136 } |
137 })); | 137 })); |
138 } | 138 } |
139 ]); | 139 ]); |
OLD | NEW |