| OLD | NEW |
| 1 <script> | 1 <script> |
| 2 // These have to be sync'd with extension_file_browser_private_apitest.cc | 2 // These have to be sync'd with extension_file_browser_private_apitest.cc |
| 3 var expectedVolume1 = { | 3 var expectedVolume1 = { |
| 4 devicePath: 'device_path1', | 4 devicePath: 'device_path1', |
| 5 mountPath: 'mount_path1/', | 5 mountPath: 'mount_path1/', |
| 6 systemPath: 'system_path1', | 6 systemPath: 'system_path1', |
| 7 filePath: 'file_path1', | 7 filePath: 'file_path1', |
| 8 deviceLabel: 'device_label1', | 8 deviceLabel: 'device_label1', |
| 9 driveLabel: 'drive_label1', | 9 driveLabel: 'drive_label1', |
| 10 deviceType: 'flash', | 10 deviceType: 'flash', |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 } | 55 } |
| 56 } | 56 } |
| 57 if (Object.keys(expected).length != Object.keys(volume).length) { | 57 if (Object.keys(expected).length != Object.keys(volume).length) { |
| 58 console.log("Unexpected property found in returned volume"); | 58 console.log("Unexpected property found in returned volume"); |
| 59 return false; | 59 return false; |
| 60 } | 60 } |
| 61 return true; | 61 return true; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 chrome.test.runTests([ | 64 chrome.test.runTests([ |
| 65 function unmountVolume() { | 65 function removeMount() { |
| 66 chrome.fileBrowserPrivate.unmountVolume("devicePath1"); | 66 chrome.fileBrowserPrivate.removeMount("devicePath1"); |
| 67 // We actually check this one on C++ side. If MountLibrary.UnmountPath | 67 // We actually check this one on C++ side. If MountLibrary.RemoveMount |
| 68 // doesn't get called, test will fail. | 68 // doesn't get called, test will fail. |
| 69 chrome.test.succeed(); | 69 chrome.test.succeed(); |
| 70 }, | 70 }, |
| 71 | 71 |
| 72 function getVolumeMetadataValid1() { | 72 function getVolumeMetadataValid1() { |
| 73 chrome.fileBrowserPrivate.getVolumeMetadata( | 73 chrome.fileBrowserPrivate.getVolumeMetadata( |
| 74 "device_path1", | 74 "device_path1", |
| 75 chrome.test.callbackPass(function(result) { | 75 chrome.test.callbackPass(function(result) { |
| 76 chrome.test.assertTrue(validateVolume(result, expectedVolume1), | 76 chrome.test.assertTrue(validateVolume(result, expectedVolume1), |
| 77 "getVolumeMetadata result for first volume not as expected"); | 77 "getVolumeMetadata result for first volume not as expected"); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 107 "", | 107 "", |
| 108 chrome.test.callbackFail("Device path not found")); | 108 chrome.test.callbackFail("Device path not found")); |
| 109 } | 109 } |
| 110 ]); | 110 ]); |
| 111 </script> | 111 </script> |
| 112 <html> | 112 <html> |
| 113 <body> | 113 <body> |
| 114 FileBrowserMounting tests... | 114 FileBrowserMounting tests... |
| 115 </body> | 115 </body> |
| 116 </html> | 116 </html> |
| OLD | NEW |