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

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

Issue 131013005: Reset only invalid custom margins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/print_preview/data/print_ticket_store.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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 'disableColorOption': false, 715 'disableColorOption': false,
716 'setColorAsDefault': true, 716 'setColorAsDefault': true,
717 'disableCopiesOption': true, 717 'disableCopiesOption': true,
718 'disableLandscapeOption': true, 718 'disableLandscapeOption': true,
719 'printerDefaultDuplexValue': 0 719 'printerDefaultDuplexValue': 0
720 }; 720 };
721 this.nativeLayer_.dispatchEvent(capsSetEvent); 721 this.nativeLayer_.dispatchEvent(capsSetEvent);
722 722
723 var previewGenerator = mock(print_preview.PreviewGenerator); 723 var previewGenerator = mock(print_preview.PreviewGenerator);
724 printPreview.previewArea_.previewGenerator_ = previewGenerator.proxy(); 724 printPreview.previewArea_.previewGenerator_ = previewGenerator.proxy();
725 previewGenerator.expects(exactly(6)).requestPreview(); 725 previewGenerator.expects(atLeastOnce()).requestPreview();
726 726
727 var barDestination; 727 var barDestination;
728 var destinations = printPreview.destinationStore_.destinations; 728 var destinations = printPreview.destinationStore_.destinations;
729 for (var destination, i = 0; destination = destinations[i]; i++) { 729 for (var destination, i = 0; destination = destinations[i]; i++) {
730 if (destination.id == 'BarDevice') { 730 if (destination.id == 'BarDevice') {
731 barDestination = destination; 731 barDestination = destination;
732 break; 732 break;
733 } 733 }
734 } 734 }
735 735
(...skipping 25 matching lines...) Expand all
761 expectEquals(true, previewFailedMessageEl.hidden); 761 expectEquals(true, previewFailedMessageEl.hidden);
762 762
763 var printFailedMessageEl = 763 var printFailedMessageEl =
764 previewAreaEl.getElementsByClassName('preview-area-print-failed')[0]; 764 previewAreaEl.getElementsByClassName('preview-area-print-failed')[0];
765 expectEquals(true, printFailedMessageEl.hidden); 765 expectEquals(true, printFailedMessageEl.hidden);
766 766
767 var customMessageEl = 767 var customMessageEl =
768 previewAreaEl.getElementsByClassName('preview-area-custom-message')[0]; 768 previewAreaEl.getElementsByClassName('preview-area-custom-message')[0];
769 expectEquals(false, customMessageEl.hidden); 769 expectEquals(false, customMessageEl.hidden);
770 }); 770 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/data/print_ticket_store.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698