Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Unified Diff: chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js

Issue 2911203003: Print Preview: Migrate JS tests to use Mocha, part 3. (Closed)
Patch Set: Cleanup Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/webui/print_preview/print_preview_tests.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js
diff --git a/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js b/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js
index f723d4953e9b3f7668763f221b83006436f23f8a..740c11aeb797a5178fede4318f5ab2cd0a8c46d4 100644
--- a/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js
+++ b/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js
@@ -61,71 +61,36 @@ PrintPreviewUIBrowserTest.prototype = {
],
};
-TEST_F('PrintPreviewUIBrowserTest', 'PrinterList', function() {
- mocha.grep(/PrinterList\b/).run();
+// Run each mocha test in isolation (within a new TEST_F() call).
+[
+ 'PrinterList',
+ 'PrinterListCloudEmpty',
+ 'RestoreLocalDestination',
+ 'RestoreMultipleDestinations',
+ 'DefaultDestinationSelectionRules',
+ 'SystemDialogLinkIsHiddenInAppKioskMode',
+ 'SectionsDisabled',
+ 'PrintToPDFSelectedCapabilities',
+ 'SourceIsHTMLCapabilities',
+ 'SourceIsPDFCapabilities',
+ 'ScalingUnchecksFitToPage',
+ 'CheckNumCopiesPrintPreset',
+ 'CheckDuplexPrintPreset',
+ 'CustomMarginsControlsCheck',
+ 'PageLayoutHasNoMarginsHideHeaderFooter',
+ 'PageLayoutHasMarginsShowHeaderFooter',
+ 'ZeroTopAndBottomMarginsHideHeaderFooter',
+ 'ZeroTopAndNonZeroBottomMarginShowHeaderFooter',
+ 'SmallPaperSizeHeaderFooter',
+ 'TestColorSettingsMonochrome',
+ 'TestColorSettingsCustomMonochrome',
+ 'TestColorSettingsColor',
+ 'TestColorSettingsCustomColor',
+ 'TestColorSettingsBothStandardDefaultColor',
+ 'TestColorSettingsBothStandardDefaultMonochrome',
+ 'TestColorSettingsBothCustomDefaultColor',
+].forEach(function(testName) {
+ TEST_F('PrintPreviewUIBrowserTest', testName, function() {
+ mocha.grep(new RegExp(testName + '\\b')).run();
+ });
});
-
-TEST_F('PrintPreviewUIBrowserTest', 'PrinterListCloudEmpty', function() {
- mocha.grep(/PrinterListCloudEmpty\b/).run();
-});
-
-TEST_F('PrintPreviewUIBrowserTest', 'RestoreLocalDestination', function() {
- mocha.grep(/RestoreLocalDestination\b/).run();
-});
-
-TEST_F('PrintPreviewUIBrowserTest', 'RestoreMultipleDestinations', function() {
- mocha.grep(/RestoreMultipleDestinations\b/).run();
-});
-
-TEST_F('PrintPreviewUIBrowserTest', 'DefaultDestinationSelectionRules',
- function() {
- mocha.grep(/DefaultDestinationSelectionRules\b/).run();
- });
-
-TEST_F('PrintPreviewUIBrowserTest', 'SystemDialogLinkIsHiddenInAppKioskMode',
- function() {
- mocha.grep(/SystemDialogLinkIsHiddenInAppKioskMode\b/).run();
- });
-
-TEST_F('PrintPreviewUIBrowserTest', 'SectionsDisabled', function() {
- mocha.grep(/SectionsDisabled\b/).run();
-});
-
-TEST_F('PrintPreviewUIBrowserTest', 'PrintToPDFSelectedCapabilities',
- function() {
- mocha.grep(/PrintToPDFSelectedCapabilities\b/).run();
- });
-
-TEST_F('PrintPreviewUIBrowserTest', 'SourceIsHTMLCapabilities', function() {
- mocha.grep(/SourceIsHTMLCapabilities\b/).run();
-});
-
-TEST_F('PrintPreviewUIBrowserTest', 'SourceIsPDFCapabilities', function() {
- mocha.grep(/SourceIsPDFCapabilities\b/).run();
-});
-
-TEST_F('PrintPreviewUIBrowserTest', 'ScalingUnchecksFitToPage', function() {
- mocha.grep(/ScalingUnchecksFitToPage\b/).run();
-});
-
-TEST_F('PrintPreviewUIBrowserTest', 'CheckNumCopiesPrintPreset', function() {
- mocha.grep(/CheckNumCopiesPrintPreset\b/).run();
-});
-
-TEST_F('PrintPreviewUIBrowserTest', 'CheckDuplexPrintPreset', function() {
- mocha.grep(/CheckDuplexPrintPreset\b/).run();
-});
-
-TEST_F('PrintPreviewUIBrowserTest', 'CustomMarginsControlsCheck', function() {
- mocha.grep(/CustomMarginsControlsCheck\b/).run();
-});
-
-TEST_F('PrintPreviewUIBrowserTest', 'PageLayoutHasNoMarginsHideHeaderFooter',
- function() {
- mocha.grep(/PageLayoutHasNoMarginsHideHeaderFooter\b/).run();
- });
-
-TEST_F('PrintPreviewUIBrowserTest', 'PageLayoutHasMarginsShowHeaderFooter',
- function() {
- mocha.grep(/PageLayoutHasMarginsShowHeaderFooter\b/).run();
- });
« no previous file with comments | « chrome/test/data/webui/print_preview/print_preview_tests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698