Landing Recent QUIC changes until 8/19/2015 17:00 UTC.
[chromium-blink-merge.git] / skia / ext / skia_memory_dump_provider_unittest.cc
blob3432f18fb5a2cbc527c051c683197f51676edf9c
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
3 // found in the LICENSE file.
5 #include "base/trace_event/process_memory_dump.h"
6 #include "skia/ext/skia_memory_dump_provider.h"
7 #include "testing/gtest/include/gtest/gtest.h"
9 namespace skia {
11 TEST(SkiaMemoryDumpProviderTest, OnMemoryDump) {
12 scoped_ptr<base::trace_event::ProcessMemoryDump> process_memory_dump(
13 new base::trace_event::ProcessMemoryDump(nullptr));
14 base::trace_event::MemoryDumpArgs dump_args = {
15 base::trace_event::MemoryDumpArgs::LevelOfDetail::HIGH};
16 SkiaMemoryDumpProvider::GetInstance()->OnMemoryDump(
17 dump_args, process_memory_dump.get());
19 ASSERT_TRUE(process_memory_dump->GetAllocatorDump("skia/sk_font_cache"));
20 ASSERT_TRUE(process_memory_dump->GetAllocatorDump("skia/sk_resource_cache"));
23 } // namespace skia