| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <windows.h> | 5 #include <windows.h> |
| 6 #include <dbghelp.h> | 6 #include <dbghelp.h> |
| 7 #include <objbase.h> | 7 #include <objbase.h> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 ASSERT_TRUE(dump_file_handle_.IsValid()); | 68 ASSERT_TRUE(dump_file_handle_.IsValid()); |
| 69 } | 69 } |
| 70 | 70 |
| 71 virtual void TearDown() { | 71 virtual void TearDown() { |
| 72 if (dump_file_view_ != NULL) { | 72 if (dump_file_view_ != NULL) { |
| 73 EXPECT_TRUE(::UnmapViewOfFile(dump_file_view_)); | 73 EXPECT_TRUE(::UnmapViewOfFile(dump_file_view_)); |
| 74 dump_file_mapping_.Close(); | 74 dump_file_mapping_.Close(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 dump_file_handle_.Close(); | 77 dump_file_handle_.Close(); |
| 78 EXPECT_TRUE(base::Delete(dump_file_, false)); | 78 EXPECT_TRUE(base::DeleteFile(dump_file_, false)); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void EnsureDumpMapped() { | 81 void EnsureDumpMapped() { |
| 82 ASSERT_TRUE(dump_file_handle_.IsValid()); | 82 ASSERT_TRUE(dump_file_handle_.IsValid()); |
| 83 if (dump_file_view_ == NULL) { | 83 if (dump_file_view_ == NULL) { |
| 84 ASSERT_FALSE(dump_file_mapping_.IsValid()); | 84 ASSERT_FALSE(dump_file_mapping_.IsValid()); |
| 85 | 85 |
| 86 dump_file_mapping_.Set(::CreateFileMapping(dump_file_handle_, | 86 dump_file_mapping_.Set(::CreateFileMapping(dump_file_handle_, |
| 87 NULL, | 87 NULL, |
| 88 PAGE_READONLY, | 88 PAGE_READONLY, |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 testing::InitGoogleTest(&argc, argv); | 434 testing::InitGoogleTest(&argc, argv); |
| 435 CommandLine::Init(argc, argv); | 435 CommandLine::Init(argc, argv); |
| 436 | 436 |
| 437 logging::LoggingSettings settings; | 437 logging::LoggingSettings settings; |
| 438 settings.logging_dest = logging::LOG_TO_ALL; | 438 settings.logging_dest = logging::LOG_TO_ALL; |
| 439 settings.log_file = L"CON"; | 439 settings.log_file = L"CON"; |
| 440 settings.lock_log = logging::DONT_LOCK_LOG_FILE; | 440 settings.lock_log = logging::DONT_LOCK_LOG_FILE; |
| 441 logging::InitLogging(settings); | 441 logging::InitLogging(settings); |
| 442 return RUN_ALL_TESTS(); | 442 return RUN_ALL_TESTS(); |
| 443 } | 443 } |
| OLD | NEW |