Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 File Manager Development Harness | 1 File Manager Development Harness |
| 2 ================================ | 2 ================================ |
| 3 | 3 |
| 4 The File Manager harness hosts file manager dialogs as a regular web page. It's | 4 The File Manager harness hosts file manager dialogs as a regular web page. It's |
| 5 useful for development and manual unit testing. | 5 useful for development and manual unit testing. |
| 6 | 6 |
| 7 In order to use the harness, you must start chrome with the following | 7 In order to use the harness, you must start chrome with the following |
| 8 arguments: | 8 arguments: |
| 9 chrome --allow-file-access-from-files --unlimited-quota-for-files | 9 chrome --allow-file-access-from-files --user-data-dir=UDD_PATH |
| 10 | |
| 11 It is recommended to use the harness with a dedicated user data directory. | |
| 10 | 12 |
| 11 To view the harness, visit: | 13 To view the harness, visit: |
| 12 file://PATH/TO/src/chrome/browser/resources/file_manager/harness.html | 14 file://PATH/TO/src/chrome/browser/resources/file_manager/harness.html |
| 13 | 15 |
| 14 This will display a "Open File" dialog by default. You can switch to another | 16 On the first page load Chrome will ask for the permission to store local files. |
| 17 Click OK, then reload the page. | |
| 18 | |
| 19 "Open File" dialog is displayed by default. You can switch to another | |
|
dgozman
2012/01/17 12:10:10
BTW, default is full-page now.
Vladislav Kaznacheev
2012/01/17 12:44:29
Thanks, good catch.
On 2012/01/17 12:10:10, dgoz
| |
| 15 kind of dialog using the links at the top of the page. | 20 kind of dialog using the links at the top of the page. |
| 16 | 21 |
| 17 Populating the development filesystem | 22 Populating the development filesystem |
| 18 ===================================== | 23 ===================================== |
| 19 | 24 |
| 20 The "Save File" dialog type includes "New Folder" button. This can be used to | 25 The "Save File" dialog type includes "New Folder" button. This can be used to |
| 21 populate a few subdirectories for basic testing. | 26 populate a few subdirectories for basic testing. |
| 22 | 27 |
| 23 The buttons at the bottom of the page allow you to add files to, or clear out | 28 The buttons at the bottom of the page allow you to add files to, or clear out |
| 24 the mock filesystem. (This is the filesystem associated with all file: urls.) | 29 the mock filesystem. (This is the filesystem associated with all file: urls.) |
| 25 | 30 |
| 26 The Choose File button (from the bottom of the page) does not support importing | 31 The Choose File button (from the bottom of the page) does not support importing |
| 27 a hierarchy of directories. If you would like to bulk import a hierarchy, use | 32 a hierarchy of directories. If you would like to bulk import a hierarchy, use |
| 28 the squashdir.py script located in file_manager/bin/squashdir.py. This will | 33 the squashdir.py script located in file_manager/bin/squashdir.py. This will |
| 29 copy a tree of files into a single directory, renaming them all to include | 34 copy a tree of files into a single directory, renaming them all to include |
| 30 their original path. The Choose File button will reconstitute these munged | 35 their original path. The Choose File button will reconstitute these munged |
| 31 filenames back into their original structure. | 36 filenames back into their original structure. |
| 32 | 37 |
| 33 Poking at the File Manager | 38 Poking at the File Manager |
| 34 ========================== | 39 ========================== |
| 35 | 40 |
| 36 From the JS Console, you can refer to the fileManager object as | 41 From the JS Console, you can refer to the fileManager object as |
| 37 `harness.fileManager`. | 42 `harness.fileManager`. |
| OLD | NEW |