Commit Graph
7 Commits
Author SHA1 Message Date
Yang Guo 75beda900f Move test scripts to scripts/test
R=aerotwist@chromium.org, liviurau@chromium.org, machenbach@chromium.org

Bug: 1018122
Change-Id: I7cc3a1a9ab01c649b3c7fe8ba5d5254adc631634
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1880033
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
2019-10-28 07:57:59 +00:00
Tim van der Lippe bc38bd6964 Minify ES Modules files
After converting the `ui/` folder to ESM, there was a significant performance
regression in terms of file size of the `resources.pak`. It turns out that we
were not minifying ESM files, but we did do that before with Closure.

Update the `copy_devtools_modules` to also invoke rjsmin to minify the
JavaScript source code.

Before:
$ du -h -B K out/Default/resources.pak
12096K	out/Default/resources.pak

After:
$ du -h -B K out/Default/resources.pak
11752K	out/Default/resources.pak

Before the original CL transforming `ui/` landed:
$ du -h -B K out/Default/resources.pak
11860K	out/Default/resources.pak

This means that after converting `ui/` to ESM, we saved 90KB. We suspect
this is because we are no longer transpiling to ES5, but instead serve
source ES6.

Bug: 1010910
Change-Id: I7dd07ff788d014e9f9a8e25e168c58c010cd00af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1837814
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#702500}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8d2021d8394b9a248436fb6976070629cdffd961
2019-10-03 18:36:31 +00:00
Tim van der Lippe 790b9298b7 Reland "Reland "Convert ui/ARIAUtils.js to an ES module""
This reverts commit 901bcc219d9204748f9c256ceca0f2cd68061006.

Reason for revert: ESLint errors fixed

