blob: 1f1dcf9a689dfb700d433e7bb567f2c5960279ce [file] [log] [blame]
ssid9f8022f2015-10-12 17:49:031// Copyright 2015 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "sql/sql_memory_dump_provider.h"
6
7#include "base/trace_event/process_memory_dump.h"
8#include "sql/test/sql_test_base.h"
9#include "testing/gtest/include/gtest/gtest.h"
10
11namespace {
12using SQLMemoryDumpProviderTest = sql::SQLTestBase;
13}
14
15TEST_F(SQLMemoryDumpProviderTest, OnMemoryDump) {
16 base::trace_event::ProcessMemoryDump pmd(nullptr);
17 base::trace_event::MemoryDumpArgs args = {
18 base::trace_event::MemoryDumpLevelOfDetail::DETAILED};
19 ASSERT_TRUE(
20 sql::SqlMemoryDumpProvider::GetInstance()->OnMemoryDump(args, &pmd));
21 ASSERT_TRUE(pmd.GetAllocatorDump("sqlite"));
22}