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

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

Issue 2894243004: Print Preview tests: Remove unnecessary C++ class definition (Closed)
Patch Set: Created 3 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
« no previous file with comments | « chrome/test/data/webui/print_preview.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"');
6 GEN('#include "chrome/common/chrome_features.h"');
7
8 /** 5 /**
9 * Test fixture for print preview WebUI testing. 6 * Test fixture for print preview WebUI testing.
10 * @constructor 7 * @constructor
11 * @extends {testing.Test} 8 * @extends {testing.Test}
12 */ 9 */
13 function PrintPreviewWebUITest() { 10 function PrintPreviewWebUITest() {
14 testing.Test.call(this); 11 testing.Test.call(this);
15 this.nativeLayer_ = null; 12 this.nativeLayer_ = null;
16 this.initialSettings_ = null; 13 this.initialSettings_ = null;
17 this.localDestinationInfos_ = null; 14 this.localDestinationInfos_ = null;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 this.setInitialSettings(); 214 this.setInitialSettings();
218 this.setLocalDestinations(); 215 this.setLocalDestinations();
219 this.setCapabilities(device); 216 this.setCapabilities(device);
220 this.expandMoreSettings(); 217 this.expandMoreSettings();
221 218
222 // Check that the advanced options settings section is visible. 219 // Check that the advanced options settings section is visible.
223 checkSectionVisible($('advanced-options-settings'), true); 220 checkSectionVisible($('advanced-options-settings'), true);
224 }, 221 },
225 222
226 /** 223 /**
227 * Generate a real C++ class; don't typedef.
228 * @type {?string}
229 * @override
230 */
231 typedefCppFixture: null,
232
233 /**
234 * @this {PrintPreviewWebUITest} 224 * @this {PrintPreviewWebUITest}
235 * @override 225 * @override
236 */ 226 */
237 setUp: function() { 227 setUp: function() {
238 testing.Test.prototype.setUp.call(this); 228 testing.Test.prototype.setUp.call(this);
239 Mock4JS.clearMocksToVerify(); 229 Mock4JS.clearMocksToVerify();
240 230
241 this.initialSettings_ = new print_preview.NativeInitialSettings( 231 this.initialSettings_ = new print_preview.NativeInitialSettings(
242 false /*isInKioskAutoPrintMode*/, 232 false /*isInKioskAutoPrintMode*/,
243 false /*isInAppKioskMode*/, 233 false /*isInAppKioskMode*/,
(...skipping 17 matching lines...) Expand all
261 testing.Test.disableAnimationsAndTransitions(); 251 testing.Test.disableAnimationsAndTransitions();
262 252
263 // Enable when failure is resolved. 253 // Enable when failure is resolved.
264 // AX_TEXT_03: http://crbug.com/559209 254 // AX_TEXT_03: http://crbug.com/559209
265 this.accessibilityAuditConfig.ignoreSelectors( 255 this.accessibilityAuditConfig.ignoreSelectors(
266 'multipleLabelableElementsPerLabel', 256 'multipleLabelableElementsPerLabel',
267 '#page-settings > .right-column > *'); 257 '#page-settings > .right-column > *');
268 } 258 }
269 }; 259 };
270 260
271 GEN('#include "chrome/test/data/webui/print_preview.h"');
272
273 // Test some basic assumptions about the print preview WebUI. 261 // Test some basic assumptions about the print preview WebUI.
274 TEST_F('PrintPreviewWebUITest', 'TestPrinterList', function() { 262 TEST_F('PrintPreviewWebUITest', 'TestPrinterList', function() {
275 this.setInitialSettings(); 263 this.setInitialSettings();
276 this.setLocalDestinations(); 264 this.setLocalDestinations();
277 265
278 var recentList = $('destination-search').querySelector('.recent-list ul'); 266 var recentList = $('destination-search').querySelector('.recent-list ul');
279 var localList = $('destination-search').querySelector('.local-list ul'); 267 var localList = $('destination-search').querySelector('.local-list ul');
280 assertNotEquals(null, recentList); 268 assertNotEquals(null, recentList);
281 assertEquals(1, recentList.childNodes.length); 269 assertEquals(1, recentList.childNodes.length);
282 assertEquals('FooName', 270 assertEquals('FooName',
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 printPreview.printTicketStore_.pageRange.updateValue("2"); 1460 printPreview.printTicketStore_.pageRange.updateValue("2");
1473 expectFalse(this.generateDraft()); 1461 expectFalse(this.generateDraft());
1474 1462
1475 // Change the margin type - need to regenerate again. 1463 // Change the margin type - need to regenerate again.
1476 printPreview.printTicketStore_.marginsType.updateValue( 1464 printPreview.printTicketStore_.marginsType.updateValue(
1477 print_preview.ticket_items.MarginsTypeValue.NO_MARGINS); 1465 print_preview.ticket_items.MarginsTypeValue.NO_MARGINS);
1478 expectTrue(this.generateDraft()); 1466 expectTrue(this.generateDraft());
1479 1467
1480 testDone(); 1468 testDone();
1481 }); 1469 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/print_preview.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698