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

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

Issue 2834453004: Remove print preview scaling flag (Closed)
Patch Set: address comment Created 3 years, 7 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
« no previous file with comments | « chrome/common/chrome_features.cc ('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 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 /** @override */ 54 /** @override */
55 accessibilityIssuesAreErrors: true, 55 accessibilityIssuesAreErrors: true,
56 56
57 /** @override */ 57 /** @override */
58 isAsync: true, 58 isAsync: true,
59 59
60 /** 60 /**
61 * @override 61 * @override
62 */ 62 */
63 testGenPreamble: function() { 63 testGenPreamble: function() {
64 // Enable print scaling and print as image for tests. 64 // Enable print as image for tests on non Windows/Mac.
65 GEN('#if !defined(OS_WINDOWS) && !defined(OS_MACOSX)');
65 GEN(' base::FeatureList::ClearInstanceForTesting();'); 66 GEN(' base::FeatureList::ClearInstanceForTesting();');
66 GEN(' std::unique_ptr<base::FeatureList>'); 67 GEN(' std::unique_ptr<base::FeatureList>');
67 GEN(' feature_list(new base::FeatureList);'); 68 GEN(' feature_list(new base::FeatureList);');
68 GEN(' char enabled_features[128] = {0};'); 69 GEN(' feature_list->InitializeFromCommandLine(');
69 GEN(' strcpy(enabled_features, features::kPrintScaling.name);'); 70 GEN(' features::kPrintPdfAsImage.name, std::string());');
70 GEN('#if !defined(OS_WINDOWS) && !defined(OS_MACOSX)'); 71 GEN(' base::FeatureList::SetInstance(std::move(feature_list));');
71 GEN(' strcat(strcat(enabled_features, ","), ');
72 GEN(' features::kPrintPdfAsImage.name);');
73 GEN('#endif'); 72 GEN('#endif');
74 GEN(' feature_list->InitializeFromCommandLine(');
75 GEN(' enabled_features, std::string());');
76 GEN(' base::FeatureList::SetInstance(std::move(feature_list));');
77 }, 73 },
78 74
79 /** 75 /**
80 * Stub out low-level functionality like the NativeLayer and 76 * Stub out low-level functionality like the NativeLayer and
81 * CloudPrintInterface. 77 * CloudPrintInterface.
82 * @this {PrintPreviewWebUITest} 78 * @this {PrintPreviewWebUITest}
83 * @override 79 * @override
84 */ 80 */
85 preLoad: function() { 81 preLoad: function() {
86 window.addEventListener('DOMContentLoaded', function() { 82 window.addEventListener('DOMContentLoaded', function() {
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 // increments by 1 for each startGetPreview call it makes. It should only 1349 // increments by 1 for each startGetPreview call it makes. It should only
1354 // make one such call during initialization or there will be a race; see 1350 // make one such call during initialization or there will be a race; see
1355 // crbug.com/666595 1351 // crbug.com/666595
1356 expectEquals(printPreview.previewArea_.previewGenerator_.inFlightRequestId_, 1352 expectEquals(printPreview.previewArea_.previewGenerator_.inFlightRequestId_,
1357 -1); 1353 -1);
1358 this.setInitialSettings(); 1354 this.setInitialSettings();
1359 expectEquals(printPreview.previewArea_.previewGenerator_.inFlightRequestId_, 1355 expectEquals(printPreview.previewArea_.previewGenerator_.inFlightRequestId_,
1360 0); 1356 0);
1361 testDone(); 1357 testDone();
1362 }); 1358 });
OLDNEW
« no previous file with comments | « chrome/common/chrome_features.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698