Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 TEST_F(ChromeLoggingTest, EnvironmentLogFileName) { | 59 TEST_F(ChromeLoggingTest, EnvironmentLogFileName) { |
| 60 SaveEnvironmentVariable("test value"); | 60 SaveEnvironmentVariable("test value"); |
| 61 | 61 |
| 62 FilePath filename = logging::GetLogFileName(); | 62 FilePath filename = logging::GetLogFileName(); |
| 63 ASSERT_EQ(FilePath(FILE_PATH_LITERAL("test value")).value(), | 63 ASSERT_EQ(FilePath(FILE_PATH_LITERAL("test value")).value(), |
| 64 filename.value()); | 64 filename.value()); |
| 65 | 65 |
| 66 RestoreEnvironmentVariable(); | 66 RestoreEnvironmentVariable(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 #if defined(OS_LINUX) && (!defined(NDEBUG) || !defined(USE_LINUX_BREAKPAD)) | 69 #if defined(OS_LINUX) && (!defined(NDEBUG) || !defined(USE_POSIX_BREAKPAD)) |
| 70 // On Linux in Debug mode, Chrome generates a SIGTRAP. | 70 // On Linux in Debug mode, Chrome generates a SIGTRAP. |
| 71 // we do not catch SIGTRAPs, thus no crash dump. | 71 // we do not catch SIGTRAPs, thus no crash dump. |
| 72 // This also does not work if Breakpad is disabled. | 72 // This also does not work if Breakpad is disabled. |
| 73 #define EXPECTED_ASSERT_CRASHES 0 | 73 #define EXPECTED_ASSERT_CRASHES 0 |
| 74 #else | 74 #else |
| 75 #define EXPECTED_ASSERT_CRASHES 1 | 75 #define EXPECTED_ASSERT_CRASHES 1 |
| 76 #endif | 76 #endif |
| 77 | 77 |
| 78 // Virtual keyboard build will start an extra renderer process (the extension | 78 // Virtual keyboard build will start an extra renderer process (the extension |
| 79 // process) for the virtual keyboard. | 79 // process) for the virtual keyboard. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 142 protected: | 142 protected: |
| 143 RendererCrashTest() { | 143 RendererCrashTest() { |
| 144 #if defined(OS_WIN) | 144 #if defined(OS_WIN) |
| 145 // TODO(phajdan.jr): Make crash notifications on launch work on Win. | 145 // TODO(phajdan.jr): Make crash notifications on launch work on Win. |
| 146 wait_for_initial_loads_ = false; | 146 wait_for_initial_loads_ = false; |
| 147 #endif | 147 #endif |
| 148 launch_arguments_.AppendSwitch(switches::kRendererCrashTest); | 148 launch_arguments_.AppendSwitch(switches::kRendererCrashTest); |
| 149 } | 149 } |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 #if defined(OS_LINUX) && !defined(USE_LINUX_BREAKPAD) | 152 #if defined(OS_LINUX) && !defined(USE_POSIX_BREAKPAD) |
|
Yaron
2012/04/03 23:54:20
Should this be || OS_ANDROID?
carlosvaldivia
2012/04/04 20:52:34
Done. Similar case elsewhere as well.
| |
| 153 // On Linux, do not expect a crash dump if Breakpad is disabled. | 153 // On Linux, do not expect a crash dump if Breakpad is disabled. |
| 154 #define EXPECTED_CRASH_CRASHES 0 | 154 #define EXPECTED_CRASH_CRASHES 0 |
| 155 #else | 155 #else |
| 156 #define EXPECTED_CRASH_CRASHES 1 | 156 #define EXPECTED_CRASH_CRASHES 1 |
| 157 #endif | 157 #endif |
| 158 | 158 |
| 159 #if defined(OS_MACOSX) | 159 #if defined(OS_MACOSX) |
| 160 // Crash service doesn't exist for the Mac yet: http://crbug.com/45243 | 160 // Crash service doesn't exist for the Mac yet: http://crbug.com/45243 |
| 161 #define MAYBE_Crash DISABLED_Crash | 161 #define MAYBE_Crash DISABLED_Crash |
| 162 #elif defined(OS_CHROMEOS) | 162 #elif defined(OS_CHROMEOS) |
| 163 #define MAYBE_Crash DISABLED_Crash | 163 #define MAYBE_Crash DISABLED_Crash |
| 164 #else | 164 #else |
| 165 #define MAYBE_Crash Crash | 165 #define MAYBE_Crash Crash |
| 166 #endif | 166 #endif |
| 167 // Launch the app in renderer crash test mode, then close the app. | 167 // Launch the app in renderer crash test mode, then close the app. |
| 168 TEST_F(RendererCrashTest, MAYBE_Crash) { | 168 TEST_F(RendererCrashTest, MAYBE_Crash) { |
| 169 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); | 169 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); |
| 170 ASSERT_TRUE(browser.get()); | 170 ASSERT_TRUE(browser.get()); |
| 171 ASSERT_TRUE(browser->WaitForTabCountToBecome(1)); | 171 ASSERT_TRUE(browser->WaitForTabCountToBecome(1)); |
| 172 expected_crashes_ = EXPECTED_CRASH_CRASHES; | 172 expected_crashes_ = EXPECTED_CRASH_CRASHES; |
| 173 } | 173 } |
| OLD | NEW |