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

Side by Side Diff: chrome/common/logging_chrome_uitest.cc

Issue 164352: Reliability test porting: stringy stuff.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: more comments Created 11 years, 4 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
« no previous file with comments | « chrome/common/logging_chrome.cc ('k') | chrome/test/perf/mem_usage.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 <string> 5 #include <string>
6 #include <windows.h> 6 #include <windows.h>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 27 matching lines...) Expand all
38 38
39 private: 39 private:
40 wchar_t environment_filename_[MAX_PATH]; // Saves real environment value. 40 wchar_t environment_filename_[MAX_PATH]; // Saves real environment value.
41 }; 41 };
42 }; 42 };
43 43
44 // Tests the log file name getter without an environment variable. 44 // Tests the log file name getter without an environment variable.
45 TEST_F(ChromeLoggingTest, LogFileName) { 45 TEST_F(ChromeLoggingTest, LogFileName) {
46 SaveEnvironmentVariable(std::wstring()); 46 SaveEnvironmentVariable(std::wstring());
47 47
48 std::wstring filename = logging::GetLogFileName(); 48 FilePath filename = logging::GetLogFileName();
49 ASSERT_NE(std::wstring::npos, filename.find(L"chrome_debug.log")); 49 ASSERT_NE(FilePath::StringType::npos,
50 filename.value().find(FILE_PATH_LITERAL("chrome_debug.log")));
50 51
51 RestoreEnvironmentVariable(); 52 RestoreEnvironmentVariable();
52 } 53 }
53 54
54 // Tests the log file name getter with an environment variable. 55 // Tests the log file name getter with an environment variable.
55 TEST_F(ChromeLoggingTest, EnvironmentLogFileName) { 56 TEST_F(ChromeLoggingTest, EnvironmentLogFileName) {
56 SaveEnvironmentVariable(std::wstring(L"test value")); 57 SaveEnvironmentVariable(std::wstring(L"test value"));
57 58
58 std::wstring filename = logging::GetLogFileName(); 59 FilePath filename = logging::GetLogFileName();
59 ASSERT_EQ(std::wstring(L"test value"), filename); 60 ASSERT_EQ(FilePath(FILE_PATH_LITERAL("test value")).value(),
61 filename.value());
60 62
61 RestoreEnvironmentVariable(); 63 RestoreEnvironmentVariable();
62 } 64 }
63 65
64 #ifndef NDEBUG // We don't have assertions in release builds. 66 #ifndef NDEBUG // We don't have assertions in release builds.
65 // Tests whether we correctly fail on browser assertions during tests. 67 // Tests whether we correctly fail on browser assertions during tests.
66 class AssertionTest : public UITest { 68 class AssertionTest : public UITest {
67 protected: 69 protected:
68 AssertionTest() : UITest() 70 AssertionTest() : UITest()
69 { 71 {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 128 }
127 }; 129 };
128 130
129 // Launch the app in browser crash test mode. 131 // Launch the app in browser crash test mode.
130 // This test is disabled. See bug 6910. 132 // This test is disabled. See bug 6910.
131 TEST_F(BrowserCrashTest, DISABLED_Crash) { 133 TEST_F(BrowserCrashTest, DISABLED_Crash) {
132 // Wait while the process is writing the crash dump. 134 // Wait while the process is writing the crash dump.
133 PlatformThread::Sleep(5000); 135 PlatformThread::Sleep(5000);
134 expected_crashes_ = 1; 136 expected_crashes_ = 1;
135 } 137 }
OLDNEW
« no previous file with comments | « chrome/common/logging_chrome.cc ('k') | chrome/test/perf/mem_usage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698