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

Unified Diff: chrome/test/render_view_test.cc

Issue 6516022: Linux: Refactor printing to be more like Windows/Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac build Created 9 years, 10 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/test/render_view_test.cc
===================================================================
--- chrome/test/render_view_test.cc (revision 75320)
+++ chrome/test/render_view_test.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -259,7 +259,11 @@
}
void RenderViewTest::VerifyPageCount(int count) {
-#if defined(OS_WIN) || defined(OS_MACOSX)
+#if defined(OS_CHROMEOS)
+ // The DidGetPrintedPagesCount message isn't sent on ChromeOS. Right now we
+ // always print all pages, and there are checks to that effect built into
+ // the print code.
+#else
const IPC::Message* page_cnt_msg =
render_thread_.sink().GetUniqueMessageMatching(
ViewHostMsg_DidGetPrintedPagesCount::ID);
@@ -268,28 +272,24 @@
ViewHostMsg_DidGetPrintedPagesCount::Read(page_cnt_msg,
&post_page_count_param);
EXPECT_EQ(count, post_page_count_param.b);
-#elif defined(OS_LINUX)
- // The DidGetPrintedPagesCount message isn't sent on Linux. Right now we
- // always print all pages, and there are checks to that effect built into
- // the print code.
-#endif
+#endif // defined(OS_CHROMEOS)
}
void RenderViewTest::VerifyPagesPrinted() {
-#if defined(OS_WIN) || defined(OS_MACOSX)
+#if defined(OS_CHROMEOS)
const IPC::Message* did_print_msg =
render_thread_.sink().GetUniqueMessageMatching(
+ ViewHostMsg_TempFileForPrintingWritten::ID);
+ ASSERT_TRUE(did_print_msg);
+#else
+ const IPC::Message* did_print_msg =
+ render_thread_.sink().GetUniqueMessageMatching(
ViewHostMsg_DidPrintPage::ID);
ASSERT_TRUE(did_print_msg);
ViewHostMsg_DidPrintPage::Param post_did_print_page_param;
ViewHostMsg_DidPrintPage::Read(did_print_msg, &post_did_print_page_param);
EXPECT_EQ(0, post_did_print_page_param.a.page_number);
-#elif defined(OS_LINUX)
- const IPC::Message* did_print_msg =
- render_thread_.sink().GetUniqueMessageMatching(
- ViewHostMsg_TempFileForPrintingWritten::ID);
- ASSERT_TRUE(did_print_msg);
-#endif
+#endif // defined(OS_CHROMEOS)
}
const char* const kGetCoordinatesScript =

Powered by Google App Engine
This is Rietveld 408576698