summaryrefslogtreecommitdiff
path: root/chromium/components/sessions/content/content_test_helper.h
blob: 0c9fc04031f340a158c59a004678f0f2f5b58bf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_SESSIONS_CONTENT_CONTENT_TEST_HELPER_H_
#define COMPONENTS_SESSIONS_CONTENT_CONTENT_TEST_HELPER_H_

#include <string>

#include "base/macros.h"
#include "components/sessions/core/serialized_navigation_entry.h"

namespace sessions {

// Set of test functions to manipulate a SerializedNavigationEntry.
class ContentTestHelper {
 public:
  // Only static methods.
  ContentTestHelper() = delete;
  ContentTestHelper(const ContentTestHelper&) = delete;
  ContentTestHelper& operator=(const ContentTestHelper&) = delete;

  // Creates a SerializedNavigationEntry with the given URL and title and some
  // common values for the other fields.
  static SerializedNavigationEntry CreateNavigation(
      const std::string& virtual_url,
      const std::string& title);
};

}  // namespace sessions

#endif  // COMPONENTS_SESSIONS_CONTENT_CONTENT_TEST_HELPER_H_