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

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

Issue 1060973004: Enable tests related to the extensions web ui that were flaky. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply feedback Created 5 years, 7 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 /** 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 false /*selectionOnly*/, 180 false /*selectionOnly*/,
181 'FooDevice' /*systemDefaultDestinationId*/, 181 'FooDevice' /*systemDefaultDestinationId*/,
182 null /*serializedAppStateStr*/, 182 null /*serializedAppStateStr*/,
183 false /*documentHasSelection*/); 183 false /*documentHasSelection*/);
184 this.localDestinationInfos_ = [ 184 this.localDestinationInfos_ = [
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 testing.Test.disableAnimationsAndTransitions();
191 // Animations still happen and must be waited on.
192 var noAnimationStyle = document.createElement('style');
193 noAnimationStyle.textContent =
194 '* {' +
195 ' -webkit-transition-duration: 0ms !important;' +
196 ' -webkit-transition-delay: 0ms !important;' +
197 ' -webkit-animation-duration: 0ms !important;' +
198 ' -webkit-animation-delay: 0ms !important;' +
199 '}';
200 document.querySelector('head').appendChild(noAnimationStyle);
201 } 191 }
202 }; 192 };
203 193
204 GEN('#include "chrome/test/data/webui/print_preview.h"'); 194 GEN('#include "chrome/test/data/webui/print_preview.h"');
205 195
206 // Test some basic assumptions about the print preview WebUI. 196 // Test some basic assumptions about the print preview WebUI.
207 TEST_F('PrintPreviewWebUITest', 'TestPrinterList', function() { 197 TEST_F('PrintPreviewWebUITest', 'TestPrinterList', function() {
208 this.setInitialSettings(); 198 this.setInitialSettings();
209 this.setLocalDestinations(); 199 this.setLocalDestinations();
210 200
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 expectEquals( 953 expectEquals(
964 customLocalizedMediaName, 954 customLocalizedMediaName,
965 mediaSelect.options[mediaSelect.selectedIndex].text); 955 mediaSelect.options[mediaSelect.selectedIndex].text);
966 // Check the other media item. 956 // Check the other media item.
967 expectEquals( 957 expectEquals(
968 customMediaName, 958 customMediaName,
969 mediaSelect.options[mediaSelect.selectedIndex == 0 ? 1 : 0].text); 959 mediaSelect.options[mediaSelect.selectedIndex == 0 ? 1 : 0].text);
970 960
971 this.waitForAnimationToEnd('more-settings'); 961 this.waitForAnimationToEnd('more-settings');
972 }); 962 });
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/extensions/extension_settings_browsertest.js ('k') | chrome/test/data/webui/test_api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698