OLD | NEW |
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 |
11 * @extends {testing.Test} | 11 * @extends {testing.Test} |
12 */ | 12 */ |
13 function PrintPreviewUIBrowserTest() {} | 13 function PrintPreviewUIBrowserTest() {} |
14 | 14 |
15 PrintPreviewUIBrowserTest.prototype = { | 15 PrintPreviewUIBrowserTest.prototype = { |
16 __proto__: testing.Test.prototype, | 16 __proto__: testing.Test.prototype, |
17 | 17 |
18 /** | 18 /** |
19 * Browse to the sample page, cause print preview & call preLoad(). | 19 * Browse to the sample page, cause print preview & call preLoad(). |
20 * @override | 20 * @override |
21 */ | 21 */ |
22 browsePrintPreload: 'print_preview/print_preview_hello_world_test.html', | 22 browsePrintPreload: 'print_preview/print_preview_hello_world_test.html', |
23 | 23 |
24 /** @override */ | 24 /** @override */ |
25 runAccessibilityChecks: true, | 25 runAccessibilityChecks: true, |
26 | 26 |
27 /** @override */ | 27 /** @override */ |
28 accessibilityIssuesAreErrors: false, | 28 accessibilityIssuesAreErrors: true, |
29 | 29 |
30 /** @override */ | 30 /** @override */ |
31 isAsync: true, | 31 isAsync: true, |
32 | 32 |
33 /** @override */ | 33 /** @override */ |
34 preLoad: function() { | 34 preLoad: function() { |
35 window.isTest = true; | 35 window.isTest = true; |
36 testing.Test.prototype.preLoad.call(this); | 36 testing.Test.prototype.preLoad.call(this); |
37 | 37 |
38 }, | 38 }, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 'SourceIsPDFCapabilities', | 75 'SourceIsPDFCapabilities', |
76 'ScalingUnchecksFitToPage', | 76 'ScalingUnchecksFitToPage', |
77 'CheckNumCopiesPrintPreset', | 77 'CheckNumCopiesPrintPreset', |
78 'CheckDuplexPrintPreset', | 78 'CheckDuplexPrintPreset', |
79 'CustomMarginsControlsCheck', | 79 'CustomMarginsControlsCheck', |
80 'PageLayoutHasNoMarginsHideHeaderFooter', | 80 'PageLayoutHasNoMarginsHideHeaderFooter', |
81 'PageLayoutHasMarginsShowHeaderFooter', | 81 'PageLayoutHasMarginsShowHeaderFooter', |
82 'ZeroTopAndBottomMarginsHideHeaderFooter', | 82 'ZeroTopAndBottomMarginsHideHeaderFooter', |
83 'ZeroTopAndNonZeroBottomMarginShowHeaderFooter', | 83 'ZeroTopAndNonZeroBottomMarginShowHeaderFooter', |
84 'SmallPaperSizeHeaderFooter', | 84 'SmallPaperSizeHeaderFooter', |
85 'TestColorSettingsMonochrome', | 85 'ColorSettingsMonochrome', |
86 'TestColorSettingsCustomMonochrome', | 86 'ColorSettingsCustomMonochrome', |
87 'TestColorSettingsColor', | 87 'ColorSettingsColor', |
88 'TestColorSettingsCustomColor', | 88 'ColorSettingsCustomColor', |
89 'TestColorSettingsBothStandardDefaultColor', | 89 'ColorSettingsBothStandardDefaultColor', |
90 'TestColorSettingsBothStandardDefaultMonochrome', | 90 'ColorSettingsBothStandardDefaultMonochrome', |
91 'TestColorSettingsBothCustomDefaultColor', | 91 'ColorSettingsBothCustomDefaultColor', |
| 92 'DuplexSettingsTrue', |
| 93 'DuplexSettingsFalse', |
| 94 'PrinterChangeUpdatesPreview', |
| 95 'NoPDFPluginErrorMessage', |
| 96 'CustomPaperNames', |
| 97 'InitIssuesOneRequest', |
| 98 'InvalidSettingsError', |
| 99 'GenerateDraft', |
92 ].forEach(function(testName) { | 100 ].forEach(function(testName) { |
93 TEST_F('PrintPreviewUIBrowserTest', testName, function() { | 101 TEST_F('PrintPreviewUIBrowserTest', testName, function() { |
94 mocha.grep(new RegExp(testName + '\\b')).run(); | 102 mocha.grep(new RegExp(testName + '\\b')).run(); |
95 }); | 103 }); |
96 }); | 104 }); |
| 105 |
| 106 |
| 107 // Disable accessibility errors for some tests. |
| 108 [ |
| 109 'AdvancedSettings1Option', |
| 110 'AdvancedSettings2Options', |
| 111 ].forEach(function(testName) { |
| 112 TEST_F('PrintPreviewUIBrowserTest', testName, function() { |
| 113 this.accessibilityIssuesAreErrors = false; |
| 114 mocha.grep(new RegExp(testName + '\\b')).run(); |
| 115 }); |
| 116 }); |
OLD | NEW |