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

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_ui.cc

Issue 383623002: Add a browser test that can communicate with the layout test framework and print pdfs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: base::FilePath now forward declared and unnecessary parameters removed for SetSelectedFileForTesting. Created 6 years, 5 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/print_preview/print_preview_ui.cc
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
index 601e24328b242b15019a3412588d40bfdc61868c..dad5b653a9ef44385c50ae4764f49a020c1b6b5e 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -6,6 +6,7 @@
#include <map>
+#include "base/files/file_path.h"
Lei Zhang 2014/07/17 21:08:16 I don't think you need this since SetSelectedFileF
ivandavid 2014/07/17 22:27:47 Done.
#include "base/id_map.h"
#include "base/lazy_instance.h"
#include "base/memory/ref_counted_memory.h"
@@ -610,3 +611,7 @@ void PrintPreviewUI::OnPrintPreviewScalingDisabled() {
void PrintPreviewUI::SetDelegateForTesting(TestingDelegate* delegate) {
g_testing_delegate = delegate;
}
+
+void PrintPreviewUI::SetSelectedFileForTesting(const base::FilePath& path) {
+ handler_->FileSelected(path, 0, NULL);
+}

Powered by Google App Engine
This is Rietveld 408576698