Print preview: Modernize tests to use Mocha |
||
Issue descriptionhttps://cs.chromium.org/chromium/src/chrome/test/data/webui/print_preview/print_preview.js There are multiple advantages of using Mocha for our JS tests. - Better async test support (via Promises) - Convenient test lifecycle via suite() -> suiteSetup() -> setup() -> test() -> teadown() -> suiteTeardown(). - Isolate JS test code from JS to C++ conversion code (old js2gtest mechanism) - No need to recompile browser_tests while iterating on a test. - Consistent with newer WebUI tests (MD Settings + other MD pages).
,
May 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4a225601e7fcf2c57ea5376edf1e55e722216343 commit 4a225601e7fcf2c57ea5376edf1e55e722216343 Author: dpapad <dpapad@chromium.org> Date: Sat May 27 02:01:18 2017 Print Preview: Migrate JS tests to use Mocha, part 2. Migrating following tests: SystemDialogLinkIsHiddenInAppKioskMode SectionsDisabled PrintToPDFSelectedCapabilities SourceIsHTMLCapabilities SourceIsPDFCapabilities ScalingUnchecksFitToPage CheckNumCopiesPrintPreset CheckDuplexPrintPreset CustomMarginsControlsCheck PageLayoutHasNoMarginsHideHeaderFooter PageLayoutHasMarginsShowHeaderFooter Migrated tests 16, remaining tests 20. BUG= 726536 Review-Url: https://codereview.chromium.org/2910503003 Cr-Commit-Position: refs/heads/master@{#475217} [modify] https://crrev.com/4a225601e7fcf2c57ea5376edf1e55e722216343/chrome/test/data/webui/print_preview/print_preview.js [modify] https://crrev.com/4a225601e7fcf2c57ea5376edf1e55e722216343/chrome/test/data/webui/print_preview/print_preview_tests.js [modify] https://crrev.com/4a225601e7fcf2c57ea5376edf1e55e722216343/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js
,
May 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cf195c35d5f9cd9c90b8688e1d9c50c4cfd5522e commit cf195c35d5f9cd9c90b8688e1d9c50c4cfd5522e Author: dpapad <dpapad@chromium.org> Date: Wed May 31 22:05:10 2017 Print Preview: Migrate JS tests to use Mocha, part 3. Migrating the following tests: ZeroTopAndBottomMarginsHideHeaderFooter ZeroTopAndNonZeroBottomMarginShowHeaderFooter SmallPaperSizeHeaderFooter TestColorSettingsMonochrome TestColorSettingsCustomMonochrome TestColorSettingsColor TestColorSettingsCustomColor TestColorSettingsBothStandardDefaultColor TestColorSettingsBothStandardDefaultMonochrome TestColorSettingsBothCustomDefaultColor Migrated tests 26, remaining tests 10. BUG= 726536 Review-Url: https://codereview.chromium.org/2911203003 Cr-Commit-Position: refs/heads/master@{#476054} [modify] https://crrev.com/cf195c35d5f9cd9c90b8688e1d9c50c4cfd5522e/chrome/test/data/webui/print_preview/print_preview.js [modify] https://crrev.com/cf195c35d5f9cd9c90b8688e1d9c50c4cfd5522e/chrome/test/data/webui/print_preview/print_preview_tests.js [modify] https://crrev.com/cf195c35d5f9cd9c90b8688e1d9c50c4cfd5522e/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js
,
Jun 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/87c1fd7ea6e69c1d208a92301423b2bc7584bc97 commit 87c1fd7ea6e69c1d208a92301423b2bc7584bc97 Author: dpapad <dpapad@chromium.org> Date: Thu Jun 01 03:57:01 2017 Print Preview: Migrate remaining JS tests to use Mocha. Migrating all remaining tests: DuplexSettingsTrue DuplexSettingsFalse PrinterChangeUpdatesPreview NoPDFPluginErrorMessage CustomPaperNames AdvancedSettings1Option AdvancedSettings2Options InitIssuesOneRequest InvalidSettingsError GenerateDraft BUG= 726536 Review-Url: https://codereview.chromium.org/2920593002 Cr-Commit-Position: refs/heads/master@{#476182} [modify] https://crrev.com/87c1fd7ea6e69c1d208a92301423b2bc7584bc97/chrome/test/data/webui/BUILD.gn [delete] https://crrev.com/0c284454162c7b36d587707af42828f41336904f/chrome/test/data/webui/print_preview/print_preview.js [modify] https://crrev.com/87c1fd7ea6e69c1d208a92301423b2bc7584bc97/chrome/test/data/webui/print_preview/print_preview_tests.js [modify] https://crrev.com/87c1fd7ea6e69c1d208a92301423b2bc7584bc97/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js
,
Jun 1 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, May 26 2017