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

Unified Diff: chrome/browser/printing/print_preview_pdf_generated_browsertest.cc

Issue 414623005: PrintPreviewPdfGeneratedBrowserTest properly listens to messages and exits correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test now properly exits by listening for a message from the layout test framework. 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
diff --git a/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc b/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
index f8dd016d8476c5926f51517be79752c56119d139..313378c58e262a3a2a502009a40c23679141ea00 100644
--- a/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
+++ b/chrome/browser/printing/print_preview_pdf_generated_browsertest.cc
@@ -652,17 +652,15 @@ IN_PROC_BROWSER_TEST_F(PrintPreviewPdfGeneratedBrowserTest,
// browsertest must be run with '--single_process' not '--single-process.'
while (true) {
std::string input;
- std::getline(std::cin, input);
- if (input.empty()) {
- while (std::cin.eof()) {
+ while (input.empty()) {
+ if (std::cin.eof())
std::cin.clear();
- std::getline(std::cin, input);
- if (!input.empty()) {
- break;
- }
- }
+ std::getline(std::cin, input);
}
+ if (input.find("QUIT") != std::string::npos)
Lei Zhang 2014/07/24 21:06:52 If you do this, shouldn't it be input == "QUIT" ?
ivandavid 2014/07/24 21:39:37 Done.
+ break;
+
base::FilePath::StringType file_extension = FILE_PATH_LITERAL(".pdf");
base::FilePath::StringType cmd;
#if defined(OS_POSIX)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698