| 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 copies: 2 | 566 copies: 2 |
| 567 }; | 567 }; |
| 568 var printPresetOptionsEvent = new Event( | 568 var printPresetOptionsEvent = new Event( |
| 569 print_preview.NativeLayer.EventType.PRINT_PRESET_OPTIONS); | 569 print_preview.NativeLayer.EventType.PRINT_PRESET_OPTIONS); |
| 570 printPresetOptionsEvent.optionsFromDocument = printPresetOptions; | 570 printPresetOptionsEvent.optionsFromDocument = printPresetOptions; |
| 571 this.nativeLayer_.dispatchEvent(printPresetOptionsEvent); | 571 this.nativeLayer_.dispatchEvent(printPresetOptionsEvent); |
| 572 | 572 |
| 573 checkSectionVisible($('copies-settings'), true); | 573 checkSectionVisible($('copies-settings'), true); |
| 574 expectEquals( | 574 expectEquals( |
| 575 printPresetOptions.copies, | 575 printPresetOptions.copies, |
| 576 parseInt($('copies-settings').querySelector('.copies').value)); | 576 parseInt($('copies-settings').querySelector('.user-value').value)); |
| 577 | 577 |
| 578 this.waitForAnimationToEnd('other-options-collapsible'); | 578 this.waitForAnimationToEnd('other-options-collapsible'); |
| 579 }); | 579 }); |
| 580 | 580 |
| 581 // When the duplex print preset is set for source 'PDF', we update the | 581 // When the duplex print preset is set for source 'PDF', we update the |
| 582 // duplex setting if capability is supported by printer. | 582 // duplex setting if capability is supported by printer. |
| 583 TEST_F('PrintPreviewWebUITest', 'CheckDuplexPrintPreset', function() { | 583 TEST_F('PrintPreviewWebUITest', 'CheckDuplexPrintPreset', function() { |
| 584 this.initialSettings_.isDocumentModifiable_ = false; | 584 this.initialSettings_.isDocumentModifiable_ = false; |
| 585 this.setInitialSettings(); | 585 this.setInitialSettings(); |
| 586 this.setLocalDestinations(); | 586 this.setLocalDestinations(); |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1142 // appears. | 1142 // appears. |
| 1143 var advancedSettingsCloseButton = $('advanced-settings'). | 1143 var advancedSettingsCloseButton = $('advanced-settings'). |
| 1144 querySelector('.close-button'); | 1144 querySelector('.close-button'); |
| 1145 checkElementDisplayed(advancedSettingsCloseButton, true); | 1145 checkElementDisplayed(advancedSettingsCloseButton, true); |
| 1146 checkElementDisplayed($('advanced-settings'). | 1146 checkElementDisplayed($('advanced-settings'). |
| 1147 querySelector('.search-box-area'), true); | 1147 querySelector('.search-box-area'), true); |
| 1148 | 1148 |
| 1149 this.waitForAnimationToEnd('more-settings'); | 1149 this.waitForAnimationToEnd('more-settings'); |
| 1150 }); | 1150 }); |
| 1151 | 1151 |
| OLD | NEW |