New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 849967 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Get the Files app to run on a chrome:// URL in Debug mode

Project Member Reported by sashab@chromium.org, Jun 6 2018

Issue description

If we can get the Files app to run on a chrome:// URL in Debug mode, it would be much easier to develop/test.

We can maybe also (later) enable the FMP APIs on Linux which would allow developing and testing the UI on Linux (as prototyped in issue 845818).
 
Chris - did you say this was an easy thing to do? Could we wrap it in an #ifdef? :)

Comment 2 by noel@chromium.org, Jun 6 2018

calamity@'s suggestion was to serve Files.App off chrome://resources IIRC.  And that's not too hard either ...
file_manager_test.git.diff
13.3 KB Download
Nice, ty Noel! Can we land this? Can we make this run only in debug mode, with no impact on the existing FM app?

Comment 4 by noel@chromium.org, Jun 6 2018

Maybe, maybe, and maybe.  Not something /me is working on. 

This patch was a test of Chris's idea: that serving Files.App as single-page off the pre-existing chrome infrastructure (grit/gn/chrome://resources etc) was a possibility.

Things that'd need fixing in this files.app-in-a-single-page patch IMHO

  - remove all dependencies on ui/file_manager/file_manager/test/*
    - and no script needed either
  - do not mock out chrome.* api
    - change the C++ code to allow them to be used from chrome://resources
      (or whatever serving point is chosen).
  - use the real C++ volume manager
    - do not mock it
  - retain the current grit flow
    - because it gives us i18n strings
  - fix problems that ui/file_manager/file_manager/test/* never solved
    - like opening FileManager's Gallery, AudioPlayer, VideoPlayer ...

Comment 5 by noel@chromium.org, Jun 6 2018

Other things I'd change while I'm thinking about this for 10 seconds.

  - add source maps support so the File Manager individual .js files would
    appear in the chrome inspector, by following the weboptimize_ui idea to
    making a BUILD.gn do that work
   - take resources pack and unpack it
   - get a list of the individual .js files needed
   - run them thru polymer bundler with the --create-source-maps option
   - append the source map URL generated by polymer to the file manager
     main.html (whatever it called in the resources pak).
   - repack resources.pak

Sign in to add a comment