[Files app] Convert file_selection.js to es6 classes
Used lebab to convert to ES6 class with the following command: lebab --replace \ ui/file_manager/file_manager/foreground/js/file_selection.js \ --transform class Manual fixes: - Fix closure markup to go to constructor() instead of class definition. - Fix Mock class to be ES6 class too, since closure doesn't allow old style classes to extends from ES6 classes. - Rename MockFileSelectionHandler to FakeSelectionHandler. This fake lies to closure by saying that it extends FileSelectionHandler to allow it to be passed as FileSelectionHandler in closure compilation. - Add addEventListener() method to FakeFileSelectionHandler to fix tests that use this method. Bug: 778674 Change-Id: I39fb5ef7d7d8ef9c7fbc2b64244a26b9ebe23584 Reviewed-on: https://chromium-review.googlesource.com/c/1457700Reviewed-by:Joel Hockey <joelhockey@chromium.org> Commit-Queue: Luciano Pacheco <lucmult@chromium.org> Cr-Commit-Position: refs/heads/master@{#629911}
Showing
Please register or sign in to comment