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

Unified Diff: chrome/renderer/printing/print_web_view_helper_browsertest.cc

Issue 517193003: More System Dialog printing code disabled on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@522493002
Patch Set: Mon Sep 8 01:10:20 PDT 2014 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
« no previous file with comments | « chrome/renderer/printing/print_web_view_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/printing/print_web_view_helper_browsertest.cc
diff --git a/chrome/renderer/printing/print_web_view_helper_browsertest.cc b/chrome/renderer/printing/print_web_view_helper_browsertest.cc
index fb46a5d646cac4bcea16a2c8bb150bfb4300f5e5..55a8ae5bdb9ccd75d9ec5544733d31fa7e612f96 100644
--- a/chrome/renderer/printing/print_web_view_helper_browsertest.cc
+++ b/chrome/renderer/printing/print_web_view_helper_browsertest.cc
@@ -188,10 +188,13 @@ class PrintWebViewHelperTestBase : public ChromeRenderViewTest {
}
#endif // defined(OS_CHROMEOS)
}
+
+#if !defined(DISABLE_BASIC_PRINTING)
void OnPrintPages() {
PrintWebViewHelper::Get(view_)->OnPrintPages();
ProcessPendingMessages();
}
+#endif // !DISABLE_BASIC_PRINTING
void VerifyPreviewRequest(bool requested) {
const IPC::Message* print_msg =
@@ -233,6 +236,7 @@ class PrintWebViewHelperTest : public PrintWebViewHelperTestBase {
DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelperTest);
};
+#if !defined(DISABLE_BASIC_PRINTING)
// Tests that printing pages work and sending and receiving messages through
// that channel all works.
TEST_F(PrintWebViewHelperTest, OnPrintPages) {
@@ -242,8 +246,9 @@ TEST_F(PrintWebViewHelperTest, OnPrintPages) {
VerifyPageCount(1);
VerifyPagesPrinted(true);
}
+#endif // !DISABLE_BASIC_PRINTING
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) && !defined(DISABLE_BASIC_PRINTING)
// TODO(estade): I don't think this test is worth porting to Linux. We will have
// to rip out and replace most of the IPC code if we ever plan to improve
// printing, and the comment below by sverrir suggests that it doesn't do much
@@ -284,7 +289,7 @@ TEST_F(PrintWebViewHelperTest, PrintWithIframe) {
EXPECT_NE(0, image1.size().width());
EXPECT_NE(0, image1.size().height());
}
-#endif // OS_MACOSX
+#endif // OS_MACOSX && !DISABLE_BASIC_PRINTING
// Tests if we can print a page and verify its results.
// This test prints HTML pages into a pseudo printer and check their outputs,
@@ -330,7 +335,7 @@ const TestPageData kTestPages[] = {
// hooking up Cairo to read a pdf stream, or accessing the cairo surface in the
// metafile directly.
// Same for printing via PDF on Windows.
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) && !defined(DISABLE_BASIC_PRINTING)
TEST_F(PrintWebViewHelperTest, PrintLayoutTest) {
bool baseline = false;
@@ -383,7 +388,7 @@ TEST_F(PrintWebViewHelperTest, PrintLayoutTest) {
}
}
}
-#endif // OS_MACOSX
+#endif // OS_MACOSX && !DISABLE_BASIC_PRINTING
// These print preview tests do not work on Chrome OS yet.
#if !defined(OS_CHROMEOS)
« no previous file with comments | « chrome/renderer/printing/print_web_view_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698