content_test_helper.h 1014 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2019 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. #ifndef COMPONENTS_SESSIONS_CONTENT_CONTENT_TEST_HELPER_H_
  5. #define COMPONENTS_SESSIONS_CONTENT_CONTENT_TEST_HELPER_H_
  6. #include <string>
  7. #include "components/sessions/core/serialized_navigation_entry.h"
  8. namespace sessions {
  9. // Set of test functions to manipulate a SerializedNavigationEntry.
  10. class ContentTestHelper {
  11. public:
  12. // Only static methods.
  13. ContentTestHelper() = delete;
  14. ContentTestHelper(const ContentTestHelper&) = delete;
  15. ContentTestHelper& operator=(const ContentTestHelper&) = delete;
  16. // Creates a SerializedNavigationEntry with the given URL and title and some
  17. // common values for the other fields.
  18. static SerializedNavigationEntry CreateNavigation(
  19. const std::string& virtual_url,
  20. const std::string& title);
  21. };
  22. } // namespace sessions
  23. #endif // COMPONENTS_SESSIONS_CONTENT_CONTENT_TEST_HELPER_H_