| 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 GEN('#include "base/feature_list.h"'); | 5 GEN('#include "base/feature_list.h"'); |
| 6 GEN('#include "chrome/common/chrome_features.h"'); | 6 GEN('#include "chrome/common/chrome_features.h"'); |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Test fixture for print preview WebUI testing. | 9 * Test fixture for print preview WebUI testing. |
| 10 * @constructor | 10 * @constructor |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 }, | 152 }, |
| 153 | 153 |
| 154 /** | 154 /** |
| 155 * Even though animation duration and delay is set to zero, it is necessary to | 155 * Even though animation duration and delay is set to zero, it is necessary to |
| 156 * wait until the animation has finished. | 156 * wait until the animation has finished. |
| 157 */ | 157 */ |
| 158 waitForAnimationToEnd: function(elementId) { | 158 waitForAnimationToEnd: function(elementId) { |
| 159 // add a listener for the animation end event | 159 // add a listener for the animation end event |
| 160 document.addEventListener('webkitAnimationEnd', function f(e) { | 160 document.addEventListener('webkitAnimationEnd', function f(e) { |
| 161 if (e.target.id == elementId) { | 161 if (e.target.id == elementId) { |
| 162 document.removeEventListener(f, 'webkitAnimationEnd'); | 162 document.removeEventListener('webkitAnimationEnd', f); |
| 163 testDone(); | 163 testDone(); |
| 164 } | 164 } |
| 165 }); | 165 }); |
| 166 }, | 166 }, |
| 167 | 167 |
| 168 /** | 168 /** |
| 169 * Expand the 'More Settings' div to expose all options. | 169 * Expand the 'More Settings' div to expose all options. |
| 170 */ | 170 */ |
| 171 expandMoreSettings: function() { | 171 expandMoreSettings: function() { |
| 172 var moreSettings = $('more-settings'); | 172 var moreSettings = $('more-settings'); |
| (...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1228 // appears. | 1228 // appears. |
| 1229 var advancedSettingsCloseButton = $('advanced-settings'). | 1229 var advancedSettingsCloseButton = $('advanced-settings'). |
| 1230 querySelector('.close-button'); | 1230 querySelector('.close-button'); |
| 1231 checkElementDisplayed(advancedSettingsCloseButton, true); | 1231 checkElementDisplayed(advancedSettingsCloseButton, true); |
| 1232 checkElementDisplayed($('advanced-settings'). | 1232 checkElementDisplayed($('advanced-settings'). |
| 1233 querySelector('.search-box-area'), true); | 1233 querySelector('.search-box-area'), true); |
| 1234 | 1234 |
| 1235 this.waitForAnimationToEnd('more-settings'); | 1235 this.waitForAnimationToEnd('more-settings'); |
| 1236 }); | 1236 }); |
| 1237 | 1237 |
| OLD | NEW |