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

Side by Side Diff: chrome/test/data/extensions/api_test/file_browser/mount_test/test.js

Issue 309483008: Files.app: Retrieve disk label name from mount path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test Created 6 years, 6 months 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
« no previous file with comments | « chrome/browser/chromeos/file_manager/volume_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 volumeLabel: 'drive_label1', 8 volumeLabel: 'mount_path1',
9 sourcePath: 'device_path1', 9 sourcePath: 'device_path1',
10 volumeType: 'removable', 10 volumeType: 'removable',
11 deviceType: 'usb', 11 deviceType: 'usb',
12 devicePath: 'system_path_prefix1', 12 devicePath: 'system_path_prefix1',
13 isParentDevice: false, 13 isParentDevice: false,
14 isReadOnly: false, 14 isReadOnly: false,
15 profile: {profileId: "", displayName: "", isCurrentProfile: true} 15 profile: {profileId: "", displayName: "", isCurrentProfile: true}
16 }; 16 };
17 17
18 var expectedVolume2 = { 18 var expectedVolume2 = {
19 volumeId: 'removable:mount_path2', 19 volumeId: 'removable:mount_path2',
20 volumeLabel: 'drive_label2', 20 volumeLabel: 'mount_path2',
21 sourcePath: 'device_path2', 21 sourcePath: 'device_path2',
22 volumeType: 'removable', 22 volumeType: 'removable',
23 deviceType: 'mobile', 23 deviceType: 'mobile',
24 devicePath: 'system_path_prefix2', 24 devicePath: 'system_path_prefix2',
25 isParentDevice: true, 25 isParentDevice: true,
26 isReadOnly: true, 26 isReadOnly: true,
27 profile: {profileId: "", displayName: "", isCurrentProfile: true} 27 profile: {profileId: "", displayName: "", isCurrentProfile: true}
28 }; 28 };
29 29
30 var expectedVolume3 = { 30 var expectedVolume3 = {
31 volumeId: 'removable:mount_path3', 31 volumeId: 'removable:mount_path3',
32 volumeLabel: 'drive_label3', 32 volumeLabel: 'mount_path3',
33 sourcePath: 'device_path3', 33 sourcePath: 'device_path3',
34 volumeType: 'removable', 34 volumeType: 'removable',
35 deviceType: 'optical', 35 deviceType: 'optical',
36 devicePath: 'system_path_prefix3', 36 devicePath: 'system_path_prefix3',
37 isParentDevice: true, 37 isParentDevice: true,
38 isReadOnly: false, 38 isReadOnly: false,
39 profile: {profileId: "", displayName: "", isCurrentProfile: true} 39 profile: {profileId: "", displayName: "", isCurrentProfile: true}
40 }; 40 };
41 41
42 var expectedDownloadsVolume = { 42 var expectedDownloadsVolume = {
43 volumeId: /^downloads:Downloads[^\/]*$/, 43 volumeId: /^downloads:Downloads[^\/]*$/,
44 volumeLabel: '', 44 volumeLabel: '',
45 volumeType: 'downloads', 45 volumeType: 'downloads',
46 isReadOnly: false, 46 isReadOnly: false,
47 profile: {profileId: "", displayName: "", isCurrentProfile: true} 47 profile: {profileId: "", displayName: "", isCurrentProfile: true}
48 }; 48 };
49 49
50 var expectedDriveVolume = { 50 var expectedDriveVolume = {
51 volumeId: /^drive:drive[^\/]*$/, 51 volumeId: /^drive:drive[^\/]*$/,
52 volumeLabel: '', 52 volumeLabel: '',
53 sourcePath: /^\/special\/drive[^\/]*$/, 53 sourcePath: /^\/special\/drive[^\/]*$/,
54 volumeType: 'drive', 54 volumeType: 'drive',
55 isReadOnly: false, 55 isReadOnly: false,
56 profile: {profileId: "", displayName: "", isCurrentProfile: true} 56 profile: {profileId: "", displayName: "", isCurrentProfile: true}
57 }; 57 };
58 58
59 var expectedArchiveVolume = { 59 var expectedArchiveVolume = {
60 volumeId: 'archive:archive_mount_path', 60 volumeId: 'archive:archive_mount_path',
61 volumeLabel: '', 61 volumeLabel: 'archive_mount_path',
62 sourcePath: /removable\/mount_path3\/archive.zip$/, 62 sourcePath: /removable\/mount_path3\/archive.zip$/,
63 volumeType: 'archive', 63 volumeType: 'archive',
64 isReadOnly: true, 64 isReadOnly: true,
65 profile: {profileId: "", displayName: "", isCurrentProfile: true} 65 profile: {profileId: "", displayName: "", isCurrentProfile: true}
66 }; 66 };
67 67
68 // List of expected mount points. 68 // List of expected mount points.
69 // NOTE: this has to be synced with values in file_browser_private_apitest.cc 69 // NOTE: this has to be synced with values in file_browser_private_apitest.cc
70 // and values sorted by volumeId. 70 // and values sorted by volumeId.
71 var expectedVolumeList = [ 71 var expectedVolumeList = [
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 'getMountPoints returned wrong number of mount points.'); 127 'getMountPoints returned wrong number of mount points.');
128 for (var i = 0; i < expectedVolumeList.length; i++) { 128 for (var i = 0; i < expectedVolumeList.length; i++) {
129 chrome.test.assertTrue( 129 chrome.test.assertTrue(
130 validateObject( 130 validateObject(
131 result[i], expectedVolumeList[i], 'volumeMetadata'), 131 result[i], expectedVolumeList[i], 'volumeMetadata'),
132 'getMountPoints result[' + i + '] not as expected'); 132 'getMountPoints result[' + i + '] not as expected');
133 } 133 }
134 })); 134 }));
135 } 135 }
136 ]); 136 ]);
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_manager/volume_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698