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

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

Issue 673253005: Revert of Add a has_media flag to VolumeMetadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « chrome/common/extensions/api/file_manager_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_manager_private_apitest.cc 5 // These have to be sync'd with file_manager_private_apitest.cc
6 var expectedVolume1 = { 6 var expectedVolume1 = {
7 volumeId: 'removable:mount_path1', 7 volumeId: 'removable:mount_path1',
8 volumeLabel: 'mount_path1', 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 hasMedia: 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 volumeLabel: 'mount_path2', 20 volumeLabel: 'mount_path2',
22 sourcePath: 'device_path2', 21 sourcePath: 'device_path2',
23 volumeType: 'removable', 22 volumeType: 'removable',
24 deviceType: 'mobile', 23 deviceType: 'mobile',
25 devicePath: 'system_path_prefix2', 24 devicePath: 'system_path_prefix2',
26 isParentDevice: true, 25 isParentDevice: true,
27 isReadOnly: true, 26 isReadOnly: true,
28 hasMedia: 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 volumeLabel: 'mount_path3', 32 volumeLabel: 'mount_path3',
35 sourcePath: 'device_path3', 33 sourcePath: 'device_path3',
36 volumeType: 'removable', 34 volumeType: 'removable',
37 deviceType: 'optical', 35 deviceType: 'optical',
38 devicePath: 'system_path_prefix3', 36 devicePath: 'system_path_prefix3',
39 isParentDevice: true, 37 isParentDevice: true,
40 isReadOnly: false, 38 isReadOnly: false,
41 hasMedia: 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 volumeLabel: '', 44 volumeLabel: '',
48 volumeType: 'downloads', 45 volumeType: 'downloads',
49 isReadOnly: false, 46 isReadOnly: false,
50 hasMedia: true,
51 profile: {profileId: "", displayName: "", isCurrentProfile: true} 47 profile: {profileId: "", displayName: "", isCurrentProfile: true}
52 }; 48 };
53 49
54 var expectedDriveVolume = { 50 var expectedDriveVolume = {
55 volumeId: /^drive:drive[^\/]*$/, 51 volumeId: /^drive:drive[^\/]*$/,
56 volumeLabel: '', 52 volumeLabel: '',
57 sourcePath: /^\/special\/drive[^\/]*$/, 53 sourcePath: /^\/special\/drive[^\/]*$/,
58 volumeType: 'drive', 54 volumeType: 'drive',
59 isReadOnly: false, 55 isReadOnly: false,
60 hasMedia: true,
61 profile: {profileId: "", displayName: "", isCurrentProfile: true} 56 profile: {profileId: "", displayName: "", isCurrentProfile: true}
62 }; 57 };
63 58
64 var expectedArchiveVolume = { 59 var expectedArchiveVolume = {
65 volumeId: 'archive:archive_mount_path', 60 volumeId: 'archive:archive_mount_path',
66 volumeLabel: 'archive_mount_path', 61 volumeLabel: 'archive_mount_path',
67 sourcePath: /removable\/mount_path3\/archive.zip$/, 62 sourcePath: /removable\/mount_path3\/archive.zip$/,
68 volumeType: 'archive', 63 volumeType: 'archive',
69 isReadOnly: true, 64 isReadOnly: true,
70 hasMedia: false,
71 profile: {profileId: "", displayName: "", isCurrentProfile: true} 65 profile: {profileId: "", displayName: "", isCurrentProfile: true}
72 }; 66 };
73 67
74 // List of expected mount points. 68 // List of expected mount points.
75 // NOTE: this has to be synced with values in file_manager_private_apitest.cc 69 // NOTE: this has to be synced with values in file_manager_private_apitest.cc
76 // and values sorted by volumeId. 70 // and values sorted by volumeId.
77 var expectedVolumeList = [ 71 var expectedVolumeList = [
78 expectedArchiveVolume, 72 expectedArchiveVolume,
79 expectedDownloadsVolume, 73 expectedDownloadsVolume,
80 expectedDriveVolume, 74 expectedDriveVolume,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 'getMountPoints returned wrong number of mount points.'); 127 'getMountPoints returned wrong number of mount points.');
134 for (var i = 0; i < expectedVolumeList.length; i++) { 128 for (var i = 0; i < expectedVolumeList.length; i++) {
135 chrome.test.assertTrue( 129 chrome.test.assertTrue(
136 validateObject( 130 validateObject(
137 result[i], expectedVolumeList[i], 'volumeMetadata'), 131 result[i], expectedVolumeList[i], 'volumeMetadata'),
138 'getMountPoints result[' + i + '] not as expected'); 132 'getMountPoints result[' + i + '] not as expected');
139 } 133 }
140 })); 134 }));
141 } 135 }
142 ]); 136 ]);
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/file_manager_private.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698