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

Side by Side Diff: chrome/browser/logging_chrome_browsertest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/environment.h" 6 #include "base/environment.h"
7 #include "chrome/common/chrome_switches.h" 7 #include "chrome/common/chrome_switches.h"
8 #include "chrome/common/url_constants.h" 8 #include "chrome/common/url_constants.h"
9 #include "chrome/common/env_vars.h" 9 #include "chrome/common/env_vars.h"
10 #include "chrome/common/logging_chrome.h" 10 #include "chrome/common/logging_chrome.h"
(...skipping 26 matching lines...) Expand all
37 scoped_ptr<base::Environment> env(base::Environment::Create()); 37 scoped_ptr<base::Environment> env(base::Environment::Create());
38 env->SetVar(env_vars::kLogFileName, environment_filename_); 38 env->SetVar(env_vars::kLogFileName, environment_filename_);
39 } 39 }
40 40
41 private: 41 private:
42 std::string environment_filename_; // Saves real environment value. 42 std::string environment_filename_; // Saves real environment value.
43 }; 43 };
44 44
45 // Tests the log file name getter without an environment variable. 45 // Tests the log file name getter without an environment variable.
46 TEST_F(ChromeLoggingTest, LogFileName) { 46 TEST_F(ChromeLoggingTest, LogFileName) {
47 SaveEnvironmentVariable(""); 47 SaveEnvironmentVariable(std::string());
48 48
49 base::FilePath filename = logging::GetLogFileName(); 49 base::FilePath filename = logging::GetLogFileName();
50 ASSERT_NE(base::FilePath::StringType::npos, 50 ASSERT_NE(base::FilePath::StringType::npos,
51 filename.value().find(FILE_PATH_LITERAL("chrome_debug.log"))); 51 filename.value().find(FILE_PATH_LITERAL("chrome_debug.log")));
52 52
53 RestoreEnvironmentVariable(); 53 RestoreEnvironmentVariable();
54 } 54 }
55 55
56 // Tests the log file name getter with an environment variable. 56 // Tests the log file name getter with an environment variable.
57 TEST_F(ChromeLoggingTest, EnvironmentLogFileName) { 57 TEST_F(ChromeLoggingTest, EnvironmentLogFileName) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 // Flaky, http://crbug.com/107226 . 92 // Flaky, http://crbug.com/107226 .
93 IN_PROC_BROWSER_TEST_F(RendererCrashTest, DISABLED_Crash) { 93 IN_PROC_BROWSER_TEST_F(RendererCrashTest, DISABLED_Crash) {
94 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED, 94 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
95 content::NotificationService::AllSources()); 95 content::NotificationService::AllSources());
96 ui_test_utils::NavigateToURLWithDisposition( 96 ui_test_utils::NavigateToURLWithDisposition(
97 browser(), GURL(content::kChromeUICrashURL), CURRENT_TAB, 0); 97 browser(), GURL(content::kChromeUICrashURL), CURRENT_TAB, 0);
98 content::RunMessageLoop(); 98 content::RunMessageLoop();
99 ASSERT_TRUE(saw_crash_); 99 ASSERT_TRUE(saw_crash_);
100 } 100 }
OLDNEW
« no previous file with comments | « chrome/browser/language_usage_metrics_unittest.cc ('k') | chrome/browser/managed_mode/managed_user_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698