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

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

Issue 233623003: Remember and restore the account last used destination is registered for. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adjust PrintPreview unit test. Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/print_preview/settings/destination_settings.js ('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 /** 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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 'disableLandscapeOption': true, 714 'disableLandscapeOption': true,
715 'printerDefaultDuplexValue': 0 715 'printerDefaultDuplexValue': 0
716 }; 716 };
717 this.nativeLayer_.dispatchEvent(capsSetEvent); 717 this.nativeLayer_.dispatchEvent(capsSetEvent);
718 718
719 var previewGenerator = mock(print_preview.PreviewGenerator); 719 var previewGenerator = mock(print_preview.PreviewGenerator);
720 printPreview.previewArea_.previewGenerator_ = previewGenerator.proxy(); 720 printPreview.previewArea_.previewGenerator_ = previewGenerator.proxy();
721 previewGenerator.expects(exactly(6)).requestPreview(); 721 previewGenerator.expects(exactly(6)).requestPreview();
722 722
723 var barDestination; 723 var barDestination;
724 var destinations = printPreview.destinationStore_.destinations; 724 var destinations = printPreview.destinationStore_.destinations();
725 for (var destination, i = 0; destination = destinations[i]; i++) { 725 for (var destination, i = 0; destination = destinations[i]; i++) {
726 if (destination.id == 'BarDevice') { 726 if (destination.id == 'BarDevice') {
727 barDestination = destination; 727 barDestination = destination;
728 break; 728 break;
729 } 729 }
730 } 730 }
731 731
732 printPreview.destinationStore_.selectDestination(barDestination); 732 printPreview.destinationStore_.selectDestination(barDestination);
733 733
734 var capsSetEvent = 734 var capsSetEvent =
(...skipping 22 matching lines...) Expand all
757 expectEquals(true, previewFailedMessageEl.hidden); 757 expectEquals(true, previewFailedMessageEl.hidden);
758 758
759 var printFailedMessageEl = 759 var printFailedMessageEl =
760 previewAreaEl.getElementsByClassName('preview-area-print-failed')[0]; 760 previewAreaEl.getElementsByClassName('preview-area-print-failed')[0];
761 expectEquals(true, printFailedMessageEl.hidden); 761 expectEquals(true, printFailedMessageEl.hidden);
762 762
763 var customMessageEl = 763 var customMessageEl =
764 previewAreaEl.getElementsByClassName('preview-area-custom-message')[0]; 764 previewAreaEl.getElementsByClassName('preview-area-custom-message')[0];
765 expectEquals(false, customMessageEl.hidden); 765 expectEquals(false, customMessageEl.hidden);
766 }); 766 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/settings/destination_settings.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698