Bug 987487 - [Gaia] [Build] Refactoring webapp-optimize.js and unit tests
Merge pull request #20722 from cctuan/987487-3

Bug 987487 - [Gaia] [Build] Refactoring webapp-optimize.js and unit tests