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