| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 /** | 5 /** |
| 6 * Test fixture for print preview WebUI testing. | 6 * Test fixture for print preview WebUI testing. |
| 7 * @constructor | 7 * @constructor |
| 8 * @extends {testing.Test} | 8 * @extends {testing.Test} |
| 9 */ | 9 */ |
| 10 function PrintPreviewWebUITest() { | 10 function PrintPreviewWebUITest() { |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 * @type {?string} | 159 * @type {?string} |
| 160 * @override | 160 * @override |
| 161 */ | 161 */ |
| 162 typedefCppFixture: null, | 162 typedefCppFixture: null, |
| 163 | 163 |
| 164 /** | 164 /** |
| 165 * @this {PrintPreviewWebUITest} | 165 * @this {PrintPreviewWebUITest} |
| 166 * @override | 166 * @override |
| 167 */ | 167 */ |
| 168 setUp: function() { | 168 setUp: function() { |
| 169 testing.Test.prototype.setUp.call(this); | |
| 170 Mock4JS.clearMocksToVerify(); | 169 Mock4JS.clearMocksToVerify(); |
| 171 | 170 |
| 172 this.initialSettings_ = new print_preview.NativeInitialSettings( | 171 this.initialSettings_ = new print_preview.NativeInitialSettings( |
| 173 false /*isInKioskAutoPrintMode*/, | 172 false /*isInKioskAutoPrintMode*/, |
| 174 false /*isInAppKioskMode*/, | 173 false /*isInAppKioskMode*/, |
| 175 false /*hidePrintWithSystemDialogLink*/, | 174 false /*hidePrintWithSystemDialogLink*/, |
| 176 ',' /*thousandsDelimeter*/, | 175 ',' /*thousandsDelimeter*/, |
| 177 '.' /*decimalDelimeter*/, | 176 '.' /*decimalDelimeter*/, |
| 178 1 /*unitType*/, | 177 1 /*unitType*/, |
| 179 true /*isDocumentModifiable*/, | 178 true /*isDocumentModifiable*/, |
| 180 'title' /*documentTitle*/, | 179 'title' /*documentTitle*/, |
| 181 true /*documentHasSelection*/, | 180 true /*documentHasSelection*/, |
| 182 false /*selectionOnly*/, | 181 false /*selectionOnly*/, |
| 183 'FooDevice' /*systemDefaultDestinationId*/, | 182 'FooDevice' /*systemDefaultDestinationId*/, |
| 184 null /*serializedAppStateStr*/, | 183 null /*serializedAppStateStr*/, |
| 185 null /*serializedDefaultDestinationSelectionRulesStr*/); | 184 null /*serializedDefaultDestinationSelectionRulesStr*/); |
| 186 this.localDestinationInfos_ = [ | 185 this.localDestinationInfos_ = [ |
| 187 { printerName: 'FooName', deviceName: 'FooDevice' }, | 186 { printerName: 'FooName', deviceName: 'FooDevice' }, |
| 188 { printerName: 'BarName', deviceName: 'BarDevice' } | 187 { printerName: 'BarName', deviceName: 'BarDevice' } |
| 189 ]; | 188 ]; |
| 190 this.nativeLayer_ = printPreview.nativeLayer_; | 189 this.nativeLayer_ = printPreview.nativeLayer_; |
| 191 | 190 |
| 192 testing.Test.disableAnimationsAndTransitions(); | 191 testing.Test.disableAnimationsAndTransitions(); |
| 193 | |
| 194 // Enable when failure is resolved. | |
| 195 // AX_TEXT_03: http://crbug.com/559209 | |
| 196 this.accessibilityAuditConfig.ignoreSelectors( | |
| 197 'multipleLabelableElementsPerLabel', | |
| 198 '#page-settings > .right-column > *'); | |
| 199 } | 192 } |
| 200 }; | 193 }; |
| 201 | 194 |
| 202 GEN('#include "chrome/test/data/webui/print_preview.h"'); | 195 GEN('#include "chrome/test/data/webui/print_preview.h"'); |
| 203 | 196 |
| 204 // Test some basic assumptions about the print preview WebUI. | 197 // Test some basic assumptions about the print preview WebUI. |
| 205 TEST_F('PrintPreviewWebUITest', 'TestPrinterList', function() { | 198 TEST_F('PrintPreviewWebUITest', 'TestPrinterList', function() { |
| 206 this.setInitialSettings(); | 199 this.setInitialSettings(); |
| 207 this.setLocalDestinations(); | 200 this.setLocalDestinations(); |
| 208 | 201 |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 expectEquals( | 944 expectEquals( |
| 952 customLocalizedMediaName, | 945 customLocalizedMediaName, |
| 953 mediaSelect.options[mediaSelect.selectedIndex].text); | 946 mediaSelect.options[mediaSelect.selectedIndex].text); |
| 954 // Check the other media item. | 947 // Check the other media item. |
| 955 expectEquals( | 948 expectEquals( |
| 956 customMediaName, | 949 customMediaName, |
| 957 mediaSelect.options[mediaSelect.selectedIndex == 0 ? 1 : 0].text); | 950 mediaSelect.options[mediaSelect.selectedIndex == 0 ? 1 : 0].text); |
| 958 | 951 |
| 959 this.waitForAnimationToEnd('more-settings'); | 952 this.waitForAnimationToEnd('more-settings'); |
| 960 }); | 953 }); |
| OLD | NEW |