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

Side by Side Diff: chrome/browser/resources/print_preview/print_preview.js

Issue 335583004: Added a test that currently is able to print to pdf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a directory for test files Created 6 years, 6 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 // TODO(rltoscano): Move data/* into print_preview.data namespace 5 // TODO(rltoscano): Move data/* into print_preview.data namespace
6 6
7 var localStrings = new LocalStrings(templateData); 7 var localStrings = new LocalStrings(templateData);
8 8
9 <include src="component.js"/> 9 <include src="component.js"/>
10 10
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 <include src="search/cloud_destination_list.js"/> 1033 <include src="search/cloud_destination_list.js"/>
1034 <include src="search/recent_destination_list.js"/> 1034 <include src="search/recent_destination_list.js"/>
1035 <include src="search/destination_list_item.js"/> 1035 <include src="search/destination_list_item.js"/>
1036 <include src="search/destination_search.js"/> 1036 <include src="search/destination_search.js"/>
1037 <include src="search/search_box.js"/> 1037 <include src="search/search_box.js"/>
1038 <include src="search/fedex_tos.js"/> 1038 <include src="search/fedex_tos.js"/>
1039 1039
1040 window.addEventListener('DOMContentLoaded', function() { 1040 window.addEventListener('DOMContentLoaded', function() {
1041 printPreview = new print_preview.PrintPreview(); 1041 printPreview = new print_preview.PrintPreview();
1042 printPreview.initialize(); 1042 printPreview.initialize();
1043
1044 function temp() {
1045 chrome.send('UILoaded');
1046 }
1047 (function func() {
1048 var settings = $('layout-settings');
1049 if (settings.offsetWidth > 10) {
Lei Zhang 2014/06/13 22:20:11 So instead of looping and look for this as the sig
1050 if (printPreview) {
1051 printPreview.destinationStore_.selectDefaultDestination_();
1052 var portrait = document.getElementsByClassName(
1053 'layout-settings-landscape-radio')[0];
1054 if (portrait) {
1055 portrait.click();
1056 }
1057 setTimeout(temp, 6000);
1058 }
1059 }
1060 else {
1061 setTimeout(func, 50);
1062 }
1063 })();
1043 }); 1064 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698