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); |
169 Mock4JS.clearMocksToVerify(); | 170 Mock4JS.clearMocksToVerify(); |
170 | 171 |
171 this.initialSettings_ = new print_preview.NativeInitialSettings( | 172 this.initialSettings_ = new print_preview.NativeInitialSettings( |
172 false /*isInKioskAutoPrintMode*/, | 173 false /*isInKioskAutoPrintMode*/, |
173 false /*isInAppKioskMode*/, | 174 false /*isInAppKioskMode*/, |
174 false /*hidePrintWithSystemDialogLink*/, | 175 false /*hidePrintWithSystemDialogLink*/, |
175 ',' /*thousandsDelimeter*/, | 176 ',' /*thousandsDelimeter*/, |
176 '.' /*decimalDelimeter*/, | 177 '.' /*decimalDelimeter*/, |
177 1 /*unitType*/, | 178 1 /*unitType*/, |
178 true /*isDocumentModifiable*/, | 179 true /*isDocumentModifiable*/, |
179 'title' /*documentTitle*/, | 180 'title' /*documentTitle*/, |
180 true /*documentHasSelection*/, | 181 true /*documentHasSelection*/, |
181 false /*selectionOnly*/, | 182 false /*selectionOnly*/, |
182 'FooDevice' /*systemDefaultDestinationId*/, | 183 'FooDevice' /*systemDefaultDestinationId*/, |
183 null /*serializedAppStateStr*/, | 184 null /*serializedAppStateStr*/, |
184 null /*serializedDefaultDestinationSelectionRulesStr*/); | 185 null /*serializedDefaultDestinationSelectionRulesStr*/); |
185 this.localDestinationInfos_ = [ | 186 this.localDestinationInfos_ = [ |
186 { printerName: 'FooName', deviceName: 'FooDevice' }, | 187 { printerName: 'FooName', deviceName: 'FooDevice' }, |
187 { printerName: 'BarName', deviceName: 'BarDevice' } | 188 { printerName: 'BarName', deviceName: 'BarDevice' } |
188 ]; | 189 ]; |
189 this.nativeLayer_ = printPreview.nativeLayer_; | 190 this.nativeLayer_ = printPreview.nativeLayer_; |
190 | 191 |
191 testing.Test.disableAnimationsAndTransitions(); | 192 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 > *'); |
192 } | 199 } |
193 }; | 200 }; |
194 | 201 |
195 GEN('#include "chrome/test/data/webui/print_preview.h"'); | 202 GEN('#include "chrome/test/data/webui/print_preview.h"'); |
196 | 203 |
197 // Test some basic assumptions about the print preview WebUI. | 204 // Test some basic assumptions about the print preview WebUI. |
198 TEST_F('PrintPreviewWebUITest', 'TestPrinterList', function() { | 205 TEST_F('PrintPreviewWebUITest', 'TestPrinterList', function() { |
199 this.setInitialSettings(); | 206 this.setInitialSettings(); |
200 this.setLocalDestinations(); | 207 this.setLocalDestinations(); |
201 | 208 |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 expectEquals( | 951 expectEquals( |
945 customLocalizedMediaName, | 952 customLocalizedMediaName, |
946 mediaSelect.options[mediaSelect.selectedIndex].text); | 953 mediaSelect.options[mediaSelect.selectedIndex].text); |
947 // Check the other media item. | 954 // Check the other media item. |
948 expectEquals( | 955 expectEquals( |
949 customMediaName, | 956 customMediaName, |
950 mediaSelect.options[mediaSelect.selectedIndex == 0 ? 1 : 0].text); | 957 mediaSelect.options[mediaSelect.selectedIndex == 0 ? 1 : 0].text); |
951 | 958 |
952 this.waitForAnimationToEnd('more-settings'); | 959 this.waitForAnimationToEnd('more-settings'); |
953 }); | 960 }); |
OLD | NEW |