Chromium Code Reviews| Index: base/trace_event/winheap_dump_provider_win_unittest.cc |
| diff --git a/base/trace_event/winheap_dump_provider_win_unittest.cc b/base/trace_event/winheap_dump_provider_win_unittest.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b6e068a07007d1a1880f4e0dd0841e233e63fa43 |
| --- /dev/null |
| +++ b/base/trace_event/winheap_dump_provider_win_unittest.cc |
| @@ -0,0 +1,28 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "base/trace_event/winheap_dump_provider_win.h" |
| + |
| +#include <windows.h> |
| + |
| +#include "base/trace_event/memory_dump_session_state.h" |
| +#include "base/trace_event/process_memory_dump.h" |
| +#include "testing/gtest/include/gtest/gtest.h" |
| + |
| +namespace base { |
| +namespace trace_event { |
| + |
| +TEST(WinHeapDumpProviderTest, DumpInto) { |
| + ProcessMemoryDump pmd(make_scoped_refptr(new MemoryDumpSessionState())); |
| + |
| + WinHeapDumpProvider* winheap_dump_provider = |
| + WinHeapDumpProvider::GetInstance(); |
| + ASSERT_NE(reinterpret_cast<WinHeapDumpProvider*>(nullptr), |
|
Primiano Tucci (use gerrit)
2015/04/24 09:17:44
just ASSERT here (or static_cast)
Sébastien Marchand
2015/04/24 09:20:45
Done.
|
| + winheap_dump_provider); |
| + |
| + ASSERT_TRUE(winheap_dump_provider->DumpInto(&pmd)); |
| +} |
| + |
| +} // namespace trace_event |
| +} // namespace base |