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

Unified Diff: chrome/browser/resources/print_preview/print_preview.js

Issue 535073005: Convert Print Preview layout and color radio buttons to select elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adapt browser_tests to the controls change. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/print_preview/print_preview.js
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js
index 6e3bd0e7cfde0d8e667d479b3dbf784b14df4640..3d52bee54ca6b55a7e79abe1b0d4a8ece08cfead 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -1028,13 +1028,13 @@ cr.define('print_preview', function() {
* @private
*/
setLayoutSettingsForTest_: function(portrait) {
- var element = document.querySelector(portrait ?
- '.layout-settings-portrait-radio' :
- '.layout-settings-landscape-radio');
- if (element.checked)
+ var combobox = document.querySelector('.layout-settings-select');
+ if (combobox.value == 'portrait') {
this.nativeLayer_.previewReadyForTest();
- else
- element.click();
+ } else {
+ combobox.value = 'landscape';
+ this.layoutSettings_.onSelectChange_();
+ }
},
/**

Powered by Google App Engine
This is Rietveld 408576698