diff options
-rw-r--r-- | chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc | 19 | ||||
-rw-r--r-- | printing/backend/print_backend_cups.cc | 9 |
2 files changed, 13 insertions, 15 deletions
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc index 4da35e2..dd11aac 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc @@ -21,6 +21,7 @@ #include "content/public/test/browser_test_utils.h" #include "content/public/test/test_navigation_observer.h" #include "content/public/test/test_utils.h" +#include "url/url_constants.h" #if defined(OS_WIN) #include "ui/aura/window.h" @@ -48,10 +49,6 @@ class PrintPreviewTest : public InProcessBrowserTest { } }; -// The two tests below are failing on Linux LSAN -// crbug.com/382523 -#if !defined(ADDRESS_SANITIZER) - IN_PROC_BROWSER_TEST_F(PrintPreviewTest, PrintCommands) { // We start off at about:blank page. // Make sure there is 1 tab and print is enabled. @@ -101,17 +98,13 @@ IN_PROC_BROWSER_TEST_F(PrintPreviewTest, MAYBE_TaskManagerNewPrintPreview) { ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAboutBlankTab())); ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyTab())); ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyPrint())); - ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchPrint("about:blank"))); + ASSERT_NO_FATAL_FAILURE( + WaitForTaskManagerRows(1, MatchPrint(url::kAboutBlankURL))); } -#endif - // Disable the test for mac as it started being flaky, see http://crbug/367665. #if defined(OS_MACOSX) && !defined(OS_IOS) #define MAYBE_TaskManagerExistingPrintPreview DISABLED_TaskManagerExistingPrintPreview -// Disable the test for Linux LSAN, see http://crbug.com/382764. -#elif defined(OS_LINUX) && defined(ADDRESS_SANITIZER) -#define MAYBE_TaskManagerExistingPrintPreview DISABLED_TaskManagerExistingPrintPreview #else #define MAYBE_TaskManagerExistingPrintPreview TaskManagerExistingPrintPreview #endif @@ -125,11 +118,11 @@ IN_PROC_BROWSER_TEST_F(PrintPreviewTest, ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAboutBlankTab())); ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyTab())); ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchAnyPrint())); - ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchPrint("about:blank"))); + ASSERT_NO_FATAL_FAILURE( + WaitForTaskManagerRows(1, MatchPrint(url::kAboutBlankURL))); } #if defined(OS_WIN) - BOOL CALLBACK EnumerateChildren(HWND hwnd, LPARAM l_param) { HWND* child = reinterpret_cast<HWND*>(l_param); *child = hwnd; @@ -205,6 +198,6 @@ IN_PROC_BROWSER_TEST_F(PrintPreviewTest, NoCrashOnCloseWithOtherTabs) { browser()->tab_strip_model()->ActivateTabAt(1, true); } -#endif +#endif // defined(OS_WIN) } // namespace diff --git a/printing/backend/print_backend_cups.cc b/printing/backend/print_backend_cups.cc index e1ddf84..0f2f0e7 100644 --- a/printing/backend/print_backend_cups.cc +++ b/printing/backend/print_backend_cups.cc @@ -165,8 +165,7 @@ bool PrintBackendCUPS::GetPrinterCapsAndDefaults( base::FilePath ppd_path(GetPPD(printer_name.c_str())); // In some cases CUPS failed to get ppd file. if (ppd_path.empty()) { - LOG(ERROR) << "CUPS: Failed to get PPD" - << ", printer name: " << printer_name; + LOG(ERROR) << "CUPS: Failed to get PPD, printer name: " << printer_name; return false; } @@ -241,6 +240,12 @@ scoped_refptr<PrintBackend> PrintBackend::CreateInstance( int PrintBackendCUPS::GetDests(cups_dest_t** dests) { if (print_server_url_.is_empty()) { // Use default (local) print server. + // GnuTLS has a genuine small memory leak that is easier to annotate + // than suppress. See http://crbug.com/176888#c7 + // In theory any CUPS function can trigger this leak, but in + // PrintBackendCUPS, this is the most likely spot. + // TODO(earthdok): remove this once the leak is fixed. + ANNOTATE_SCOPED_MEMORY_LEAK; return cupsGetDests(dests); } else { HttpConnectionCUPS http(print_server_url_, cups_encryption_); |