Original change's description:
> Revert "Reland "Convert ui/ARIAUtils.js to an ES module""
>
> This reverts commit ec810baced8e07ca3e9f2b801703be433807d2a2.
>
> Reason for revert: causing eslint failures on Linux Tests:
> /b/s/w/ir/third_party/blink/renderer/devtools/front_end/dom_extension/DOMExtension.js
>   817:10  error  'onInvokeElement' is defined but never used  no-unused-vars
> https://ci.chromium.org/p/chromium/builders/ci/Linux%20Tests/81950
>
> Original change's description:
> > Reland "Convert ui/ARIAUtils.js to an ES module"
> >
> > This is a reland of b3373919f86df10c190a8672ca828c7ea4b920e5
> >
> > Original change's description:
> > > Convert ui/ARIAUtils.js to an ES module
> > >
> > > ES modules allow files to explicitly import and export symbols [1].
> > > This patch migrates ARIAUtils.js to an ES module, while maintaining
> > > backwards compatibility with existing usages of `window.UI.ARIAUtils`.
> > >
> > > The build system is updated to copy these modules verbatim, as it no
> > > longer require pre-processing to be loaded. The `module.json` no longer
> > > includes this file as a script, to make sure it is not double-bundled
> > > into `shell.js`. Instead, it is added to the new field `modules`, which
> > > contains all modules. By doing so, it becomes clear which files are
> > > converted to modules already and which require the legacy references
> > > to the global scope.
> > >
> > > This module and future modules will be imported from `root.js`, which is
> > > added to all existing HTML application files.
> > >
> > > Design Doc: https://docs.google.com/document/d/1h9dOy3nNPNfZ2AtZXzB-DwJqG4Oo37WWvKLCuzCcPzo/edit?usp=sharing
> > >
> > > [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
> > >
> > > TBR=jochen@chromium.org
> > >
> > > Change-Id: Ie79c8f2fce3aff96fa28af0b575eae39bfe8e1a5
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1748949
> > > Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> > > Reviewed-by: Yang Guo <yangguo@chromium.org>
> > > Commit-Queue: Tim van der Lippe <tvanderlippe@google.com>
> > > Cr-Commit-Position: refs/heads/master@{#697238}
> >
> > Change-Id: I7544cbf4364d0b1a3c2f137a4d17a1afdb1d4aed
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810534
> > Reviewed-by: Yang Guo <yangguo@chromium.org>
> > Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#697626}
>
> TBR=yangguo@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org
>
> Change-Id: I445fd35f135450cd9e8ed4c69bf913662f461ce6
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1811989
> Reviewed-by: Aaron Gable <agable@chromium.org>
> Commit-Queue: Aaron Gable <agable@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#697824}

Bug: 1004860
Change-Id: Idac8108b1b47488faa08473d2450a7ee0bdde96e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1813503
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#698029}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4adc7b63ea9ea093206c62363c8fdf50fc64aed8
2019-09-19 15:14:16 +00:00
Aaron Gable c9d00052df Revert "Reland "Convert ui/ARIAUtils.js to an ES module""
This reverts commit ec810baced8e07ca3e9f2b801703be433807d2a2.

Reason for revert: causing eslint failures on Linux Tests:
/b/s/w/ir/third_party/blink/renderer/devtools/front_end/dom_extension/DOMExtension.js
  817:10  error  'onInvokeElement' is defined but never used  no-unused-vars
https://ci.chromium.org/p/chromium/builders/ci/Linux%20Tests/81950

Original change's description:
> Reland "Convert ui/ARIAUtils.js to an ES module"
>
> This is a reland of b3373919f86df10c190a8672ca828c7ea4b920e5
>
> Original change's description:
> > Convert ui/ARIAUtils.js to an ES module
> >
> > ES modules allow files to explicitly import and export symbols [1].
> > This patch migrates ARIAUtils.js to an ES module, while maintaining
> > backwards compatibility with existing usages of `window.UI.ARIAUtils`.
> >
> > The build system is updated to copy these modules verbatim, as it no
> > longer require pre-processing to be loaded. The `module.json` no longer
> > includes this file as a script, to make sure it is not double-bundled
> > into `shell.js`. Instead, it is added to the new field `modules`, which
> > contains all modules. By doing so, it becomes clear which files are
> > converted to modules already and which require the legacy references
> > to the global scope.
> >
> > This module and future modules will be imported from `root.js`, which is
> > added to all existing HTML application files.
> >
> > Design Doc: https://docs.google.com/document/d/1h9dOy3nNPNfZ2AtZXzB-DwJqG4Oo37WWvKLCuzCcPzo/edit?usp=sharing
> >
> > [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
> >
> > TBR=jochen@chromium.org
> >
> > Change-Id: Ie79c8f2fce3aff96fa28af0b575eae39bfe8e1a5
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1748949
> > Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> > Reviewed-by: Yang Guo <yangguo@chromium.org>
> > Commit-Queue: Tim van der Lippe <tvanderlippe@google.com>
> > Cr-Commit-Position: refs/heads/master@{#697238}
>
> Change-Id: I7544cbf4364d0b1a3c2f137a4d17a1afdb1d4aed
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810534
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#697626}

TBR=yangguo@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org

Change-Id: I445fd35f135450cd9e8ed4c69bf913662f461ce6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1811989
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#697824}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 901bcc219d9204748f9c256ceca0f2cd68061006
2019-09-18 23:35:18 +00:00
Tim van der Lippe 63a4d3dcd6 Reland "Convert ui/ARIAUtils.js to an ES module"
This is a reland of b3373919f86df10c190a8672ca828c7ea4b920e5

Original change's description:
> Convert ui/ARIAUtils.js to an ES module
>
> ES modules allow files to explicitly import and export symbols [1].
> This patch migrates ARIAUtils.js to an ES module, while maintaining
> backwards compatibility with existing usages of `window.UI.ARIAUtils`.
>
> The build system is updated to copy these modules verbatim, as it no
> longer require pre-processing to be loaded. The `module.json` no longer
> includes this file as a script, to make sure it is not double-bundled
> into `shell.js`. Instead, it is added to the new field `modules`, which
> contains all modules. By doing so, it becomes clear which files are
> converted to modules already and which require the legacy references
> to the global scope.
>
> This module and future modules will be imported from `root.js`, which is
> added to all existing HTML application files.
>
> Design Doc: https://docs.google.com/document/d/1h9dOy3nNPNfZ2AtZXzB-DwJqG4Oo37WWvKLCuzCcPzo/edit?usp=sharing
>
> [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
>
> TBR=jochen@chromium.org
>
> Change-Id: Ie79c8f2fce3aff96fa28af0b575eae39bfe8e1a5
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1748949
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@google.com>
> Cr-Commit-Position: refs/heads/master@{#697238}

Change-Id: I7544cbf4364d0b1a3c2f137a4d17a1afdb1d4aed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810534
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#697626}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ec810baced8e07ca3e9f2b801703be433807d2a2
2019-09-18 15:31:38 +00:00
Takuto Ikuta 4cabd3c98e Revert "Convert ui/ARIAUtils.js to an ES module"
This reverts commit b3373919f86df10c190a8672ca828c7ea4b920e5.

Reason for revert: https://ci.chromium.org/p/chromium/builders/ci/Linux%20Tests/81914

Original change's description:
> Convert ui/ARIAUtils.js to an ES module
> 
> ES modules allow files to explicitly import and export symbols [1].
> This patch migrates ARIAUtils.js to an ES module, while maintaining
> backwards compatibility with existing usages of `window.UI.ARIAUtils`.
> 
> The build system is updated to copy these modules verbatim, as it no
> longer require pre-processing to be loaded. The `module.json` no longer
> includes this file as a script, to make sure it is not double-bundled
> into `shell.js`. Instead, it is added to the new field `modules`, which
> contains all modules. By doing so, it becomes clear which files are
> converted to modules already and which require the legacy references
> to the global scope.
> 
> This module and future modules will be imported from `root.js`, which is
> added to all existing HTML application files.
> 
> Design Doc: https://docs.google.com/document/d/1h9dOy3nNPNfZ2AtZXzB-DwJqG4Oo37WWvKLCuzCcPzo/edit?usp=sharing
> 
> [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
> 
> TBR=jochen@chromium.org
> 
> Change-Id: Ie79c8f2fce3aff96fa28af0b575eae39bfe8e1a5
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1748949
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@google.com>
> Cr-Commit-Position: refs/heads/master@{#697238}

TBR=yangguo@chromium.org,jochen@chromium.org,aerotwist@chromium.org,mathias@chromium.org,tvanderlippe@google.com

Change-Id: I550f1082755ef4b9e7bc778e3afdaef324dae03a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808954
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#697355}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 53558661a67dcdf9d11bb2571d43ebca6f504670
2019-09-17 20:55:22 +00:00
Tim van der Lippe 321ff26d6d Convert ui/ARIAUtils.js to an ES module
ES modules allow files to explicitly import and export symbols [1].
This patch migrates ARIAUtils.js to an ES module, while maintaining
backwards compatibility with existing usages of `window.UI.ARIAUtils`.

The build system is updated to copy these modules verbatim, as it no
longer require pre-processing to be loaded. The `module.json` no longer
includes this file as a script, to make sure it is not double-bundled
into `shell.js`. Instead, it is added to the new field `modules`, which
contains all modules. By doing so, it becomes clear which files are
converted to modules already and which require the legacy references
to the global scope.

This module and future modules will be imported from `root.js`, which is
added to all existing HTML application files.

Design Doc: https://docs.google.com/document/d/1h9dOy3nNPNfZ2AtZXzB-DwJqG4Oo37WWvKLCuzCcPzo/edit?usp=sharing

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import

TBR=jochen@chromium.org

Change-Id: Ie79c8f2fce3aff96fa28af0b575eae39bfe8e1a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1748949
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#697238}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b3373919f86df10c190a8672ca828c7ea4b920e5
2019-09-17 15:56:41 +00:00