Files app: Fix the unittest HTML to work with Polymer elements
For our unittests Polymer wasn't working, this CL changes it by: 1. Always adding the HTML import polyfil. 2. Always importing the the Polymer config at the top, so any test using Polymer elements work. 3. If there is any dependency in the Files app Polymer elements (files inside //ui/file_manager/file_manager/foreground/elements/) it uses the elements_bundle.html instead of individual JS files. When I activated Polymer and imported the elements_bundle.html some tests started failing because they require the chrome.fileManagerPrivate mock. FileTransferController test uses ListContainer that requires the <files-spinner>. Also add the closing tag </cr-input> so the adjacent <input> remains outside the <cr-input> allowing the focus to flow properly as the test setting the focus on #test-input started failing once <cr-input> Polymer became fully functional. NOTE: This fix is only relevant for non-JS module unittest, we're migrating unittest to JS module and this problem doesn't happen when using the built-in JS import. Bug: 1102263 Change-Id: I2ea80bbe93afca2521bfa5ab9fcd6c32fcf8ecc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2573696 Commit-Queue: Noel Gordon <noel@chromium.org> Commit-Queue: Luciano Pacheco <lucmult@chromium.org> Auto-Submit: Luciano Pacheco <lucmult@chromium.org> Reviewed-by:Noel Gordon <noel@chromium.org> Cr-Commit-Position: refs/heads/master@{#833573}
Showing
Please register or sign in to comment