Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1210)

Side by Side Diff: chrome/test/data/webui/print_preview.js

Issue 2598353002: The second argument of add/removeEventListener should be an object, null, or undefined
Patch Set: Fix tests Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/options_browsertest.js ('k') | content/test/data/loader/async_resource_handler.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698