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

Side by Side 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, 6 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** @fileoverview Runs the Print Preview tests. */ 5 /** @fileoverview Runs the Print Preview tests. */
6 6
7 var ROOT_PATH = '../../../../../'; 7 var ROOT_PATH = '../../../../../';
8 8
9 /** 9 /**
10 * @constructor 10 * @constructor
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 ROOT_PATH + 'ui/webui/resources/js/promise_resolver.js', 54 ROOT_PATH + 'ui/webui/resources/js/promise_resolver.js',
55 ROOT_PATH + 'third_party/mocha/mocha.js', 55 ROOT_PATH + 'third_party/mocha/mocha.js',
56 ROOT_PATH + 'chrome/test/data/webui/mocha_adapter.js', 56 ROOT_PATH + 'chrome/test/data/webui/mocha_adapter.js',
57 ROOT_PATH + 'ui/webui/resources/js/util.js', 57 ROOT_PATH + 'ui/webui/resources/js/util.js',
58 ROOT_PATH + 'chrome/test/data/webui/settings/test_browser_proxy.js', 58 ROOT_PATH + 'chrome/test/data/webui/settings/test_browser_proxy.js',
59 'print_preview_tests.js', 59 'print_preview_tests.js',
60 'native_layer_stub.js', 60 'native_layer_stub.js',
61 ], 61 ],
62 }; 62 };
63 63
64 TEST_F('PrintPreviewUIBrowserTest', 'PrinterList', function() { 64 // Run each mocha test in isolation (within a new TEST_F() call).
65 mocha.grep(/PrinterList\b/).run(); 65 [
66 'PrinterList',
67 'PrinterListCloudEmpty',
68 'RestoreLocalDestination',
69 'RestoreMultipleDestinations',
70 'DefaultDestinationSelectionRules',
71 'SystemDialogLinkIsHiddenInAppKioskMode',
72 'SectionsDisabled',
73 'PrintToPDFSelectedCapabilities',
74 'SourceIsHTMLCapabilities',
75 'SourceIsPDFCapabilities',
76 'ScalingUnchecksFitToPage',
77 'CheckNumCopiesPrintPreset',
78 'CheckDuplexPrintPreset',
79 'CustomMarginsControlsCheck',
80 'PageLayoutHasNoMarginsHideHeaderFooter',
81 'PageLayoutHasMarginsShowHeaderFooter',
82 'ZeroTopAndBottomMarginsHideHeaderFooter',
83 'ZeroTopAndNonZeroBottomMarginShowHeaderFooter',
84 'SmallPaperSizeHeaderFooter',
85 'TestColorSettingsMonochrome',
86 'TestColorSettingsCustomMonochrome',
87 'TestColorSettingsColor',
88 'TestColorSettingsCustomColor',
89 'TestColorSettingsBothStandardDefaultColor',
90 'TestColorSettingsBothStandardDefaultMonochrome',
91 'TestColorSettingsBothCustomDefaultColor',
92 ].forEach(function(testName) {
93 TEST_F('PrintPreviewUIBrowserTest', testName, function() {
94 mocha.grep(new RegExp(testName + '\\b')).run();
95 });
66 }); 96 });
67
68 TEST_F('PrintPreviewUIBrowserTest', 'PrinterListCloudEmpty', function() {
69 mocha.grep(/PrinterListCloudEmpty\b/).run();
70 });
71
72 TEST_F('PrintPreviewUIBrowserTest', 'RestoreLocalDestination', function() {
73 mocha.grep(/RestoreLocalDestination\b/).run();
74 });
75
76 TEST_F('PrintPreviewUIBrowserTest', 'RestoreMultipleDestinations', function() {
77 mocha.grep(/RestoreMultipleDestinations\b/).run();
78 });
79
80 TEST_F('PrintPreviewUIBrowserTest', 'DefaultDestinationSelectionRules',
81 function() {
82 mocha.grep(/DefaultDestinationSelectionRules\b/).run();
83 });
84
85 TEST_F('PrintPreviewUIBrowserTest', 'SystemDialogLinkIsHiddenInAppKioskMode',
86 function() {
87 mocha.grep(/SystemDialogLinkIsHiddenInAppKioskMode\b/).run();
88 });
89
90 TEST_F('PrintPreviewUIBrowserTest', 'SectionsDisabled', function() {
91 mocha.grep(/SectionsDisabled\b/).run();
92 });
93
94 TEST_F('PrintPreviewUIBrowserTest', 'PrintToPDFSelectedCapabilities',
95 function() {
96 mocha.grep(/PrintToPDFSelectedCapabilities\b/).run();
97 });
98
99 TEST_F('PrintPreviewUIBrowserTest', 'SourceIsHTMLCapabilities', function() {
100 mocha.grep(/SourceIsHTMLCapabilities\b/).run();
101 });
102
103 TEST_F('PrintPreviewUIBrowserTest', 'SourceIsPDFCapabilities', function() {
104 mocha.grep(/SourceIsPDFCapabilities\b/).run();
105 });
106
107 TEST_F('PrintPreviewUIBrowserTest', 'ScalingUnchecksFitToPage', function() {
108 mocha.grep(/ScalingUnchecksFitToPage\b/).run();
109 });
110
111 TEST_F('PrintPreviewUIBrowserTest', 'CheckNumCopiesPrintPreset', function() {
112 mocha.grep(/CheckNumCopiesPrintPreset\b/).run();
113 });
114
115 TEST_F('PrintPreviewUIBrowserTest', 'CheckDuplexPrintPreset', function() {
116 mocha.grep(/CheckDuplexPrintPreset\b/).run();
117 });
118
119 TEST_F('PrintPreviewUIBrowserTest', 'CustomMarginsControlsCheck', function() {
120 mocha.grep(/CustomMarginsControlsCheck\b/).run();
121 });
122
123 TEST_F('PrintPreviewUIBrowserTest', 'PageLayoutHasNoMarginsHideHeaderFooter',
124 function() {
125 mocha.grep(/PageLayoutHasNoMarginsHideHeaderFooter\b/).run();
126 });
127
128 TEST_F('PrintPreviewUIBrowserTest', 'PageLayoutHasMarginsShowHeaderFooter',
129 function() {
130 mocha.grep(/PageLayoutHasMarginsShowHeaderFooter\b/).run();
131 });
OLDNEW
« 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