Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 * @extends {testing.Test} | 7 * @extends {testing.Test} |
| 8 * @constructor | 8 * @constructor |
| 9 **/ | 9 **/ |
| 10 function PrintPreviewWebUITest() {} | 10 function PrintPreviewWebUITest() {} |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 282 disableCopiesOption: true, | 282 disableCopiesOption: true, |
| 283 disableLandscapeOption: true, | 283 disableLandscapeOption: true, |
| 284 }); | 284 }); |
| 285 })); | 285 })); |
| 286 | 286 |
| 287 updateControlsWithSelectedPrinterCapabilities(); | 287 updateControlsWithSelectedPrinterCapabilities(); |
| 288 | 288 |
| 289 checkSectionVisible(layoutSettings.layoutOption_, false); | 289 checkSectionVisible(layoutSettings.layoutOption_, false); |
| 290 checkSectionVisible(colorSettings.colorOption_, false); | 290 checkSectionVisible(colorSettings.colorOption_, false); |
| 291 checkSectionVisible(copiesSettings.copiesOption_, false); | 291 checkSectionVisible(copiesSettings.copiesOption_, false); |
| 292 checkSectionVisible($('options-option'), false); | |
|
dpapad
2011/08/05 00:34:59
This test fails as it is. Why should the headers/f
Aayush Kumar
2011/08/05 00:52:39
Restored change - will create a separate CL for JS
| |
| 292 }); | 293 }); |
| 293 | 294 |
| 294 // Test that the color settings are set according to the printer capabilities. | 295 // Test that the color settings are set according to the printer capabilities. |
| 295 TEST_F('PrintPreviewWebUITest', 'TestColorSettings', function() { | 296 TEST_F('PrintPreviewWebUITest', 'TestColorSettings', function() { |
| 296 this.mockHandler.expects(once()).getPrinterCapabilities('FooDevice'). | 297 this.mockHandler.expects(once()).getPrinterCapabilities('FooDevice'). |
| 297 will(callFunction(function() { | 298 will(callFunction(function() { |
| 298 updateWithPrinterCapabilities({ | 299 updateWithPrinterCapabilities({ |
| 299 disableColorOption: false, | 300 disableColorOption: false, |
| 300 setColorAsDefault: true, | 301 setColorAsDefault: true, |
| 301 disableCopiesOption: false, | 302 disableCopiesOption: false, |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 373 | 374 |
| 374 // Test that error message is displayed when plugin doesn't exist. | 375 // Test that error message is displayed when plugin doesn't exist. |
| 375 TEST_F('PrintPreviewNoPDFWebUITest', 'TestErrorMessage', function() { | 376 TEST_F('PrintPreviewNoPDFWebUITest', 'TestErrorMessage', function() { |
| 376 var errorButton = $('error-button'); | 377 var errorButton = $('error-button'); |
| 377 assertNotEquals(null, errorButton); | 378 assertNotEquals(null, errorButton); |
| 378 expectFalse(errorButton.disabled); | 379 expectFalse(errorButton.disabled); |
| 379 var errorText = $('error-text'); | 380 var errorText = $('error-text'); |
| 380 assertNotEquals(null, errorText); | 381 assertNotEquals(null, errorText); |
| 381 expectFalse(errorText.classList.contains('hidden')); | 382 expectFalse(errorText.classList.contains('hidden')); |
| 382 }); | 383 }); |
| OLD | NEW |