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

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

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

Powered by Google App Engine
This is Rietveld 408576698