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

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

Issue 2606043004: Perform printer setup on Chrome OS before selecting printer. (Closed)
Patch Set: fix unit test 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 '"account":"", "capabilities":0, "name":"", "extensionId":"",' + 380 '"account":"", "capabilities":0, "name":"", "extensionId":"",' +
381 '"extensionName":""}]}'; 381 '"extensionName":""}]}';
382 this.setInitialSettings(); 382 this.setInitialSettings();
383 383
384 testDone(); 384 testDone();
385 }); 385 });
386 386
387 //Test with multiple destinations 387 //Test with multiple destinations
388 TEST_F('PrintPreviewWebUITest', 'TestPrintPreviewRestoreMultipleDestinations', 388 TEST_F('PrintPreviewWebUITest', 'TestPrintPreviewRestoreMultipleDestinations',
389 function() { 389 function() {
390 var origin = cr.isChromeOS ? "chrome_os" : "local";
391
390 this.initialSettings_.serializedAppStateStr_ = 392 this.initialSettings_.serializedAppStateStr_ =
dpapad 2017/01/12 01:18:10 Nit (optional): Instead of painfully constructing
skau 2017/01/12 02:17:17 Done.
391 '{"version":2,"recentDestinations":[{"id":"ID1", "origin":"local",' + 393 '{"version":2,"recentDestinations":[{' +
394 '"id":"ID1", "origin":"' + origin + '",' +
392 '"account":"", "capabilities":0, "name":"", "extensionId":"",' + 395 '"account":"", "capabilities":0, "name":"", "extensionId":"",' +
393 '"extensionName":""},' + 396 '"extensionName":""},' +
394 '{"id":"ID2", "origin":"local",' + 397 '{"id":"ID2", "origin":"' + origin + '",' +
395 '"account":"", "capabilities":0, "name":"", "extensionId":"",' + 398 '"account":"", "capabilities":0, "name":"", "extensionId":"",' +
396 '"extensionName":""},' + 399 '"extensionName":""},' +
397 '{"id":"ID3", "origin":"local",' + 400 '{"id":"ID3", "origin":"' + origin + '",' +
398 '"account":"", "capabilities":0, "name":"", "extensionId":"",' + 401 '"account":"", "capabilities":0, "name":"", "extensionId":"",' +
399 '"extensionName":""}]}'; 402 '"extensionName":""}]}';
400 this.setInitialSettings(); 403 this.setInitialSettings();
401 404
402 // Set capabilities for the three recently used destinations + 1 more 405 // Set capabilities for the three recently used destinations + 1 more
403 this.setCapabilities(getCddTemplate('ID1')); 406 this.setCapabilities(getCddTemplate('ID1'));
404 this.setCapabilities(getCddTemplate('ID2')); 407 this.setCapabilities(getCddTemplate('ID2'));
405 this.setCapabilities(getCddTemplate('ID3')); 408 this.setCapabilities(getCddTemplate('ID3'));
406 this.setCapabilities(getCddTemplate('ID4')); 409 this.setCapabilities(getCddTemplate('ID4'));
407 410
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 // appears. 1231 // appears.
1229 var advancedSettingsCloseButton = $('advanced-settings'). 1232 var advancedSettingsCloseButton = $('advanced-settings').
1230 querySelector('.close-button'); 1233 querySelector('.close-button');
1231 checkElementDisplayed(advancedSettingsCloseButton, true); 1234 checkElementDisplayed(advancedSettingsCloseButton, true);
1232 checkElementDisplayed($('advanced-settings'). 1235 checkElementDisplayed($('advanced-settings').
1233 querySelector('.search-box-area'), true); 1236 querySelector('.search-box-area'), true);
1234 1237
1235 this.waitForAnimationToEnd('more-settings'); 1238 this.waitForAnimationToEnd('more-settings');
1236 }); 1239 });
1237 1240
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698