chromium/third_party/crashpad/crashpad/snapshot/minidump/process_snapshot_minidump_test.cc

// Copyright 2015 The Crashpad Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "snapshot/minidump/process_snapshot_minidump.h"

#include <windows.h>
#include <dbghelp.h>
#include <string.h>

#include <algorithm>
#include <iterator>
#include <memory>

#include "base/numerics/safe_math.h"
#include "base/strings/utf_string_conversions.h"
#include "gtest/gtest.h"
#include "minidump/minidump_context.h"
#include "snapshot/memory_map_region_snapshot.h"
#include "snapshot/minidump/minidump_annotation_reader.h"
#include "snapshot/module_snapshot.h"
#include "util/file/string_file.h"
#include "util/misc/pdb_structures.h"

namespace crashpad {
namespace test {
namespace {

class ReadToVector : public crashpad::MemorySnapshot::Delegate {};

MinidumpContextARM64 GetArm64MinidumpContext() {}

TEST(ProcessSnapshotMinidump, EmptyFile) {}

TEST(ProcessSnapshotMinidump, InvalidSignatureAndVersion) {}

TEST(ProcessSnapshotMinidump, Empty) {}

// Writes |string| to |writer| as a MinidumpUTF8String, and returns the file
// offset of the beginning of the string.
RVA WriteString(FileWriterInterface* writer, const std::string& string) {}

// Writes |dictionary| to |writer| as a MinidumpSimpleStringDictionary, and
// populates |location| with a location descriptor identifying what was written.
void WriteMinidumpSimpleStringDictionary(
    MINIDUMP_LOCATION_DESCRIPTOR* location,
    FileWriterInterface* writer,
    const std::map<std::string, std::string>& dictionary) {}

// Writes |strings| to |writer| as a MinidumpRVAList referencing
// MinidumpUTF8String objects, and populates |location| with a location
// descriptor identifying what was written.
void WriteMinidumpStringList(MINIDUMP_LOCATION_DESCRIPTOR* location,
                             FileWriterInterface* writer,
                             const std::vector<std::string>& strings) {}

// Writes |data| to |writer| as a MinidumpByteArray, and returns the file offset
// from the beginning of the string.
RVA WriteByteArray(FileWriterInterface* writer,
                   const std::vector<uint8_t> data) {}

// Writes |annotations| to |writer| as a MinidumpAnnotationList, and populates
// |location| with a location descriptor identifying what was written.
void WriteMinidumpAnnotationList(
    MINIDUMP_LOCATION_DESCRIPTOR* location,
    FileWriterInterface* writer,
    const std::vector<AnnotationSnapshot>& annotations) {}

TEST(ProcessSnapshotMinidump, ClientID) {}

TEST(ProcessSnapshotMinidump, ReadOldCrashpadInfo) {}

TEST(ProcessSnapshotMinidump, AnnotationsSimpleMap) {}

TEST(ProcessSnapshotMinidump, AnnotationObjects) {}

TEST(ProcessSnapshotMinidump, Modules) {}

TEST(ProcessSnapshotMinidump, ProcessID) {}

TEST(ProcessSnapshotMinidump, SnapshotTime) {}

TEST(ProcessSnapshotMinidump, MiscTimes) {}

TEST(ProcessSnapshotMinidump, Threads) {}

TEST(ProcessSnapshotMinidump, ThreadsWithNames) {}

TEST(ProcessSnapshotMinidump, System) {}

TEST(ProcessSnapshotMinidump, ThreadContextARM64) {}

TEST(ProcessSnapshotMinidump, ThreadContextX86_64) {}

TEST(ProcessSnapshotMinidump, MemoryMap) {}

TEST(ProcessSnapshotMinidump, Stacks) {}

TEST(ProcessSnapshotMinidump, CustomMinidumpStreams) {}

TEST(ProcessSnapshotMinidump, Exception) {}

TEST(ProcessSnapshotMinidump, NoExceptionInMinidump) {}

}  // namespace
}  // namespace test
}  // namespace crashpad