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

Unified Diff: chrome/browser/ui/webui/javascript2webui.js

Issue 7574002: Be able to print items that do window.print(); window.close() (airline tix e.g.) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Lei's comments. Created 9 years, 4 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/ui/webui/javascript2webui.js
diff --git a/chrome/browser/ui/webui/javascript2webui.js b/chrome/browser/ui/webui/javascript2webui.js
index e39fa5e007fba671c9a33486e53990e5766940fe..8c24859285ea6be8c6ee3a1c596e1198cdad80a1 100644
--- a/chrome/browser/ui/webui/javascript2webui.js
+++ b/chrome/browser/ui/webui/javascript2webui.js
@@ -32,6 +32,7 @@ function TEST_F(testFixture, testFunction, testBody) {
var testGenPreamble = this[testFixture].prototype.testGenPreamble;
var testGenPostamble = this[testFixture].prototype.testGenPostamble;
var typedefCppFixture = this[testFixture].prototype.typedefCppFixture;
+ var doPrint = this[testFixture].prototype.print;
var isAsync = this[testFixture].prototype.isAsync;
if (typedefCppFixture && !(testFixture in typedeffedCppFixtures)) {
@@ -50,7 +51,8 @@ function TEST_F(testFixture, testFunction, testBody) {
if (browsePrintPreload) {
print(' BrowsePrintPreload(GURL(WebUITestDataPathToURL(\n' +
' FILE_PATH_LITERAL("' + browsePrintPreload + '"))),\n' +
- ' "' + testFixture + '", "' + testFunction + '");');
+ ' "' + testFixture + '", "' + testFunction + '",\n' +
+ ' ' + doPrint + ');');
}
print(' ASSERT_TRUE(RunJavascriptTestF(' + isAsync + ', ' +
'"' + testFixture + '", ' +

Powered by Google App Engine
This is Rietveld 408576698