chromium/components/sessions/content/content_serialized_navigation_builder_unittest.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/sessions/content/content_serialized_navigation_builder.h"

#include <memory>
#include <string>
#include <vector>

#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "components/sessions/content/content_record_password_state.h"
#include "components/sessions/content/content_serialized_navigation_driver.h"
#include "components/sessions/content/extended_info_handler.h"
#include "components/sessions/content/navigation_task_id.h"
#include "components/sessions/core/serialized_navigation_entry.h"
#include "components/sessions/core/serialized_navigation_entry_test_helper.h"
#include "content/public/browser/favicon_status.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/navigation_entry_restore_context.h"
#include "content/public/common/referrer.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_browser_context.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/page_state/page_state.h"

namespace sessions {

namespace {

const char kExtendedInfoKey1[] =;
const char kExtendedInfoValue1[] =;
const char kExtendedInfoKey2[] =;
const char kExtendedInfoValue2[] =;

struct TestData : public base::SupportsUserData::Data {};

class TestExtendedInfoHandler : public ExtendedInfoHandler {};

std::unique_ptr<content::NavigationEntry> MakeNavigationEntryForTest() {}

void SetExtendedInfoForTest(content::NavigationEntry* entry) {}

}  // namespace

class ContentSerializedNavigationBuilderTest : public testing::Test {};

// Create a SerializedNavigationEntry from a NavigationEntry.  All its fields
// should match the NavigationEntry's.
TEST_F(ContentSerializedNavigationBuilderTest, FromNavigationEntry) {}

// Test effect of the navigation serialization options.
TEST_F(ContentSerializedNavigationBuilderTest,
       FromNavigationEntrySerializationOptions) {}

// Create a NavigationEntry, then create another one by converting to
// a SerializedNavigationEntry and back.  The new one should match the old one
// except for fields that aren't preserved, which should be set to
// expected values.
TEST_F(ContentSerializedNavigationBuilderTest, ToNavigationEntry) {}

TEST_F(ContentSerializedNavigationBuilderTest, ToNavigationEntries) {}

// Test that we can restore FrameNavigationEntries with matching item sequence
// numbers and unique names but different URLs, as these may be found in
// serialized sessions from builds prior to r894383.
// See https://crbug.com/1275257.
TEST_F(ContentSerializedNavigationBuilderTest, DeduplicateEntriesByURL) {}

TEST_F(ContentSerializedNavigationBuilderTest, SetPasswordState) {}

}  // namespace sessions