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

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

Issue 550863003: Rename fileBrowserPrivate to fileManagerPrivate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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_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 profile: {profileId: "", displayName: "", isCurrentProfile: true} 15 profile: {profileId: "", displayName: "", isCurrentProfile: true}
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 var expectedArchiveVolume = { 59 var expectedArchiveVolume = {
60 volumeId: 'archive:archive_mount_path', 60 volumeId: 'archive:archive_mount_path',
61 volumeLabel: 'archive_mount_path', 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_manager_private_apitest.cc
70 // and values sorted by volumeId. 70 // and values sorted by volumeId.
71 var expectedVolumeList = [ 71 var expectedVolumeList = [
72 expectedArchiveVolume, 72 expectedArchiveVolume,
73 expectedDownloadsVolume, 73 expectedDownloadsVolume,
74 expectedDriveVolume, 74 expectedDriveVolume,
75 expectedVolume1, 75 expectedVolume1,
76 expectedVolume2, 76 expectedVolume2,
77 expectedVolume3, 77 expectedVolume3,
78 ]; 78 ];
79 79
(...skipping 26 matching lines...) Expand all
106 } 106 }
107 107
108 console.warn('Unexpected properties found: ' + unexpectedKeys); 108 console.warn('Unexpected properties found: ' + unexpectedKeys);
109 return false; 109 return false;
110 } 110 }
111 return true; 111 return true;
112 } 112 }
113 113
114 chrome.test.runTests([ 114 chrome.test.runTests([
115 function removeMount() { 115 function removeMount() {
116 chrome.fileBrowserPrivate.removeMount('archive:archive_mount_path'); 116 chrome.fileManagerPrivate.removeMount('archive:archive_mount_path');
117 117
118 // We actually check this one on C++ side. If MountLibrary.RemoveMount 118 // We actually check this one on C++ side. If MountLibrary.RemoveMount
119 // doesn't get called, test will fail. 119 // doesn't get called, test will fail.
120 chrome.test.succeed(); 120 chrome.test.succeed();
121 }, 121 },
122 122
123 function getVolumeMetadataList() { 123 function getVolumeMetadataList() {
124 chrome.fileBrowserPrivate.getVolumeMetadataList( 124 chrome.fileManagerPrivate.getVolumeMetadataList(
125 chrome.test.callbackPass(function(result) { 125 chrome.test.callbackPass(function(result) {
126 chrome.test.assertEq(expectedVolumeList.length, result.length, 126 chrome.test.assertEq(expectedVolumeList.length, result.length,
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

Powered by Google App Engine
This is Rietveld 408576698