OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 var volumeManager = null; | 5 var volumeManager = null; |
6 var metadataModel = null; | 6 var metadataModel = null; |
7 var shortcutsModel = null; | 7 var shortcutsModel = null; |
8 var driveSyncHandler = null; | 8 var driveSyncHandler = null; |
9 var ui = null; | 9 var ui = null; |
10 var driveFileSystem = null; | 10 var driveFileSystem = null; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 runtime: { | 73 runtime: { |
74 lastError: null | 74 lastError: null |
75 }, | 75 }, |
76 fileManagerPrivate: { | 76 fileManagerPrivate: { |
77 // The following closures are set per test case. | 77 // The following closures are set per test case. |
78 getCustomActions: null, | 78 getCustomActions: null, |
79 executeCustomAction: null, | 79 executeCustomAction: null, |
80 pinDriveFile: null | 80 pinDriveFile: null |
81 }, | 81 }, |
82 }; | 82 }; |
| 83 new MockCommandLinePrivate(); |
83 | 84 |
84 volumeManager = new MockVolumeManager(); | 85 volumeManager = new MockVolumeManager(); |
85 volumeManager.createVolumeInfo( | 86 volumeManager.createVolumeInfo( |
86 VolumeManagerCommon.VolumeType.PROVIDED, | 87 VolumeManagerCommon.VolumeType.PROVIDED, |
87 'provided', | 88 'provided', |
88 'Provided'); | 89 'Provided'); |
89 | 90 |
90 driveFileSystem = volumeManager.getCurrentProfileVolumeInfo( | 91 driveFileSystem = volumeManager.getCurrentProfileVolumeInfo( |
91 VolumeManagerCommon.VolumeType.DRIVE).fileSystem; | 92 VolumeManagerCommon.VolumeType.DRIVE).fileSystem; |
92 providedFileSystem = volumeManager.getCurrentProfileVolumeInfo( | 93 providedFileSystem = volumeManager.getCurrentProfileVolumeInfo( |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 callback(null); | 302 callback(null); |
302 }; | 303 }; |
303 | 304 |
304 var model = new ActionsModel(volumeManager, metadataModel, shortcutsModel, | 305 var model = new ActionsModel(volumeManager, metadataModel, shortcutsModel, |
305 driveSyncHandler, ui, [providedFileSystem.entries['/test']]); | 306 driveSyncHandler, ui, [providedFileSystem.entries['/test']]); |
306 return reportPromise(model.initialize().then(function() { | 307 return reportPromise(model.initialize().then(function() { |
307 var actions = model.getActions(); | 308 var actions = model.getActions(); |
308 assertEquals(0, Object.keys(actions).length); | 309 assertEquals(0, Object.keys(actions).length); |
309 }), callback); | 310 }), callback); |
310 } | 311 } |
OLD | NEW |