| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 { printerName: 'FooName', deviceName: 'FooDevice' }, | 185 { printerName: 'FooName', deviceName: 'FooDevice' }, |
| 186 { printerName: 'BarName', deviceName: 'BarDevice' } | 186 { printerName: 'BarName', deviceName: 'BarDevice' } |
| 187 ]; | 187 ]; |
| 188 this.nativeLayer_ = printPreview.nativeLayer_; | 188 this.nativeLayer_ = printPreview.nativeLayer_; |
| 189 | 189 |
| 190 // Make all transitions and animations take 0ms for testing purposes. | 190 // Make all transitions and animations take 0ms for testing purposes. |
| 191 // Animations still happen and must be waited on. | 191 // Animations still happen and must be waited on. |
| 192 var noAnimationStyle = document.createElement('style'); | 192 var noAnimationStyle = document.createElement('style'); |
| 193 noAnimationStyle.textContent = | 193 noAnimationStyle.textContent = |
| 194 '* {' + | 194 '* {' + |
| 195 ' -webkit-transition-duration: 0s !important;' + | 195 ' -webkit-transition-duration: 0ms !important;' + |
| 196 ' -webkit-transition-delay: 0s !important;' + | 196 ' -webkit-transition-delay: 0ms !important;' + |
| 197 ' -webkit-animation-duration: 0s !important;' + | 197 ' -webkit-animation-duration: 0ms !important;' + |
| 198 ' -webkit-animation-delay: 0s !important;' + | 198 ' -webkit-animation-delay: 0ms !important;' + |
| 199 '}'; | 199 '}'; |
| 200 document.querySelector('head').appendChild(noAnimationStyle); | 200 document.querySelector('head').appendChild(noAnimationStyle); |
| 201 } | 201 } |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 GEN('#include "chrome/test/data/webui/print_preview.h"'); | 204 GEN('#include "chrome/test/data/webui/print_preview.h"'); |
| 205 | 205 |
| 206 // Test some basic assumptions about the print preview WebUI. | 206 // Test some basic assumptions about the print preview WebUI. |
| 207 TEST_F('PrintPreviewWebUITest', 'TestPrinterList', function() { | 207 TEST_F('PrintPreviewWebUITest', 'TestPrinterList', function() { |
| 208 this.setInitialSettings(); | 208 this.setInitialSettings(); |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 expectEquals( | 928 expectEquals( |
| 929 customLocalizedMediaName, | 929 customLocalizedMediaName, |
| 930 mediaSelect.options[mediaSelect.selectedIndex].text); | 930 mediaSelect.options[mediaSelect.selectedIndex].text); |
| 931 // Check the other media item. | 931 // Check the other media item. |
| 932 expectEquals( | 932 expectEquals( |
| 933 customMediaName, | 933 customMediaName, |
| 934 mediaSelect.options[mediaSelect.selectedIndex == 0 ? 1 : 0].text); | 934 mediaSelect.options[mediaSelect.selectedIndex == 0 ? 1 : 0].text); |
| 935 | 935 |
| 936 this.waitForAnimationToEnd('more-settings'); | 936 this.waitForAnimationToEnd('more-settings'); |
| 937 }); | 937 }); |
| OLD | NEW |