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

Unified Diff: chrome/browser/printing/printing_test.h

Issue 149212: Move printing related stuff to the root printing project from the browser pro... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/printing/printing_test.h
===================================================================
--- chrome/browser/printing/printing_test.h (revision 20026)
+++ chrome/browser/printing/printing_test.h (working copy)
@@ -1,36 +0,0 @@
-// Copyright (c) 2006-2008 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.
-
-#ifndef CHROME_BROWSER_PRINTING_PRINTING_TEST_H__
-#define CHROME_BROWSER_PRINTING_PRINTING_TEST_H__
-
-#include <windows.h>
-#include <winspool.h>
-
-// Disable the whole test case when executing on a computer that has no printer
-// installed.
-// Note: Parent should be testing::Test or UITest.
-template<typename Parent>
-class PrintingTest : public Parent {
- public:
- static bool IsTestCaseDisabled() {
- return GetDefaultPrinter().empty();
- }
- static std::wstring GetDefaultPrinter() {
- wchar_t printer_name[MAX_PATH];
- DWORD size = arraysize(printer_name);
- BOOL result = ::GetDefaultPrinter(printer_name, &size);
- if (result == 0) {
- if (GetLastError() == ERROR_FILE_NOT_FOUND) {
- printf("There is no printer installed, printing can't be tested!\n");
- return std::wstring();
- }
- printf("INTERNAL PRINTER ERROR!\n");
- return std::wstring();
- }
- return printer_name;
- }
-};
-
-#endif // CHROME_BROWSER_PRINTING_PRINTING_TEST_H__

Powered by Google App Engine
This is Rietveld 408576698