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

Side by Side Diff: sql/sql_memory_dump_provider_unittest.cc

Issue 2006943003: [tracing] Sanitize process memory dumps for background mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@whitelist_mdp
Patch Set: Fix stripping. Created 4 years, 6 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "sql/sql_memory_dump_provider.h" 5 #include "sql/sql_memory_dump_provider.h"
6 6
7 #include "base/trace_event/process_memory_dump.h" 7 #include "base/trace_event/process_memory_dump.h"
8 #include "sql/test/sql_test_base.h" 8 #include "sql/test/sql_test_base.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace { 11 namespace {
12 using SQLMemoryDumpProviderTest = sql::SQLTestBase; 12 using SQLMemoryDumpProviderTest = sql::SQLTestBase;
13 } 13 }
14 14
15 TEST_F(SQLMemoryDumpProviderTest, OnMemoryDump) { 15 TEST_F(SQLMemoryDumpProviderTest, OnMemoryDump) {
16 base::trace_event::ProcessMemoryDump pmd(nullptr);
17 base::trace_event::MemoryDumpArgs args = { 16 base::trace_event::MemoryDumpArgs args = {
18 base::trace_event::MemoryDumpLevelOfDetail::DETAILED}; 17 base::trace_event::MemoryDumpLevelOfDetail::DETAILED};
18 base::trace_event::ProcessMemoryDump pmd(nullptr, args);
19 ASSERT_TRUE( 19 ASSERT_TRUE(
20 sql::SqlMemoryDumpProvider::GetInstance()->OnMemoryDump(args, &pmd)); 20 sql::SqlMemoryDumpProvider::GetInstance()->OnMemoryDump(args, &pmd));
21 ASSERT_TRUE(pmd.GetAllocatorDump("sqlite")); 21 ASSERT_TRUE(pmd.GetAllocatorDump("sqlite"));
22 } 22 }
OLDNEW
« no previous file with comments | « sql/connection_unittest.cc ('k') | third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698